[BUG] Spamassassin service not enabled after installation

Richard G

Verified User
Joined
Jul 6, 2008
Messages
13,826
Location
Maastricht
I installed a fresh server but twice got a message from the DA system that the spamd service is down. Just remember this was after a reboot.

So I installed spamassassin for the 2nd time and then do a ps faux | grep spamd and oke it's running.
Now what is wrong then... well... looking further.... seems the spamd service isn't installed.

Code:
[root@server29: /usr/local/directadmin/custombuild]# service spamd status
Redirecting to /bin/systemctl status spamd.service
Unit spamd.service could not be found.

How to fix please?
It's an Almalinux 9 server.
 
Found the culprilt.

On insatllation for some reason the spamassassin service is not activated by DA, which is normally done by default and can't be called via the command I used either anymore (works on other servers with Almal 9).

So I now tried with service spamassasin status and that shows it's not enabled.
Code:
[root@server29: ~]# service spamassassin status
Redirecting to /bin/systemctl status spamassassin.service
● spamassassin.service - Spamassassin daemon
     Loaded: loaded (/etc/systemd/system/spamassassin.service; disabled; preset: disabled)

1.) connection from spamd command to spamassassin service is suddenly gone
2.) spamassassin service is not enabled by default after installation by DA.
3.) this is causing the message spamd is down.

This is all fixed when enabling the spamassassin service.

However, when enabling spamassassin service I get these notices:
Code:
Mar 15 14:35:13 server29.myserver.nl systemd[1]: /etc/systemd/system/spamassassin.service:7: PIDFile= references a path below legacy directory /var/>
Mar 15 14:35:13 server29.myserver.nl systemd[1]: /etc/systemd/system/spamassassin.service:9: Standard output type syslog is obsolete, automatically >
Mar 15 14:35:13 server29.myserver.nl systemd[1]: /etc/systemd/system/spamassassin.service:10: Standard output type syslog is obsolete, automaticall
I don't see the complete output of this, so i don't know what is causing this.

It's gone now. Don't know if this is because I restarted spamassassin or becasue I copied all configs from another server.

Anyway, service is not enabled by default on installation, that should be fixed.
 
Last edited:
Hello Richard,

Found the same issue on old installations as well, where SpamAssassin was missing and installed by me just now. I had to run:

Code:
systemctl enable spamassassin

after the installation:

Bash:
# systemctl enable spamassassin
Created symlink /etc/systemd/system/spamd.service → /etc/systemd/system/spamassassin.service.
Created symlink /etc/systemd/system/multi-user.target.wants/spamassassin.service → /etc/systemd/system/spamassassin.service.
#

My guess is the following (not verified yet):

directadmin completes an installation of SpamAssassin and triggers:

Code:
systemctl enable spamd

which fails for Spamassassin, but is OK for rSpamd.

Thus DirectAdmin might need to differentiate cases with SpamAssassin and rSpamd.
 
Back
Top