procmail
[Top] [All Lists]

Re: removing old messages from mboxes

2001-07-17 23:26:44
On Tue, Jul 17, 2001 at 06:10:14PM -0400, Fernan Aguero wrote:
From reading the archives I noticed that this topic has been discussed in
the past and that mbox is not easy to work with for the task of removing
old messages. If I find that this is the case, is it easy to move all my
mboxes to maildir? Any tool at hand to do this?

I'd say converting to maildir is will make the task of purging old messages
based on their age much easier. A simple shell script should be able to take
care of this for you, rather than procmail.
As for converting from mbox to maildir, that's easy:

        cat mbox-file | formail -s procmail procmailrc-file

Where procmailrc-file contains a recipe something like this:

        :0
        /path/to/mail/dir/


Obviously you can throw a condition in there, with appropriate paths, so you
can use the same rc file for each of the mailboxes you wish to so convert.
The original mbox will still exist at that point, but you can archive it or
delete it or whatever you want to do with it.

-- 
Every man should know how to make at least one drink from a foreign country,
preferably one taught to him by a local female with whom he has had a
complicated, unresolved, and quite possibly dangerous dalliance.
_______________________________________________
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>