[comp.os.vms] VMS 5.0 VMSMail_Profile.Data format

David_Anthony_Guevara@cup.portal.com (02/08/89)

Does anyone have documentation on the format of the new VMS 5.0
mail file?  Either that or a version of SYS$EXAMPLES:MAILUAF.COM
that will run under VMS 5.0-2.  At my site, we used to use this
utility as part of a procedure for taking user accounts off of the
system.

I have looked through the VMS 5.0 documentation set, but I may have
overlooked something.  I turn to the wisdom of the net for assistance.
Thanks!!

	David Guevara

rickm@oregon.uoregon.edu (02/09/89)

In article <14397@cup.portal.com>, David_Anthony_Guevara@cup.portal.com writes:
> Does anyone have documentation on the format of the new VMS 5.0
> mail file?  Either that or a version of SYS$EXAMPLES:MAILUAF.COM
> that will run under VMS 5.0-2.

Each user has one record in VMSMAIL_PROFILE.DATA.  First field is the key,
USERNAME, 31 characters.  Rest of the fields have the format:
  Type    2 bytes  00  ?
                   01  New mail count
                   02  Flags
                   03  Mail directory
                   04  Forwarding address
                   05  Personal name
                   06  ?
                   07  ?
                   08  Editor
                   09  Print queue
                   0A  ?
                   0B  ?
                   0C  ?
                   0D  Print form
                   0E  ?
                   0F  ?
  Length  2 bytes  New mail count and flags always 2 bytes
  Data    n bytes
Flags are:
  01 Copy send
  02 Copy reply
  04 No auto purge
  08 Copy forward
  10 CC prompt

We too used MAILUAF.COM in our authorization/deauthorization procedures prior
to V5.  I wrote a C program to replace it under V5; will be glad to send you
the source if you like.

madison@vms.ecs.rpi.edu (02/10/89)

In article <196@oregon.uoregon.edu>, rickm@oregon.uoregon.edu writes...

>In article <14397@cup.portal.com>, David_Anthony_Guevara@cup.portal.com writes:
>> Does anyone have documentation on the format of the new VMS 5.0
>> mail file?  Either that or a version of SYS$EXAMPLES:MAILUAF.COM
>> that will run under VMS 5.0-2.

[...stuff on VMSMAIL_PROFILE.DATA deleted...]

>We too used MAILUAF.COM in our authorization/deauthorization procedures prior
>to V5.  I wrote a C program to replace it under V5; will be glad to send you
>the source if you like.

You really don't need to know this stuff!  The functionality of MAILUAF.COM
is now in MAIL itself. -- Stuff like

     SHOW FORWARD/USER=username
     REMOVE username

are in there now, documented and supported.

awpsys@ultb.UUCP (Andrew W. Potter) (02/11/89)

In article <14397@cup.portal.com> David_Anthony_Guevara@cup.portal.com writes:
>Does anyone have documentation on the format of the new VMS 5.0
>mail file?  Either that or a version of SYS$EXAMPLES:MAILUAF.COM
>that will run under VMS 5.0-2.  At my site, we used to use this
>utility as part of a procedure for taking user accounts off of the
>system.

If all you want to do is delete a record from the vms mail database,
you can do it with a simple command procedure.  In both VMS V4 and
V5 the primary key is the username.

	$! Procedure to delete MAIL UAF records
	$!
	$ open/read/write/share mailuaf sys$system:vmsmail_profile.data
	$ read/key='p1'/delete/err=not_there mailuaf mail_record
	$not_there:
	$ close mailuaf

	simply call this procedure passing the username as parameter
	P1.

	- Andy

-- 
Andrew W. Potter                         Email: awpsys@ritvax.BITNET
Systems Programmer                          awp8101%ritcv@cs.rit.edu
Information Systems and Computing
Rochester Institute of Technology, Rochester NY, 14623 (716) 475-6994