At 01:32 2007-02-07 +0100, Dallman Ross wrote:
Not sure why you want to do that, since dates more than an hour
in the future are very reasonable indicators of likely spam,
if the party sending is not in one's whitelist.
Or just some retard who doesn't know how to set their system date...
I personally wouldn't fix a screwy date header. I've got a number of
reasons, but one that might have gone unnoticed by the OP is that REPLIES
and FORWARDS of such messages will not correllate properly to the original
message. Incl. when you're on a list and the attribution would help
someone find the original post in their own mailbox. If you've tweaked the
date your MUA sees, then any datestamp in the attribution is going to be
wonked.
But basically, your algorithm is, you need to look at the date
and figure it out somehow. It's not that easy to do in procmail,
but I do do it. I have a complex set of recipes that look just
for that. It's not something I'd want to publish in full, however.
You could, alternatively, use GNU date to compare the date with
the current one.
Or, as has been done for checking dates for spammyness: use the date from
the envelope. A benefit this has is that if you're reprocessing saved
messages, the date comparison will still be good, whereas you're
introducing significant skew if you compare it against the then-current
system time.
There's a recipe or two in the list archives. Search on DATE_SECS for
one. Mine uses gnu date to get a seconds count from the Date: header and
the From_ header, then uses scoring to compare the two and see if a
threshold is crossed.
---
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 homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail