procmail
[Top] [All Lists]

Re: date filtering of old messages

2003-01-22 13:18:25
On Wednesday, Jan 22, 2003, at 04:05 Canada/Mountain, pierre wrote:
I'd like to filter messages in my inbox according to date, i.e., automatically delete messages that are older than a given number of days.
I'm faced with two problems here :
a) how to filter messages that are already in my inbox

man procmail

Look toward the end for the formail example.

b) how to write up a suitable condition regarding the "age" of messages

Well, we just covered extracting the date from the From_ header, so all it takes is comparing that to the current date.

Regarding a) I am wondering, if there is no other way than to move away my mailbox, feed it to procmail, and have procmail recreate the mailbox, because I see (maybe wrongly) the risk of loosing my mailbox, if anything goes wrong between the moving step and procmail's rewriting of the mailbox..

`man procmail` covers this exact condition.

--
Though it's cold and lonely in the deep dark night I can see paradise by the dashboard light.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail