How to get spamassassin running / initialize spamassassin.service

SYSTEM INFORMATION
OS type and version Debian 12
Virtualmin version 7.40.1

At some point spamassassin was running (ps -aux | grep spam did show 2 spam child).

But whenever I added a blacklist spam address and then clicked the “Apply Changes” button, I would get the error:

Failed to apply changes :

sh: 1: /etc/init.d/spamassassin: not found


So, I stopped spamassassin

Oct 04 19:32:49 love.com systemd[1]: Stopping spamd.service - Perl-based spam filter using text analysis…
Oct 04 19:32:49 love.com spamd[3878515]: prefork: child states: II [… logline repeated 32 times]
Oct 04 19:32:49 love.com spamd[3878515]: spamd: server killed by SIGTERM, shutting down
Oct 04 19:32:49 love.com systemd[1]: spamd.service: Deactivated successfully.
Oct 04 19:32:49 love.com systemd[1]: Stopped spamd.service - Perl-based spam filter using text analysis.
Oct 04 19:32:49 love.com systemd[1]: spamd.service: Consumed 9min 30.629s CPU time.

Oct 04 19:46:14 love.com spamc[1207224]: connect to spamd on ::1 failed, retrying (#1 of 3): Connection refused
Oct 04 19:46:14 love.com spamc[1207224]: connect to spamd on 127.0.0.1 failed, retrying (#1 of 3): Connection refused
Oct 04 19:46:15 love.com spamc[1207224]: connect to spamd on ::1 failed, retrying (#2 of 3): Connection refused
Oct 04 19:46:15 love.com spamc[1207224]: connect to spamd on 127.0.0.1 failed, retrying (#2 of 3): Connection refused


when I try to restart spamassassin with systemctl enable or restart spamassassin, I get the error:

root@love:~# systemctl enable spamassassin
Failed to enable unit: Unit file spamassassin.service does not exist.


ss -tlnp | grep 783

gives no result


How do I get spamassassin running and a working service file?

the service you want to start is called spamd not spamassassin.
try

 systemctl status spamd 

to see it’s status

1 Like

Thanks! I forgot what the proper daemon was.

I restarted spamd with systemctl restart spamd


I still have my original problem of clicking the “Apply Changes” button when in Webmin > Servers > Spamassassin and it gets the error

“sh: 1:/etc/init.d/spamassassin: not found”

Should I open a new thread for that or can we continue on this one?

look at the spamassassin module configuration

what do you have in the 2 arrowed boxes ?

Gosh, I’ve looked for 15 minutes trying to find that Configuration panel in Webmin that you’ve posted above.

Could you help me out with how to navigate to that Configuration panel for SpamAssassin?

Hit the cog on the left of the module home screen cog = settings

Ah! Thanks a bunch!

I found the cog and saw that the “Command to restart processes” wasn’t “systemctl restart spamd”

Changed to systemctl restart spamd → success! No error when sending HUP signal.

Thanks a bunch @jimr1!