procmail
[Top] [All Lists]

Re: pruning mbox's based on number of messages?

1999-12-12 01:14:01
On 11 December 1999, Gary Funck <gary(_at_)Intrepid(_dot_)Com> wrote:
I keep a number of mail box folders that track messages received from
various mailing lists.  However, the mail in each mbox can mount up,
and I'm interested in keepiing only, say, the last 100/so messages,
and archiving the rest, on a periodic basis.  A nightly cron job
would run that checks the number of messages in each mbox, and when
the total, N (for example 250), exceeds the threshold M (for example,
100), the script would copy the first N-M (eg, 150) messages to an
archived mailbox file, and leave only M messages in the current
contents of the mailbox.  Do you know of any procmail scripts that
already do something like that?

    Would Maildir folders simplify your problem?

    Regards,

    Liviu Daia

-- 
Dr. Liviu Daia               e-mail:   Liviu(_dot_)Daia(_at_)imar(_dot_)ro
Institute of Mathematics     web page: http://www.imar.ro/~daia
of the Romanian Academy      PGP key:  http://www.imar.ro/~daia/daia.asc