[Unit] Description=spamassassin housekeeping stuff [Service] #User=spamd #Group=spamd Type=oneshot # remove --allowplugins, if you do not want plugin updates from SA. ExecStart=/bin/sh -c '/usr/bin/vendor_perl/sa-update --allowplugins && {\ /usr/bin/vendor_perl/sa-compile --quiet;\ /usr/bin/systemctl -q --no-block try-restart spamassassin.service; }' SuccessExitStatus=1 # uncomment the following ExecStart line to train SA's bayes filter # and specify the path to the mailbox that contains spam email(s) #ExecStart=/usr/bin/vendor_perl/sa-learn --spam