Spamassassin should be installed when we installed Amavis.
# dnf install spamassassin re2c
The default configuration suffices for standard use.
# systemctl start spamassassin # systemctl enable spamassassin
# wget "http://spamassassin.apache.org/updates/GPG.KEY" # sa-update --import GPG.KEY # rm GPG.KEY
After adding the spamassassin update channel, it needs to be updated. After running this command, check for any errors:
# sa-update -D
Once these updates have completed they need to be compiled for use with Spam Assassin. Also any errors should be spotted here:
# sa-compile
Unlike clamav, there is no 'freshassassin' and a cronjob is required to do updates. To keep Spam Assassin up to date, a cronjob should be created for the task:
# vi /etc/cron.daily/sa-updates #!/usr/bin/bash sa-update --reallyallowplugins --channel updates.spamassassin.org sa-compile # chmod +x /etc/cron.daily/sa-updates
Actually, Spam Assassin does not need to be linked to amavisd, it is an integral part of amavisd. Enabling the spamfilter in amavisd does spam filtering:
# vi /etc/amavisd.conf #@bypass_spam_checks_maps = (1); # controls running of anti-spam code # systemctl restart amavisd
When everthing works you can change the log_level in amavisd.conf.