From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
Newsgroups: comp.os.vms
Subject: Re: ?modifying mail profile?
Date: 28 Jan 1993 02:45:10 GMT
Organization: HST Wide Field/Planetary Camera
Distribution: world
Reply-To: carl@SOL1.GPS.CALTECH.EDU
NNTP-Posting-Host: sol1.gps.caltech.edu

In article <andrea.728156651@pX1.stfx.ca>, andrea@pX1.stfx.ca (John Andrea) writes:
>I'm pretty sure that I want to set all my users mail profiles to have
>auto_purge set on. Mostly students as users, but everyone is eating up
>disk/quota with deleted mail messages and few people set it on for
>themselves.
>
>But is seems that MAIL will only let system users modify forwarding
>addresses (for VMS 5.4-2). And not modify any other options.
>
>Thanks to Bob Marshall for sending me a copy of MAILUAF.COM for
>modifying the profile data. But that procedure doesn't seem to know
>about the auto_purge flag.
>
>So my questions
>
>1. Does anyone have a small procedure for doing exactly what i want ?
>   To turn on auto_purge for any or all users listed in the mail
>   profile.

You could submit a batch job for each of them that does that.
	$	SET NOON
	$	CREATE AUTOPURGE.COM
	$	DECK
	$	MAIL
	SET AUTO_PURGE
	$	EOD
	$	OPEN/READ/SHARE=WRITE FILE SYS$SYSTEM:VMSMAIL_PROFILE.DATA
	$ LOOP:	READ/END=DONE FILE REC
	$	USER = F$EDIT(F$EXTRACT(0, 31, REC), "TRIM")
	$	SUBMIT/USER='USER'/NOLOG AUTO_PURGE
	$	GOTO LOOP
	$ DONE:	CLOSE FILE

>3. How does one get listed in the mail profile ?

As soon as you receive mail (thus causing MAIL to set the new mail count) or
set any of things defined in VMSMAIL_PROFILE.DATA, a record is created.

>   I'll want to set auto_purge to on for any new users that i add from
>   now on, and so will use that small procedure (see 1 & 2 above) for
>   the setting from inside my add_user procedure.
>   But i've looked at the existing mail profile data file and see that
>   not all users have a mail profile record.
>   Do you not get a record until you have mail ?

Right.

>     If thats true then my add_user could send mail to the new user then
>     make the setting for auto_purge right away.
>   But some users who have logged on don't have a record. Is it bacause
>   they don't have any mail ?

Right.

>     This seems to be true for anyone who has set forwarding to a
>     different system.

When creating a new account, it's probably a good idea to send a mail message
introducing them to the peculiarities of your system.  This also helps to
confirm that you've set up the account properly.  If you don't want to send
them mail, but want to make sure they've got a record in VMSMAIL_PROFILE.DATA,
you could, as part of your account-creation procedure, have it first set then
remove a forwarding address for them.
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL

Disclaimer:  Hey, I understand VAXen and VMS.  That's what I get paid for.  My
understanding of astronomy is purely at the amateur level (or below).  So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it.  If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.