SpamAssassin no user / group

  • Hi,


    i've noticed the following error in the mail.log


    Code
    1. warning: connect to Milter service unix:/spamass/spamass.sock: Permission denied


    So...


    Code
    1. server:/var/spool/postfix/spamass# ls -latotal 8.0Kdrwxr-xr-x 2 spamass-milter root 4.0K Jun 1 11:03 .drwxr-xr-x 24 root root 4.0K May 7 21:31 ..srwxr-xr-x 1 spamass-milter nogroup 0 Jun 1 11:03 spamass.sock


    And...


    Code
    1. server:/var/spool/postfix/spamass# less /etc/group | grep spam
    2. debian-spamd:x:110:


    No spamass-milter user and no usergroup.


    Is it a Plugin-Bug?


    Debian Jessie
    i-MSC 1.4.3
    Plugin ClamAV 1.2.1
    Plugin Mailgraph 1.1.1
    Plugin OpenDKIM 1.1.3
    Plugin Panel Redirect 1.1.5
    Plugin RecaptchaPMA 1.1.1
    Plugin ServerDefaultPage 1.2.5
    Plugin SpamAssassin 1.1.1
    Postfix + Courier

  • No spamass-milter user and no usergroup.


    Is it a Plugin-Bug?

    The bug is in your head ;)


    Shell-Script
    1. nuxwin@srv01:~$ getent passwd spamass-milterspamass-milter:x:117:65534::/var/lib/spamass-milter:/bin/false


    Shell-Script
    1. nuxwin@srv01:~$ getent group nogroupnogroup:x:65534:


    Shell-Script
    1. nuxwin@srv01:~$ lsb_release -a
    2. No LSB modules are available.
    3. Distributor ID: Debian
    4. Description: Debian GNU/Linux 8.7 (jessie)
    5. Release: 8.7
    6. Codename: jessie

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Acha...


    Code
    1. server# getent passwd spamass-milterspamass-milter:x:119:65534::/var/lib/spamass-milter:/bin/false


    Code
    1. server# getent group nogroup
    2. nogroup:x:65534:


    So should i just change the usergroup for "/var/spool/postfix/spamass/spamass.sock" ?

  • Doesn't work:


    Code
    1. server: chown spamass-milter:spamass-milter /var/spool/postfix/spamass/spamass.sock
    2. chown: invalid group: ‘spamass-milter:spamass-milter’
  • @Mutschas


    You should avoid playing without knowning what you're doing.


    There is no spamass-milter group. There is one spamass-milter user for which group is nogroup.


    So please, answer the following questions:

    • Result of the following command (full output): service spamass-milter status
    • Content of the /etc/default/spamass-milter file
    • Content of the /etc/init.d/spamass-milter sysvinit script

    Note that when Postfix executable is here (that should be your case), the spamass-milter socket should be created with postfix user and postfix group:


    Part of /etc/init.d/spamass-milter:


    Shell-Script
    1. ...# If /usr/sbin/postfix exists, set up the defaults for a postfix install# These can be overridden in /etc/default/spamass-milterif [ -x /usr/sbin/postfix ]; then SOCKET="/var/spool/postfix/spamass/spamass.sock" SOCKETOWNER="postfix:postfix" SOCKETMODE="0660"fi;...

    Resulting in:


    Shell-Script
    1. root@srv01:/home/nuxwin# ls -la /var/spool/postfix/spamass/
    2. total 8
    3. drwxr-xr-x 2 spamass-milter root 4096 Jun 6 06:40 .
    4. drwxr-xr-x 21 root root 4096 Jan 18 23:14 ..
    5. srw-rw---- 1 postfix postfix 0 Jun 6 06:40 spamass.sock
    6. root@srv01:/home/nuxwin#

    So again, just answer all my questions above and don't try to do something manually without more thinking.


    Thank you.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Thanks.


    Here are the outputs:


    Code
    1. server:/# service spamass-milter status● spamass-milter.service - LSB: milter for spamassassin Loaded: loaded (/etc/init.d/spamass-milter) Active: failed (Result: exit-code) since Thu 2017-06-01 11:03:01 CEST; 5 days agoWarning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.


    Code
    1. server:/# cat /etc/default/spamass-milter# spamass-milt startup defaults# OPTIONS are passed directly to spamass-milter.# man spamass-milter for details# Non-standard configuration notes:# See README.Debian if you use the -x option with sendmail# You should not pass the -d option in OPTIONS; use SOCKET for that.# Default, use the spamass-milter user as the default user, ignore# messages from localhostOPTIONS="-e -f -u spamass-milter -r 15"# Reject emails with spamassassin scores > 15.#OPTIONS="-r 15"# Do not modify Subject:, Content-Type: or body.#OPTIONS="-m"####################################### If /usr/sbin/postfix is executable, the following are set by# default. You can override them by uncommenting and changing them# here.######################################SOCKET="/var/spool/postfix/spamass/spamass.sock"# SOCKETOWNER="postfix:postfix"# SOCKETMODE="0660"######################################


  • So, socketowner is "postfix:postfix" like in your example. I have nothing changed in this config.
    I just installed like in the wiki via apt-get and then installed the SA-Plugin....

  • Your spama-milter service is down since 5 days...

    Shell-Script
    1. Active: failed (Result: exit-code) since Thu 2017-06-01 11:03:01 CEST; 5 days ago

    So far, try to start the spamass-milter service and give us the resulting log once after. In order, do the following:

    Shell-Script
    1. # rm /var/spool/postfix/spamass/spamass.sock
    2. # service spamass-milter start
    3. # service spamass-milter status

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • The question is, why has it stopped....


    Code
    1. server:# service spamass-milter startJob for spamass-milter.service failed. See 'systemctl status spamass-milter.service' and 'journalctl -xn' for details.



    Code
    1. server:# service spamass-milter status● spamass-milter.service - LSB: milter for spamassassin Loaded: loaded (/etc/init.d/spamass-milter) Active: failed (Result: exit-code) since Tue 2017-06-06 21:17:26 CEST; 54s ago Process: 29225 ExecStart=/etc/init.d/spamass-milter start (code=exited, status=1/FAILURE)Jun 06 21:17:26 server spamass-milter[29225]: Starting Sendmail milter plugin for SpamAssassin: /usr/sbin/spamass-milter already running.Jun 06 21:17:26 server systemd[1]: spamass-milter.service: control process exited, code=exited status=1Jun 06 21:17:26 server systemd[1]: Failed to start LSB: milter for spamassassin.Jun 06 21:17:26 server systemd[1]: Unit spamass-milter.service entered failed state.


  • @Mutschas


    Please, try:


    Shell-Script
    1. # pkill -KILL -f spamass-milter
    2. # rm -f /var/spool/postfix/spamass/spamass.sock
    3. # service spamass-milter start

    Once done, give us the result of: service spamass-milter status

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206