procmail
[Top] [All Lists]

Re: Auto removal of older mail

1998-05-07 03:47:35
David W. Tamkin writes:
Lars Kellogg-Stedman appended this to his advice for Bryan fron Talent
Management,

| Note for sticklers: yes, someone has written a procmail filter that will
| "delete" messages older than a certain date.  It works by taking your 
mailbox,
| re-filtering it (discarding older messages), and then putting your mailbox
| back.  I think this is an ugly, resource intensive solution.  I don't know
| how robust it was -- it showed up on this list some time ago.

With proper locking, it can be as robust as needed.

I've never done anything like that, but if you don't or can't use MH, there
is really no alternative.  It needn't be terribly resource-intensive.

 Not too sure, I have written such a filter as an exercise. It uses
 formail to extract the date from the From_ line, and GNU date '+%s'
 to get the date information into a format than can easily be compared.
 Usage:
$ formail -s procmail -Y -m ./rc.filt < mbox

 And it is dead slow, it takes around two minutes for a 100k/100 msg
 mailbox on an unloaded SPARCstation 4/110.

-- 
Lars Hecking lhecking at nmrc.ucc.ie adama at flare.dynip.com
RH 5.0/m68k 2.0.33pl1
PGP: 55 0C 8F 76 B7 30 9F 48  23 C5 3C BF B7 9D D8 DC
Please do not Cc: me on list replies.

<Prev in Thread] Current Thread [Next in Thread>