procmail
[Top] [All Lists]

Re: Date adjustment script

2003-09-11 13:44:32
At 20:53 2003-09-11 +0200, daniel.poelzleithner wrote:

You can find the script at http://files.poelzi.org/procmail/testdate.py
The procmail rules you need are in the documentation.

please report bugs you found :)

You might want to check the archives for the discussions about using the Date: header against the date data in the From_ header to determine if the mail is suspect or not. On those messages which have had stale, advanced, or completely invalid date headers, it's been quite useful.

IMO, one shouldn't "fix" the date, since more than likely, you'll be bringing it into your timezone (not that of the sender) -- the date header should reflect the attributes of the sender, not the recipient. This holds especially true if you ever FORWARD one of these messages.

Excepting for the 'date' command itself, the entire operation of comparing dates for staleness/advancement/basic validity can be performed from within procmail - no external scripting language is necessary.

You should also note that some external scripting languages can incurr a _significant_ CPU and memory load. I don't use Python since I'm familiar with Perl and C/C++ and haven't seen anything compelling in Python, but you should definatley benchmark the processing time against a large mailbox with and without calls to your Python script to see what sort of overhead you're adding.

AWK is a language which for example has a tremendous CPU load considering what it accomplishes.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.


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