6

I have just upgraded a server from Ubuntu 14.04 LTS to 16.04 LTS.

My issue is that now upon reboot, neither Postfix nor Spamassassin are running.

There are init.d scripts for both these services and the services do start if I manually run commands like

sudo service postfix start
sudo /etc/init.d/postfix
sudo service spamassassin start
sudo /etc/init.d/spamassassin

and there are all the appropriate symlinks from /etc/rc[0123456].d/ to the init.d scripts.

After boot, there are no 'postfix', 'spamassassin' or 'spamd' entries in /var/log/mail.log or /var/log/syslog until I manually start Postfix and Spamassassin.

Update (2016_09_04): It seems that Postfix does start eventually (after 4 or 5 minutes) if not immediately. However, even 45 minutes after a reboot, spamd is still not running but starts immediately following 'sudo service spamassassin start'.

0

2 Answers 2

10

Solved: The missing piece was

systemctl enable spamassassin.service
4

Ubuntu 16.04 uses systemd so you need to change your commands to the systemd versions. On systemd systems you use ...

systemctl COMMAND SERVICE

This to list all available services:

systemctl list-units --type=service --all

So for postfix that would be ...

systemctl start postfix.service

And logging is done with

journalctl -u postfix

Same applies for spamassassin.

2
  • Either you misunderstand my issue or I misunderstand your answer. My issue is not with the commands to manually start/stop services. My issue (currently) is that spamassassin doesn't start automatically following a system restart. Commented Sep 5, 2016 at 16:22
  • When spamassassin is installed on Ubuntu 16.04 via 'apt-get install spamassassin', a SYSV init.d script is installed in /etc/init.d/spamassassin. My understanding is systemd should handle those scripts and it apparently does as I have lots of them and the manual stop/start commands work and the services that are supposed to start automatically on reboot all do, except spamassassin. Commented Sep 5, 2016 at 16:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .