This is an old revision of the document!


Table of Contents

Spamassassin

Setup on Debian for use with EXIM.

Install

apt-get install spamassassin sa-compile

Configure

Local

Edit /etc/spamassassin/local.cf to add local rules.

Compile

Compiling rules will speed up spamd but it will work otherwise.

compile-spamd.sh

#! /bin/sh
sa-compile
chown -R debian-spamd:debian-spamd /var/lib/spamassassin
chmod -R go-w,go+rX /var/lib/spamassassin/compiled
kill -HUP `cat /var/run/spamd.pid`
exit 0
Update

Run from cron once per day, week or month to download new rules and recompile.

update-spamd.sh

#! /bin/sh
sa-update --nogpg
compile-spamd.sh
exit 0

Run it

#! /bin/sh
export TZ="UTC"
rm -f /var/run/spamd.pid
exec /usr/sbin/spamd --helper-home-dir=/var/lib/spamassassin --create-prefs --nouser-config -udebian-spamd -gdebian-spamd --socketpath=/var/run/spamd.sock --socketowner=debian-spamd --socketgroup=debian-spamd --socketmode=0777 --max-children 5 --pidfile /var/run/spamd.pid
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies