Re: [exim-dev] Adding RFC 2822 date parsing code

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Dave Evans
Datum:  
To: exim-dev
Betreff: Re: [exim-dev] Adding RFC 2822 date parsing code
On Tue, Jun 03, 2008 at 12:25:34PM +0200, Michael Haardt wrote:
> Hello,
>
> are there any objections against adding parse_date_time() to parse.c for
> parsing RFC 2822 dates? I am still playing with how to use it best, but
> the parsing code is already finished and may be useful to others as well.
>
> One idea is to add an expansion variable that contains the difference
> between Resent-Date:/Date: and the current time. It shouldn't be far
> in the future and not more than a couple days in the past. Perhaps the
> time in seconds since 1970 may be more useful - any opinions?


I've found such a measure useful for spam filtering. I implemented something
similar using ${perl. I found that an incomplete parser (only looking for a
few commonly-used combinations of formats of the many that rfc2822 allows) was
good enough, for my use. i.e. I never saw any non-spam email use particularly
exotic formats.

I would suggest that an absolute seconds-since-epoch would be more useful than
a difference-from-now value.

As for whether/how to implement this within Exim, though, I couldn't say :-/

--
Dave Evans
http://djce.org.uk/
http://djce.org.uk/pgpkey