With mktime.inc, you can calculate the number of seconds
since the epoch (1 Jan 1970 00:00) from a string like
"Fri, 31 Dec 2004 23:44:54 -0230 (TST)"
or from any header containing a date.
Example-1: use the From_header (falls back on the Date:header)
INCLUDERC = 'inc/mktime.inc'
Example-2: use the From_header (no fall-back)
mktime_Header = '^From '
INCLUDERC = 'inc/mktime.inc'
Example-3: use the Date:header
mktime_Header = 'Date:'
INCLUDERC = 'inc/mktime.inc'
Example-4: use the most recent Received:header
mktime_Header = 'Received:'
mktime_Count = 1
INCLUDERC = 'inc/mktime.inc'
Example-5: use the 2nd oldest Received:header
mktime_Header = 'Received:'
mktime_Count = -2
INCLUDERC = 'inc/mktime.inc'
Reports of any anomalies or unmet expectations
are of course welcome.
Advanced usage: calculate the difference (in seconds)
between the time-of-arrival (from the From_header) and
the time-of-creation (from the Date:header). If negative
or very large, then the Date:header is likely forged.
--
Grtz, Ruud
____________________________________________________________
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