procmail
[Top] [All Lists]

Re: Expiring mailboxes?

2000-10-29 18:37:40
On Sun, 29 Oct 2000, Shawn Barnhart wrote:
I often find myself subscribing to mailing lists only to not be able to
"keep up" with the list on a daily basis.  I use procmail to filter list
mail into its own box but I always find myself with way more mail than I
can ever keep up with.  Actually forgetting about the list for a week or
so leads to hundreds or more mail messages built up.

Ouch... I try to step through all the mailinglist folders at least once a
day (and deleting everything that looks nonimportant (eg endless
discussions) unless I got the time to read it)... With pine it's quuite
simple to set up a thing like that... I love the interaction between
procmail and pine's INCOMING FOLDERS. :-)

But then I also have procmail do a incoming mailfolder based on the month
(and the year)... :-)

Has anyone cobbled together a way to "expire" mailboxes the same way
that usenet groups expire?  Ie, run a script against a set of mailboxes
and periodically kill off all mail older than a certain time or more
than N messages?

Hmm... I have two suggestions that you might find useable:
* Use maildirs. Then it's easy to write a script to remove the old mails:
   find maildir -atime +7 | while read f;do rm -f "$f";done

* Use find from procmail to move the outdated inbox(s) (and deleting any
     previous folder(s)) before writing the new mail:
   find mail -ctime +7 | while read f;do mv -f "$f" "$f".old;done

-- 
And as we stand on the edge of darkness
Let our chant fill the void
That others may know

        In the land of the night
        The ship of the sun
        Is drawn by
        The grateful dead.
                -- Tibetan "Book of the Dead," ca. 4000 BC.


_______________________________________________
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>