I have run spamassassin as a postfix content filter (master.cf) for
several years on Linux Mint (Ubuntu 16.04) but I now need to run
spamass-milter instead. I have spent several hours trying to find the
correct setup but those I've found are somewhat conflicting and I cannot
determine which files I should modify and how. I would appreciate some
help in setting up the milter.
Spamassassin version: 3.4.2
Postfix version: 3.1.0
I have the following spamassassin folders/files files with the contents
shown:
/etc/spampd.conf
(all is commented out)
/etc/default/spamassassin
ENABLED=0
OPTIONS="--create-prefs --maxchildren 5 -- helper-home-dir"
/etc/default/spamass-milter
OPTIONS="-u spamass-milter -i 127.0.0.1"
/etc/default/spampd
STARTSPAMPD=1
PIDFILE=/var/run/spampd.pid
LISTENHOST=127.0.0.1
LISTENPORT=10025
DESTHOST=127.0.0.1
DESTPORT=10026
CHILDREN=3
USERID=spampd
GRPID=spampd
TAGALL=1
AUTOWHITELIST=0
LOCALONLY=1
LOGINET=0
ADDOPTS=""
(do I need to include the listen/dest values or does it not matter?)
(headers only given for the following three)
/etc/init.d/spamassassin
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/spamd
NAME=spamd
SNAME=spamassassin
DESC="SpamAssassin Mail Filter Daemon"
PIDFILE="/var/run/$NAME.pid"
export TMPDIR=/tmp
ENABLED=0
OPTIONS=""
NICE=
. /lib/lsb/init-functions
test -f /etc/default/spamassassin && . /etc/default/spamassassin
DOPTIONS="-d --pidfile=$PIDFILE"
(I'm confused by the line: . /lib etc - is this valid? and see below also)
/etc/init.d/spamass-milter
PATH=/sbin:/bin:/usr/sbin:/usr/bin
NAME=spamass-milter
DAEMON=/usr/sbin/spamass-milter
SOCKET=/var/run/spamass/spamass.sock
PIDFILE=/var/run/spamass/spamass.pid
DESC="Sendmail milter plugin for SpamAssassin"
DEFAULT=/etc/default/spamass-milter
OPTIONS=""
RUNAS="spamass-milter"
CHUID=""
SOCKETMODE="0600"
SOCKETOWNER="postfix:postfix"
/etc/init.d/spampd
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
DESC='spam checking proxy daemon'
NAME='spampd'
PROGRAM=/usr/sbin/spampd
EXECUTABLE=/usr/bin/perl
PIDFILE=/var/run/spampd.pid
. /lib/lsb/init-functions
USERID=spampd
GRPID=spampd
/etc/spamassassin/
(containing local.cf and local rules files)
/usr/share/spamassassin/
(global rules files)
The last one I understand I do not need to worry about and in the one
before local.cf has nothing relevant to the problem.
The only file that has a SOCK defined is /etc/init.d/spamass-milter.
Should spamd also have a socket? Various online postings give
conflicting advice.
My postfix master.cf has no enabled spamassassin content.
Postfix main.cf has:
policy-spf_time_limit = 3600s
milter_default_action = accept
milter_protocol = 6
smtpd_milters = unix:/var/run/opendkim/opendkim.sock,
unix:/var/run/opendmarc/opendmarc.sock,
unix:/var/run/spamass/spamass.sock, unix:/var/run/clamav/clamav-milter.ctl
non_smtpd_milters = unix:/var/run/opendkim/opendkim.sock
The .pid files are as below; so far, no .sock files.
/var/run/spamassassin.pid (created during a postfix restart early today)
/var/run/spampd.pid (created during last m/c reboot)
/var/run/spamass/ (contains nothing)
(permissions spamass-milter create/delete files, postfix ditto,
others access only)
There is a folder at /var/spool/postfix/spamass/ with the same
permissions as above but also empty.
All help appreciated!