This is part 2 of my series on mail servers on Debian 6/Ubuntu 10.04, it should work on other versions of each though. Part 1 is available here.
SpamAssassin
First off we’ll get SpamAssassin installed and configured.
sudo apt-get install spamassassin
We’ll be configuring SpamAssassin as a daemon that Postfix interfaces with using spamc.
SpamAssassin on Debian and Ubuntu runs as root which is NOT a good thing so we’ll need to make some changes.
We’ll add a group called spamd with GID**5001**.
sudo groupadd -g 5001 spamd
Next we add a user spamd with UID 5001 and add it to the spamd group, as well as set it’s home directory as /var/lib/spamassassin and make sure it has no shell access or SSH access.
sudo useradd -u 5001 -g spamd -s /usr/sbin/nologin -d /var/lib/spamassassin spamd
Now …