Did you restart the unit after changing the configuration? It does seem like debian-spamd is indeed the correct user. I'm not sure how exactly the spawning of children works within SA. Has your CPU usage decreased now?

PS: you can just reply to the list, no need to email me personally every time, that just causes me to get each message twice.

On 2/06/2022 15:17, Timo Brandt wrote:

Hi Bert,


I checked the user table:

debian-spamd:x:114:120::/var/lib/spamassassin:/usr/sbin/nologin

And also adjusted the config file:

OPTIONS="-u debian-spamd --create-prefs --max-children 5 --helper-home-dir -s /var/log/spamassassin/spamd.log


But process is already running under root:


Am 2022-06-02 15:13, schrieb Bert Van de Poel:

For the error: does the spamd user actually exist? that's a requirement of course.

I've always controlled SA loglevels through amavis, but from the spamd man page I would expect that it's related to -D. I'm not completely sure what the default is. http://wiki.apache.org/spamassassin/DebugChannels <http://wiki.apache.org/spamassassin/DebugChannels> is listed for more information.

I expect your high CPU usage is just coming from SA trying to spawn children as a user that doesn't exist though.

On 2/06/2022 14:57, Timo Brandt wrote:

Hi Bert,

many thanks for your answer.

Please find the spamassassin config below.

I already checked it but do not find anything to change which is stopping the flooding.


Also, spamassassin is consuming mostly all of my CPU power.

When its running, the CPU is nearly the whole time at 99%. When I stop spamassassin, the CPU consumption is going down.


# /etc/default/spamassassin
# Duncan Findlay

# WARNING: please read README.spamd before using.
# There may be security risks.

# Prior to version 3.4.2-1, spamd could be enabled by setting
# ENABLED=1 in this file. This is no longer supported. Instead, please
# use the update-rc.d command, invoked for example as "update-rc.d spamassassin enable", to enable the spamd service.

# Options
# See man spamd for possible options. The -d option is automatically added.
ENABLED=1
# SpamAssassin uses a preforking model, so be careful! You need to
# make sure --max-children is not set to anything higher than 5,
# unless you know what you're doing.
OPTIONS="--create-prefs --max-children 5 --helper-home-dir --username spamd --helper-home-dir /home/spamd -s /var/log/spamassassin/spamd.log

# Pid file
# Where should spamd write its PID to file? If you use the -u or
# --username option above, this needs to be writable by that user.
# Otherwise, the init script will not be able to shut spamd down.
PIDFILE="/var/run/spamd.pid"

# Set nice level of spamd
#NICE="--nicelevel 15"

# Cronjob
# Set to anything but 0 to enable the cron job to automatically update
# spamassassin's rules on a nightly basis
CRON=1


Am 2022-06-02 14:47, schrieb Bert Van de Poel:

    For the errors about nonexistent uses you will want to have a
    look at /etc/default/spamassassin I'm guessing.
    For the info messages: this has just got to do with your logging
    level. You will want to decrease it in local.cf or maybe also in
    the default file.

    On 2/06/2022 14:33, Timo Brandt wrote:

        Hi all,

        I have a running debian 11 with postfix/dovecot and Amavis
        with clamav / spamassassin.
        I saw that the spamassassin logfile is growing very fast and
        found the following entries occuring many times per second.
        Can you maybe help me to get this fixed?
        I searched along the internet but did not find really a solution.
        Do you need any config files to check?

        Thanks for your help in advance,
        Timo

        Thu Jun  2 11:43:11 2022 [1848608] info: spamd: handled
        cleanup of child pid [1849690] due to SIGCHLD: exit 255
        Thu Jun  2 11:43:11 2022 [1848608] info: spamd: handled
        cleanup of child pid [1849691] due to SIGCHLD: exit 255
        Thu Jun  2 11:43:11 2022 [1848608] info: spamd: handled
        cleanup of child pid [1849692] due to SIGCHLD: exit 255
        Thu Jun  2 11:43:11 2022 [1848608] info: spamd: handled
        cleanup of child pid [1849693] due to SIGCHLD: exit 255
        Thu Jun  2 11:43:11 2022 [1848608] info: spamd: server
        successfully spawned child process, pid 1849698
        Thu Jun  2 11:43:11 2022 [1848608] info: spamd: handled
        cleanup of child pid [1849696] due to SIGCHLD: exit 255
        Thu Jun  2 11:43:11 2022 [1849698] error: spamd: cannot run
        as nonexistent user or root with -u option
        Thu Jun  2 11:43:11 2022 [1848608] info: spamd: server
        successfully spawned child process, pid 1849699
        Thu Jun  2 11:43:11 2022 [1848608] info: prefork: child states: SS
        Thu Jun  2 11:43:11 2022 [1848608] info: spamd: server
        successfully spawned child process, pid 1849700
        Thu Jun  2 11:43:11 2022 [1848608] info: prefork: adjust: 0
        idle children less than 1 minimum idle children. Increasing
        spamd children: 1849700 started.
        Thu Jun  2 11:43:11 2022 [1849699] error: spamd: cannot run
        as nonexistent user or root with -u option
        Thu Jun  2 11:43:11 2022 [1849700] error: spamd: cannot run
        as nonexistent user or root with -u option
        Thu Jun  2 11:43:11 2022 [1848608] info: prefork: child states: SSS
        Thu Jun  2 11:43:11 2022 [1848608] info: spamd: server
        successfully spawned child process, pid 1849701
        Thu Jun  2 11:43:11 2022 [1848608] info: prefork: adjust: 0
        idle children less than 1 minimum idle children. Increasing
        spamd children: 1849701 started.
        Thu Jun  2 11:43:11 2022 [1848608] info: prefork: child states: SSSS
        Thu Jun  2 11:43:11 2022 [1848608] info: spamd: server
        successfully spawned child process, pid 1849702
        Thu Jun  2 11:43:11 2022 [1849701] error: spamd: cannot run
        as nonexistent user or root with -u option
        Thu Jun  2 11:43:11 2022 [1848608] info: prefork: adjust: 0
        idle children less than 1 minimum idle children. Increasing
        spamd children: 1849702 started.
        Thu Jun  2 11:43:11 2022 [1848608] info: prefork: child states: SSSSS


Reply via email to