Periodically, I see the following in syslog:
systemd[1]: spamassassin.service: Main process exited, code=exited, status=255/n/a
systemd[1]: spamassassin.service: Unit entered failed state.
systemd[1]: spamassassin.service: Failed with result 'exit-code'.
but the service does not automatically restart. It does start successfully with:
sudo service spamassassin restart
Can I configure spamassassin to restart automatically after it fails?
The manpage for systemd.service has the answer. For my particular case, the simplest solution was to add:
to the [Service] section of /lib/systemd/system/spamassassin.service
But there are more sophisticated controls available to limit restarts, should a failure loop occur.