[milters] Archive

Lists Index Date Thread Search

Article: 75
From: Anthony Howe
Date: 2009-08-27 12:10:51 -0400
Subject: Re: milter-date ignores -strict-date-syntax

Todd Lyons uttered...:
> It's from an Exchange server of some sort.  I've left a voicemail for
> the server admin to obtain more information about his setup.  I'll
> find out if it's his Exchange box or the MXLogic service they're
> sending through or the app that is generating the emails that is
> adding this improperly formatted header.
> 
> Aug 25 07:49:11 smtp4 sendmail[22683]: n7PEmtiU022683:
> to=<chris@meinecke-richards.com>, delay=00:00:01, pri=67537, stat="Tue
> Aug 25 09:48:47 CDT 2009" does not conform to RFC 2822 section 3.3.
> Date and Time Specification

It would be helpful to know the MUA/MTA that generated this time stamp.
If this is a commercial application, then they need to be notified of
the problem.

> Test results below, it would be accepted if the year and the timezone
> were swapped.

Nope. That would be broken. The whole point of only allowing RFC 822,
2822, 5322 time stamps and ctime() format is because those have been
historically used in the past.

The whole point about checking for date conformance is because spamware
is sloppy about conformance. One would expect developers writing mail
applications to adhere to standards.

It is most likely some web application that is incorrectly coded.

>> Currently convertDate supports the following:
>>  * This conforms:       Sun, 21 Sep 2003 22:04:27 +0200

RFC 2822, 5322 (time zones numeric)

>>  * Obsolete form:       Sun, 21 Sep 03 11:30:38 GMT     (named zone)

RFC 822 (time zone names)

>>  * Wrong, supported:    Mon Sep 22 01:39:09 2003 -0000  (ctime() + zone)

ctime() with time zone appended (numeric or alpha).

>>  * Not supported:       Mon,22 Sep 2003 20:02:33 PM     (AM/PM not zones)

Incorrect, missing time zone. Not accepted.

>>  * The following formats are supported:
>>  *      [www[,]] dd mmm yyyy [HH:MM:SS [zzzzzz]]
>>  *      [www[,]] mmm dd HH:MM:SS yyyy [zzzzzz]
> 
> Good to know, there is a pattern in there that I didn't know the
> milter would accept.

I dropped the need for strict-date-syntax option, by simply making
convertDate()in libsnert more aware of three common variations as
outlined above.

>> It might be the case that the list of time zone names is incomplete or
>> no longer used as mentioned here
>> http://www.worldtimezone.com/wtz-names/timezonenames.html
> 
> I could swear I read in an email on the archive that it had to be an
> offset from GMT, not a named timezone.  I'm glad to see that's a

For current RFC conformance, it should be a numeric offset from GMT. But
 for historical reasons, RFC 822, named time zones are still supported.

> misunderstanding on my part, and verified by testing the
> aforementioned rejected Date header with the year and timezone simply
> swapped:
> 
> [rpmbuild@telesto util]$ ./convertDate -v 'Tue Aug 25 09:48:47 2009 CDT'
> 1251211727	 "Tue Aug 25 09:48:47 2009 CDT"	 28

-- 
Anthony C Howe            Skype: SirWumpus                  SnertSoft
+33 6 11 89 73 78       Twitter: SirWumpus      BarricadeMX & Milters
http://snert.com/      http://nanozen.info/     http://snertsoft.com/

Lists Index Date Thread Search