Why do I see an increased number of false positives since 1.1.2010 when using SpamAssassin on OS X?

Why do I see an increased number of false positives since 1.1.2010 when using SpamAssassin on OS X?

A specific rule (FH_DATE_PAST_20XX contained in 72_active.cf) that comes with SpamAssassin >= 3.2.0 was meant to recognise as spam, mails which would contain a date in the far future (i.e. >= 2010). While a good idea a few years ago, it now causes all mails sent in 2010 to receive an increased spam score.

Best case, this will simply mark mails as spam. Worst case, mails may be discarded. Thus, it is important that you fix the issue on your server immediately.

This problem affects any version of OS X Server >= 10.4.x with or without manual updates of SpamAssassin.

To fix it, there are several options:

1. Run

sa-update

on your server. This will replace the rule with an updated one which postpones the problem to 2020. If you happen to have manually updated SpamAssassin yourself, make sure you check that your installation in

/usr/local/share/spamassassin

and the stock install in

/usr/share/spamassassin

are both updated.

2. Edit

/etc/mail/spamassassin/local.cf

and add

score FH_DATE_PAST_20XX 0

3. Issue the following commands to download a .cf file with the score correction from our server.

 cd /etc/mail/spamassassin
sudo curl -O http://downloads.topicdesk.com/docextras/z_td_scorepatches.cf
sudo /bin/launchctl unload /System/Library/LaunchDaemons/org.amavis.amavisd.plist
sudo /bin/launchctl load /System/Library/LaunchDaemons/org.amavis.amavisd.plist

This will place a file called

z_td_scorepatches.cf

into

/etc/mail/spamassassin

which contains the adjusted score for

FH_DATE_PAST_20XX

. The advantage of this method is that should

local.cf

be overwritten by an update, you still have the adjusted score in place.

Note: 2 & 3, will render an updated rule useless, so if you wish to update the rule and check for mails with a date >= 2020, use only method 1.

Thanks to Matthew for spotting and posting this first on Apple Discussions

More info can be found on the SpamAssassin homepage.