One cause of this error might be a non existing PID-File.
To know where to search the PID-File for Spamassassin look at /etc/default/spamassassin:
# Pid file
# Where should spamd write its PID to file? If you use the -u or
# --username option above, this needs to be writable by that user.
# Otherwise, the init script will not be able to shut spamd down.
PIDFILE="/var/run/spamassasin/spamd.pid"
There is the path given where the PID-File shall be stored.
Lets see if it exists and if its writable for the user running spamd:
ls -l /var/run/spamassasin
et voilĂ , in my case with Ubuntu 10.04 Server the folder was missing.
So I just created a new one.
sudo mkdir /var/run/spamassasin
To finish this stop spamd by your own hand and restart it
sudo pgrep -l spam
1234 spamd
1235 spamd
1236 spamd
sudo kill 1234
# or as alternative
sudo killall spamd
sudo service spamassasin start
# or for older Ubuntu
sudo /etc/init.d/spamassassin start
Now the PID-File should be in Place and everything working well (hopefully).


