procmail
[Top] [All Lists]

Re: archiving all but 100 newest messages to other folder

2001-04-17 08:37:06
Ben asked,

| can I use procmail/formail to keep only 100 messages in an mbox file and
| move all others to another folder?

If the messages were in individual files in a given directory Ben could use
something like Matt's suggestion, but they're in an mbox file.

So that brings up the big questions.  First, should the 100 messages that
stay where they are be counted from the bottom or the top of the current
mbox?  Second, should the routine be rerun with every new message, with every
nth new message (say, if n=10, that means that 109 messages are allowed but
when the 110th comes in ten of them are moved to the archive folder), or at
preset times (called from cron, for example)?

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