procmail
[Top] [All Lists]

RE: 2 separate mailboxes for each mail list

2001-12-28 11:21:49


Oleg wrote (in part);
Sent: Friday, December 28, 2001 1:26 AM
What I'm trying to do is to keep archives of mailing lists apart from
recent posts. I already have my mail sorted by Procmail into separate
folders, now I want to split each folder in 2 - current mail stays in
current folder and all messages that are for at least 1 month old go
to a single gzipped file that I wouldn't use too often (just for a
reference).
I think of keeping something like <list name> and <list name>.arc.gz
for each subscribed mail list.

I had a similar goal: to keep relatively small mbox's with recent messages,
and a large archive of older messages. What I did was write a script that
runs every night, which checks the mbox'es to see if they have grown above a
certain high water mark (measured in messages), cut them back to a size
determined by a low water mark (I've found 200 to be a reasonable high water
mark, and  use 100 for the low water mark), and copy the excess messages to
an archive mailbox. Here's a pointer to the thread where the script I use is
listed:

http://www.rosat.mpe-garching.mpg.de/mailing-lists/procmail/2000-01/msg00175
.html

Disclaimer: that's a "csh" script, and really ought to be an "sh" script for
the purposes of portability and publication. Also, the script isn't too
speedy because it traverses each mbox and counts up the messages, using
formail.  Still, it works for me.

More interesting, might be to incorporate the ideas in that script, as a
delivery recipe, so that the process is done incrementally, rather than as a
batch.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>