Handling old mail
Barton E. Schaefer
schaefer at ogicse.ogc.edu
Thu Jul 5 11:57:12 AEST 1990
In article <1990Jul3.130104.18250 at dircon.uucp> sys0001 at dircon.uucp () writes:
} Can anyone suggest a program which will handle the ageing of mail?
}
} What I'm looking for is a program which looks at a user's mailbox file
} (in /usr/spool/mail) and transfers all messages older than, say, a month
} to a specified file in the user's own home directory.
If you have Mush, you write a script:
# Change home directory to match spool file
set home = "~$thisfolder:t"
# Collect the mail and save it to AGEDMAIL file
pick -ago -1 month | save $home/AGEDMAIL
# Update the folder and exit
quit
And then you invoke it thus:
mush -n! -u username -F agedmail-script
(or verbosely:
mush -noinit! -user username -source agedmail-script
for you Sun folks). This must be run by root to work successfully.
--
Bart Schaefer schaefer at cse.ogi.edu
More information about the Comp.unix.questions
mailing list