procmail
[Top] [All Lists]

Re: Auto removal of older mail

1998-05-06 14:31:00
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.

One stumbling block is defining the "age" of a message, especially when it is
stored in a plain folder with other messages.  I wouldn't go by the Date:
header as (1) you could have been sent a redirected or resent copy later, (2)
many, many originating systems have their clocks or calendars misset, and (3)
there is no standard for timezone mnemonics (and for that matter, many
originating systems use the wrong one, or the wrong numeric offset).  The
receipt date in the From_ line is more reliable.

The age of a message stored in its own file a la MH can almost always be
determined by its ctime.

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