procmail
[Top] [All Lists]

Re: [ANN] mktime.inc (v1.02, 2005-12-20)

2005-01-19 20:33:14
Toen wij Dallman Ross kietelden, kwam er dit uit:
Ruud H.G. van Tol:

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.

Yup.  I've been doing that for 2.5 years now with excellent
results.  I even have a time-zone calculation in there.

The v1.02 uses only the +hhmm timezone-corrections and ignores 
the comments like (CST).

Also, obsolete timezones (see rfc2822) like EST/EDT/CST/CDT/
MST/MDT/PST/PDT/1ALPHA are not used yet.

A time-without-seconds (which is allowd by rfc2822), or an 
obsolete 2-digit year, is also not suported yet. 

But all that will be added of course.


It took me the longest time to code it back when (all in
procmail, of course).

The mktime.c code was a nice source. I ported it to procmail 
last year, but didn't finish it. With just a few changes, it 
is much completer now.

It is 'just procmail' code. The date-call at the end is only 
there for debugging.

I also need to split it in a demo-mktime.rc and an mktime.inc, 
because now much dull work is done at the start of mktime.inc 
where it doesn't really belong. But it can be used as is.

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

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