SA Bugzilla – Bug 4754
Mail sent during a leap second
Last modified: 2006-03-06 20:45:06 UTC
As you may know, there was a leap second a few days ago. During a leap second, the time is 23:59:60. Spamassassin thinks that a header like "Date: Sat, 31 Dec 2005 23:59:60 +0000" is an INVALID_DATE and so bumps the score of an email sent during that second up a bit. This bug was originally reported by Kevin Day to the NANOG mailing list, in msgid <C6CFD816-08B5-4B44-867C-A9E656A81DB6@dragondata.com> which can be seen at <http://www.merit.edu/mail.archives/nanog/msg14721.html>.
There seem to be two testing rules (T_INVALID_DATE and T_INVALID_DATE2) already that take the leap second into account correctly. However, both those test rules as well as the one currently in use seem to relax the RFC requirements a bit: all of them allow for am/pm specifiers and for a single-digit hour, which aren't allowed according to the rfc. Maybe this could also be checked for? For example (based on T_INVALID_DATE): header T_INVALID_DATE3 Date !~ /^\s*(?:(?i:Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s+)?[0-3\s]?[0-9]\s+(?i:Jan|Feb|Ma[ry]|Apr|Ju[nl]|Aug|Sep|Oct|Nov|Dec)\s+(?:[12][901])?[0-9]{2}\s+(?:[01][0-9]|2[0-3])\:[0-5][0-9](?:\:(?:[0-5][0-9]|60))?\s+(?:[+-][0-9]{4}|UT|[A-Z]{2,3}T)(?:\s+\(.*\))?\s*$/
Felicity checked in a a fixed version as T_INVALID_DATE in the felicity sandbox Author: felicity Date: Sat Dec 31 21:04:34 2005 New Revision: 360476 URL: http://svn.apache.org/viewcvs?rev=360476&view=rev Log: deal with leap seconds in INVALID_DATE, also try to be a little more strict to catch more spam Modified: spamassassin/rules/trunk/sandbox/felicity/70_other.cf
Moving to 3.2 since it's being worked on and can be closed once the test failures are fixed, if they aren't already.
yeah, this was fixed.