|Sat 1998-06-27 dattier(_at_)wwa(_dot_)com (David W. Tamkin) list.procmail
| Stathy Touloumis asked,
|
| | Is there any way to backup mail say to a single file but prevent it from
| | backing up a certain number of files?
|
| It can be done with a single flat folder as well, and there should be answers
| in the list archives, because the question has come up before.
There are not that many pointers. Here is what I have recorded:
jari
32.2 Expire mail pointers
"Perl mail expire"
http://www.oasis.leo.org/perl/scripts/net/mail/expire_mail.dsc.html
Phil Male <phil(_at_)compnews(_dot_)co(_dot_)uk>
...This program removes old messages from system mailboxes. It
assumes the format of mailboxes to be standard sendmail format mail
with a blank line followed by a `From ' line starting each and
every message. Mailbox locking is via flock. Works under SunOS.
"Sh expire mail"
<URL:http://www.rosat.mpe-garching.mpg.de/mailing-lists/procmail/1996-09/msg00141.html>
This script will delete messages older than $AGE days from the
mailbox specified on the command line. It requires that you have
formail installed on your system, and if formail is in a directory
other than /usr/bin, you must change the value of $FORMAIL.
<wravery(_at_)wravery(_dot_)student(_dot_)princeton(_dot_)edu>
"Gawk expire mail"
by Roman Czyborra <czyborra(_at_)cs(_dot_)tu-berlin(_dot_)de>
...Using GNU version 2.15 of awk: This filter deletes all messages
older than expire days from a Unix mailbox. Sample call: gawk -f
expire.awk expire=21 box > new && mv new box
[See old procmail archive, BestOfProcmail]
"pick -- Auto deleting old messages"
[Brian Dockter <brian(_at_)nds(_dot_)com>] ...Once the messages were in
the
correct folder, I would suggest using cron and mush. mush is able
to manipulate messages on a wide variety of criteria, but works
with them once they are already in the folder. Here is a command
which would delete all messages that are one week old or more:
pick -ago -1w | delete
IMHO, with procmail to do the pre-processing, and mush to do the
post-processing, I have an unbeatable mail combination.