Mailing List Archive

spamd: still running as root
I have just updated Debian to Bookworm in order to install SA 4. Very
few problems so far but the postfix log is giving:

"spamd: still running as root: user not specified with -u, not found, or
set to root, falling back to nobody"

I am not sure where to specify an appropriate user (and possibly how and
what). Help, please?

In /etc/default/spamassassin I have...

OPTIONS="--nouser-config -4 -i 127.0.0.1 --max-children=5
--helper-home-dir=/var/lib/spamassassin -u debian-spamd"

PIDFILE="/run/spamd.pid"

CRON=1
Re: spamd: still running as root [ In reply to ]
On 2023-10-30 at 12:45:31 UTC-0400 (Mon, 30 Oct 2023 16:45:31 +0000)
Linkcheck via users <spamassassin@linkcheck.co.uk>
is rumored to have said:

> I have just updated Debian to Bookworm in order to install SA 4. Very
> few problems so far but the postfix log is giving:
>
> "spamd: still running as root: user not specified with -u, not found,
> or set to root, falling back to nobody"
>
> I am not sure where to specify an appropriate user (and possibly how
> and what). Help, please?

If you do not understand very specifically WHY you NEED spamd to run as
some specific other user, DO NOT DO IT. If your only reason for asking
this is the log entry, just forget about it.

'man spamd' provides more info.


--
Bill Cole
bill@scconsult.com or billcole@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire
Re: spamd: still running as root [ In reply to ]
On 30.10.23 16:45, Linkcheck via users wrote:
>I have just updated Debian to Bookworm in order to install SA 4. Very
>few problems so far but the postfix log is giving:
>
>"spamd: still running as root: user not specified with -u, not found,
>or set to root, falling back to nobody"
>
>I am not sure where to specify an appropriate user (and possibly how
>and what). Help, please?

>In /etc/default/spamassassin I have...
>
>OPTIONS="--nouser-config -4 -i 127.0.0.1 --max-children=5
>--helper-home-dir=/var/lib/spamassassin -u debian-spamd"
>
>PIDFILE="/run/spamd.pid"
>
>CRON=1

since SA 4, spamd uses /etc/default/spamd

I don't use -u option, so spamd setuids to user spamc provides, this allows
spamd use per-user configuration files.

--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
"They say when you play that M$ CD backward you can hear satanic messages."
"That's nothing. If you play it forward it will install Windows."
Re: spamd: still running as root [ In reply to ]
On 2023-10-30 16:45:31 +0000, Linkcheck via users wrote:
> I have just updated Debian to Bookworm in order to install SA 4. Very few
> problems so far but the postfix log is giving:
>
> "spamd: still running as root: user not specified with -u, not found, or set
> to root, falling back to nobody"
>
> I am not sure where to specify an appropriate user (and possibly how and
> what). Help, please?
>
> In /etc/default/spamassassin I have...

AFAIK, /etc/default/spamassassin is no longer used. The config
file in Debian is now "/etc/default/spamd". This is what I have
on my new bookworm machine.

--
Vincent Lef?vre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Re: spamd: still running as root [ In reply to ]
Thanks, Matus. So nice when these little changes creep up on you. :)

I have merged the new OPTIONS with my old one...

OPTIONS="--create-prefs --nouser-config -4 -i 127.0.0.1 --max-children=5
--helper-home-dir=/var/lib/spamassassin -u debian-spamd"

I assume that's ok.
Re: spamd: still running as root [ In reply to ]
Thanks, Vincent. I hadn't spotted that.
Re: spamd: still running as root [ In reply to ]
On 31.10.23 09:10, Linkcheck via users wrote:
>Thanks, Matus. So nice when these little changes creep up on you. :)
>
>I have merged the new OPTIONS with my old one...
>
>OPTIONS="--create-prefs --nouser-config -4 -i 127.0.0.1
>--max-children=5 --helper-home-dir=/var/lib/spamassassin -u
>debian-spamd"
>
>I assume that's ok.

yes, although --create-prefs is useless when you use --nouser-config

--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Honk if you love peace and quiet.
Re: spamd: still running as root [ In reply to ]
> yes, although --create-prefs is useless when you use --nouser-config

Thanks. I'll look at the docs.
Re: spamd: still running as root [ In reply to ]
Matus UHLAR - fantomas skrev den 2023-10-31 11:48:
> On 31.10.23 09:10, Linkcheck via users wrote:
>> Thanks, Matus. So nice when these little changes creep up on you. :)
>>
>> I have merged the new OPTIONS with my old one...
>>
>> OPTIONS="--create-prefs --nouser-config -4 -i 127.0.0.1
>> --max-children=5 --helper-home-dir=/var/lib/spamassassin -u
>> debian-spamd"
>>
>> I assume that's ok.
>
> yes, although --create-prefs is useless when you use --nouser-config

and --create-prefs needs root ?

so if needed prefs, setup sql/ldap based userprefs
Re: spamd: still running as root [ In reply to ]
>>On 31.10.23 09:10, Linkcheck via users wrote:
>>>Thanks, Matus. So nice when these little changes creep up on you. :)
>>>
>>>I have merged the new OPTIONS with my old one...
>>>
>>>OPTIONS="--create-prefs --nouser-config -4 -i 127.0.0.1
>>>--max-children=5 --helper-home-dir=/var/lib/spamassassin -u
>>>debian-spamd"
>>>
>>>I assume that's ok.

>Matus UHLAR - fantomas skrev den 2023-10-31 11:48:
>>yes, although --create-prefs is useless when you use --nouser-config

On 31.10.23 17:51, Benny Pedersen wrote:
>and --create-prefs needs root ?

no. Even if you keep spamd running as root, it won't check as root, it will
chuid to the "--default-user" and create/read prefs under that user.

quite effective with spamass-milter

If you use "--username", it will create/read under that user.

But if you disable user preferences using --nouser-config, there's no reason
to create user preferences, spams won't read them.


--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I'm not interested in your website anymore.
If you need cookies, bake them yourself.