1

I'm trying to build an email server based on Ubuntu, and I want to run SpamAssassin on it. I've followed the instructions, installed it from the repositories, and when I try to start SpamAssassin I get an error message like the following:

Job for spamassassin.service failed because the control process exited with error code.

See "systemctl status spamassassin.service" and "journalctl -xe" for details.

Running sudo systemctl status spamassassin.service gets me the following:

Feb 02 01:43:46 grace systemd[1]: spamassassin.service: Service RestartSec=100ms expired, scheduling restart.
Feb 02 01:43:46 grace systemd[1]: spamassassin.service: Scheduled restart job, restart counter is at 5.
Feb 02 01:43:46 grace systemd[1]: Stopped Perl-based spam filter using text analysis.
Feb 02 01:43:46 grace systemd[1]: spamassassin.service: Start request repeated too quickly.
Feb 02 01:43:46 grace systemd[1]: spamassassin.service: Failed with result 'exit-code'.
Feb 02 01:43:46 grace systemd[1]: Failed to start Perl-based spam filter using text analysis.

I've tried stopping the service and starting it as well as simply restarting it, but it doesn't make a difference. I can't figure out what's going on.

1 Answers1

2

If you are following this Ars Technica guide, then you probably have /etc/default/spamassassin looking like this:

SAHOME="/var/lib/spamassassin"
SAGLOBALCFGPATH="/etc/spamassassin"

# Change to one to enable spamd
ENABLED=1

# Options
# See man spamd for possible options. The -d option is automatically added.
OPTIONS="-x --max-children 5 --helper-home-dir ${SAHOME} -u spamd -g spamd --siteconfigpath ${SAGLOBALCFGPATH} --socketpath=/var/spool/postfix/spamassassin/spamd.sock --socketowner=spamd --socketgroup=spamd --socketmode=0660"

# 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/spamd.pid"

# Cronjob
# Set to anything but 0 to enable the cron job to automatically update
# spamassassin's rules on a nightly basis
CRON=1

The path expansions of SAHOME and SAGLOBALCFGPATH are failing, so change this file so that it includes the full paths:

# Change to one to enable spamd
ENABLED=1

# Options
# See man spamd for possible options. The -d option is automatically added.
OPTIONS="-x --max-children 5 --helper-home-dir /var/lib/spamassassin -u spamd -g spamd --siteconfigpath /etc/spamassassin --socketpath=/var/spool/postfix/spamassassin/spamd.sock --socketowner=spamd --socketgroup=spamd --socketmode=0660"

# 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/spamd.pid"

# Cronjob
# Set to anything but 0 to enable the cron job to automatically update
# spamassassin's rules on a nightly basis
CRON=1