SpamAssassin fails to run with Systemd but works at CLI
0
votes
1
answer
59
views
I am trying to setup SpamAssassin on my mail server (Rocky Linux 9.5). Just a basic setup!
This is the options variable at `
/etc/sysconfig/spamassassin
`:
SPAMDOPTIONS="-d -c -m5 -H --create-prefs --max-children 2 -u spamd -g spamd --socketpath=/var/lib/spamassassin/spamd.sock --socketowner=spamd --socketgroup=spamd --socketmode=0666 -s /var/log/spamd.log --debug"
> `--debug
` was added temporarity
When I start SpamAssassin using `systemctl
`, it exits with random errors and systemd restarts it again, I put the truncated log below:
.
.
Fri Feb 14 19:59:03 2025 info: spamd: server successfully spawned child process, pid 2135
Fri Feb 14 19:59:03 2025 dbg: prefork: child 2135: entering state 0
Fri Feb 14 19:59:03 2025 dbg: prefork: new lowest idle kid: none
Fri Feb 14 19:59:03 2025 dbg: spamd: Privilege de-escalation from user 0 and groups 0
Fri Feb 14 19:59:03 2025 dbg: spamd: setgid ERRNO is
Fri Feb 14 19:59:03 2025 dbg: util: get_user_groups: uid is 98
Fri Feb 14 19:59:03 2025 info: spamd: server successfully spawned child process, pid 2136
Fri Feb 14 19:59:03 2025 dbg: prefork: child 2136: entering state 0
Fri Feb 14 19:59:03 2025 dbg: prefork: new lowest idle kid: none
Fri Feb 14 19:59:03 2025 dbg: spamd: Privilege de-escalation from user 0 and groups 0
Fri Feb 14 19:59:03 2025 dbg: spamd: setgid ERRNO is
Fri Feb 14 19:59:03 2025 dbg: util: get_user_groups: uid is 98
Fri Feb 14 19:59:03 2025 info: spamd: server killed by SIGTERM, shutting down
Fri Feb 14 19:59:04 2025 dbg: logger: successfully added file method
.
.
I decided to use the following command and run `spamd
from
cli
` both foreground and daemonized, it worked flawlessly!
sudo -u spamd -- spamd -c -m5 -H --create-prefs --max-children 2 -u spamd -g spamd --socketpath=/var/lib/spamassassin/spamd.sock --socketowner=spamd --socketgroup=spamd --socketmode=0666 -s /var/log/spamd.log --debug
It also works correctly without `sudo
`!
Has anyone ran into similar issue with SpamAssassin or any other services?
Asked by Ali Sarbanha
(1 rep)
Feb 14, 2025, 07:23 PM
Last activity: Feb 14, 2025, 09:18 PM
Last activity: Feb 14, 2025, 09:18 PM