It appears that it IS running as root?! OR maybe as "sa-milt" ... As root
I got this:
# ps auxwww | grep spamd
root 100805 0.0 0.3 158208 121164 ? Ss 00:37 0:05
/usr/bin/perl -T -w /usr/bin/spamd -c -m5 -H
--razor-home-dir=/var/lib/razor/ --razor-log-file=sys-syslog
# grep spam /etc/passwd
sa-milt:x:976:975:SpamAssassin
Milter:/var/lib/spamass-milter:/sbin/nologin
So... run it as sa-milt (my guess), or as root?
Note that this is on a Fedora Server v 38 - the OS is a couple of months
old
so your whole setup is more then questionable
give common sense a few seconds: do you REALLY want to process mails
containing junk and malware with root privileges?
Frankly, you make a good point and I was unawares! Back January we had a
system failure - nevermind the details - and had to reinstall the OS from
scratch, then updated when the new version came out... And I _swear_ I did
_NOT_ change anything regarding SA from the defaults not required to just
get it running. (We didn't lose /etc, so I just plunked the existing
Postfix config back in place and we were up and running!)
My guess is that this is the default on Fedora Server, however, I have
another system I can confirm that with - but not today, probably.
that below is Fedora 37, originally from 2014 cloned from our golden-master
VM dating back to 2008 with Fedora 9
not a single distro-systemd-unit in use - never
[root@mail-gw:~]$ ps auxwww | grep spam
sa-milt 436 0.0 1.2 69708 65192 ? SNs Jun16 11:09
/usr/bin/perl -T -w /usr/bin/spamd --max-children=1 --max-conn-per-child=1000
--local --socketpath=/run/spamd-debug/spamassassin.sock --socketmode=0666
--siteconfigpath=/etc/mail/spamassassin-debug --syslog=stderr 2>/dev/null
...OK, I get it!... I'm not sure "what went wrong" so we ended up with
this, but I'm also not sure what the short path is to fixing this issue.
There's already an sa-milt in /etc/passwd, but the files are all owned by
root - eg: the files in /usr/share/spamassassin Surely these would need to
be changed, one would think, and somewhere the code told to run as
sa-milt, which I presume isn't THAT hard to find, though I've never dealt
with it before.
THANKS for pointing this out!
Richard