Spamassassin 2010 bugfix
January 1, 2010 in Coding Mines, Open Source by Freaking Wildchild
I came home after newyear and was flabbergasted as soon as I saw, I had no mail! With exception of my whitelist, which is bitter small. After reading Slashdot, I’ve noticed Spamassassin has a 2010 bug, dropping legit mails to spam or nowhere; depending on the account settings.
There are two ways to fix this by hand; to keep the ability to thwart mails coming from the future (after 2014 in this case):
Step 1: edit the ruleset file.
- With root privileges: Edit the file /usr/share/spamassassin/72_active.cf
- Without root privileges: Add to the file ~/.spamassassin/user_prefs
Step 2: find/add or change FH_DATE_PAST_20XX:
##{ FH_DATE_PAST_20XX
header FH_DATE_PAST_20XX Date =~ /20(1[4-9]|[2-9][0-9])/ [if-unset: 2006]
describe FH_DATE_PAST_20XX The date is grossly in the future.
##} FH_DATE_PAST_20XX
I wish variables could be used in regexps like these, like $year + 2 would be a nice start….
Alternative Step: Automatic update of rulesets
The Spamassassin rules can be updated automatically by executing the following command:
- any unix system: sa-update && /etc/init.d/spamassassin reload
- Directadmin: /usr/local/directadmin/scripts/packages/Mail-SpamAssassin-3.2.5/sa-update && /etc/init.d/spamassassin reload
- admispconfig: /usr/local/admispconfig/ispconfig/tools/spamassassin/usr/bin/sa-update && /etc/init.d/spamassassin reload
Enjoy your mail without spam coming from the future!
02/jan/2010: Thanks go to mike for the even more-fine-grain regexp: 20(1[4-9]|[2-9][0-9])/

