Is there a way to get postprocess several mailboxes (with different
owners) to delete any messages that are more than 30 days old, leaving
the recent messages intact?
A search of the list archives led me to the example in the procmail man
page of a bash script that works for a single user account. I've written
a Perl script that writes an /etc/procmailrc file containing the
following recipe:
VERBOSE=yes
#MAILDIR=$HOME/Msgs
PMDIR=$HOME/Procmail
LOGFILE=$PMDIR/log
:0
* !^Received: .*Fri, 31 Aug 2001.*
[ ... and all the days in between ... ]
* !^Received: .*Wed, 1 Aug 2001.*
/dev/null
The Perl script also generates a slightly modified version of the
example from the man pages, that will loop over all the mailboxes in
/var/spool/mail/.
The trouble is that all mail always gets forwarded to the root account
(the account from which the scripts are run).
I've considered using the procmail recipe to forward mail to the
appropriate account, by having the Perl script write a different one
according to the mailbox that is being processed, but surely this will
change the Received date.
Do I have any option other than to do this and delete mail based on its
Date field instead?
--
My brain hurts!
SeanC
University of Zululand
Network Services Unit
Phone: 035 902 6081
Fax: 035 902 6028
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail