[milters] Archive

Lists Index Date Thread Search

Article: 748
From: Anthony Howe
Date: 2005-11-06 04:26:48 -0500
Subject: Re: milter-date

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support
--------------------------------------------------------

Marc Dirix wrote:
> I've come accross this notice in my maillog where milter-date gave falls
> positiv (as seen from the user). Is this a milter-date problem or
> a bad mailserver setup? The date time header is in "dutch"

The Date header can NOT be in dutch according to RFC 2822 section 3.3. 
Date and Time Specification. Its explicitly defined to be in English.

http://www.rfc-editor.org/cgi-bin/rfcdoctype.pl?loc=RFC&letsgo=2822&type=http&file_format=txt

An MTA that specifies the day of the week in anything other than a 3 
letter English abbreviation does not conform. An MUA that creates a 
message with a Date: header where the day-of-week is in the user's 
current locale does not conform either.

> Nov  4 10:55:14 beta milter-date[12650]: 04786 jA49t8RO018234: day of
> the month is not a number

Hmm. This error message is misleading w.r.t. the actual error..

> Nov  4 10:55:14 beta sm-mta[18234]: jA49t8RO018234: Milter: data,
> reject=550 5.7.1 " vr, 04 nov 2005 10:56:29 +0100" does not conform to 
> RFC 2822 section 3.3. Date and Time Specification

The above is clearly not correct; you cannot have a day-of-week name in 
the user's locale and not the month. The Date: header is intended to be
both human (by postmasters) and machine readable. If the Date: where 
intended to be simply a display header for humans only (like teh 
Subject:), then it could be formatted according to the users locale in 
all manner of ways.

However, I'm willing to weaken (for the sake of my sanity) the RFC 2822 
day-of-week parsing requirements ie. optional or non-English, since the 
information could be considered supplemental. Its only utility is to 
detect instances where a spammer would put something really bizarro in 
the date header.

I've broke out the convertDateToGMT code into a test CLI.

BEFORE

$ convertDateToGMT.exe -S -v "vr, 04 nov 2005 10:56:29 +0100"
convertDateToGMT: date=vr, 04 nov 2005 10:56:29 +0100
convertDateToGMT: day-of-week missing or not english
convertDateToGMT: "vr, 04 nov 2005 10:56:29 +0100" does not conform to 
RFC 2822 section 3.3. Date and Time Specification

AFTER

$ convertDateToGMT.exe -v "vr, 04 nov 2005 10:56:29 +0100"
convertDateToGMT: date=vr, 04 nov 2005 10:56:29 +0100
convertDateToGMT: day-of-week missing or not english, ignoring
convertDateToGMT: date= 04 nov 2005 10:56:29 +0100 day=-1 format=0
convertDateToGMT: date= nov 2005 10:56:29 +0100 day=4
convertDateToGMT: date=2005 10:56:29 +0100 month=10
convertDateToGMT: date= 10:56:29 +0100 year=2005
convertDateToGMT: date=:56:29 +0100 hour=10
convertDateToGMT: date=:29 +0100 minute=56
convertDateToGMT: date=+0100 second=29
convertDateToGMT: date= zone=100
convertDateToGMT: date= yday=307
convertDateToGMT: date= time=1131098189
1131098189       "vr, 04 nov 2005 10:56:29 +0100"

There will be an update available later today.

-- 
Anthony C Howe                                 +33 6 11 89 73 78
http://www.snert.com/       ICQ:
7116561         AIM: Sir Wumpus

Sendmail Anti-Spam Solutions           http://www.snertsoft.com/
                                             We Serve Your Server

Lists Index Date Thread Search