[clue-talk] Deleting old messages from an mbox file

Jed S. Baer thag at frii.com
Mon Mar 7 17:36:51 MST 2005


On Mon, 07 Mar 2005 17:26:23 -0500
Angelo Bertolli wrote:

> Are there any utilities that can be used to delete old messages from an 
> mbox file (given a certain date)?  I found archivemail, but I was 
> wondering if there was a (better?) way to do this with more standard 
> tools.  I would like to be able to clean out certain mailboxes that 
> collect spam automatically for any message that's 2 weeks old or older.

You might want to look at formail. Don't know how it would work selecting
by date, but if nothing else, you could split the mbox file, pipe through
awk or perl to ignore messages older than n days, and recombine them on
the back end.

jed
-- 
http://s88369986.onlinehome.us/freedomsight/
Key fingerprint = B027 FEFB 4281 CC72 67D1  4237 F2D0 D356 077A A30E
... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier



More information about the clue-talk mailing list