Upgrading Spamassassin on FreeBSD outside of ports tree

By | February 15, 2014

Unsure of the future implications of this but as it’s been a few days and there are no signs of a upgrade I’m taking a flyer…

Download and extract spamassassin from Website

cd ~
fetch http://apache.mirrors.timporter.net//spamassassin/source/Mail-SpamAssassin-3.4.0.tar.gz
tar -zvxf Mail-SpamAssassin-3.4.0.tar.gz
cd Mail-SpamAssassin-3.4.0

Create make file

perl Makefile.PL

Make SpamAssassin

make
make install

SpamAssassin no longer comes with rules in the tarball so you have to download them yourselve…

sa-update -D

Restart amavsid-new if require

service amavisd restart

Monitor logs!

A week or so after performing this update I realised my sa-updating script wasn’t completing successfully, failing on GPG verification.

I’ve also just noticed the config files in /usr/local/etc/mail/spamassassin are being ignored and files in /etc/mail/spamassassin were being used. Take more care next time where its going to be installed!

Consider using the following next time?

perl Makefile.PL PREFIX=/usr/local/

I needed to re-import Sought Rule Yerp (and maybe SpamAssassin’s?) so I performed the following on both servers and my sa-updating script started competing successfully again.

fetch http://spamassassin.apache.org/updates/GPG.KEY && sa-update --import GPG.KEY
fetch http://yerp.org/rules/GPG.KEY && sa-update --import GPG.KEY

A way to check if our servers have reloaded amavisd recently is to grep the log for HUP
grep ‘HUP’ /var/log/amavisd.log