Getting spamass-milter to work with postfix

classic Classic list List threaded Threaded
38 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Getting spamass-milter to work with postfix

Linkcheck
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!
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Matus UHLAR - fantomas
On 07.11.19 15:25, Linkcheck wrote:

>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
>/etc/default/spampd
> (all is commented out)

spampd has nothing to do with spamass-milter.
you must enable spamd (spamassassin) when using spamass-milter.

>/etc/default/spamassassin
>  ENABLED=0
enable here^

>  OPTIONS="--create-prefs --maxchildren 5 -- helper-home-dir"


>/etc/default/spamass-milter
>  OPTIONS="-u spamass-milter -i 127.0.0.1"

>/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"

>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.

spamd listens on localhost:783 by default and spamc (called by
spamass-milte) connects there. You can define unix domain socket by options
to either, but it's not neede.

>My postfix master.cf has no enabled spamassassin content.

not needed, spamass-milter uses it.

>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,

this is afaik the default spamass-milter socket on debian/ubuntu.

>unix:/var/run/clamav/clamav-milter.ctl
>  non_smtpd_milters = unix:/var/run/opendkim/opendkim.sock

--
Matus UHLAR - fantomas, [hidden email] ; 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.
Eagles may soar, but weasels don't get sucked into jet engines.
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Linkcheck
In reply to this post by Linkcheck
I've tried altering things but the best I can get is the message:
   "warning: connect to Milter service
unix:/var/run/spamass/spamass.sock: No such file or directory"

The folder exists with the permissions postfix:postfix 0660. I have also
tried spamass-milter:postfix.

On restarting spamassassin, whether as a content filter or a milter, I get:
   "spamd: server started on IO::Socket::IP [::1]:783, IO::Socket::IP
[127.0.0.1]:783"

In the three spamxxx files in /etc/default I now have socket and pid as...

/etc/default/spamassassin
   PIDFILE="/var/run/spamass/spamd.pid"

/etc/default/spamass-milter
   OPTIONS="-u spamass-milter -i 127.0.0.1 -m -I --
--socket=/var/run/spamass/spamd.sock"
   SOCKET="/var/run/spamass/spamass.sock"
   SOCKETOWNER="postfix:postfix"
   SOCKETMODE="0660"

/etc/default/spampd
  PIDFILE=/var/run/spamass/spamd.pid

No matter how I start postfix and spamassassin, /var/run/spamass remains
empty but spamassassin.pid is rewritten to /var/run.

I am restarting using:
   sudo service postfix restart
   sudo service spamassassin restart

I suspect is not spass-milter is not being started?

--
Dave Stiles


Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Matus UHLAR - fantomas
On 10.11.19 15:55, Linkcheck wrote:
>I've tried altering things but the best I can get is the message:
>  "warning: connect to Milter service
>unix:/var/run/spamass/spamass.sock: No such file or directory"
>
>The folder exists with the permissions postfix:postfix 0660. I have
>also tried spamass-milter:postfix.

with postfix, you need to set up milter wocket within its chroot.
on debian/ubuntu consult  /etc/default/spamass-milter

--
Matus UHLAR - fantomas, [hidden email] ; 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.
Linux is like a teepee: no Windows, no Gates and an apache inside...
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Benny Pedersen-2
In reply to this post by Linkcheck
Linkcheck skrev den 2019-11-07 16:25:

> /etc/default/spamass-milter
>   OPTIONS="-u spamass-milter -i 127.0.0.1"

then use milter in postfix to inet:[127.0.0.1]:spamass-milter-port
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Linkcheck
In reply to this post by Matus UHLAR - fantomas
 > with postfix, you need to set up milter wocket within its chroot.
 > on debian/ubuntu consult  /etc/default/spamass-milter

Elsewhere I've read the opposite. It does not sound reasonable anyway:
clam, opendkim etc work without chroot.

--
Dave Stiles
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Linkcheck
In reply to this post by Benny Pedersen-2
On 10/11/2019 20:15, Benny Pedersen wrote:
> then use milter in postfix to inet:[127.0.0.1]:spamass-milter-port

How do I find the spamass port? Is it the spamd DESTPORT? I assume I
then have to add the LISTENPORT into master.cf?
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Benny Pedersen-2
Linkcheck skrev den 2019-11-11 20:11:
> On 10/11/2019 20:15, Benny Pedersen wrote:
>> then use milter in postfix to inet:[127.0.0.1]:spamass-milter-port
>
> How do I find the spamass port? Is it the spamd DESTPORT? I assume I
> then have to add the LISTENPORT into master.cf?

i am confused from your first post where you show spamPd and spamD
config files

spamPd is a smtp proxy that does not require spamD to run at all

spamass-milter does not use spamPd but only spamc

to find listen inet ports

netstat -natpu

i can not help more now
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Matus UHLAR - fantomas
In reply to this post by Linkcheck
>> with postfix, you need to set up milter wocket within its chroot.
>> on debian/ubuntu consult  /etc/default/spamass-milter

On 11.11.19 16:40, Linkcheck wrote:
>Elsewhere I've read the opposite. It does not sound reasonable anyway:
>clam, opendkim etc work without chroot.

maybe the postfix smtpd is run on your system without chroot. May not be
true on the OPs system. Let's change it to:

"with postfix, you may need to set up milter wocket within its chroot"

--
Matus UHLAR - fantomas, [hidden email] ; 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 feel like I'm diagonally parked in a parallel universe.
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Linkcheck
In reply to this post by Linkcheck
On 11/11/2019 19:15, Reindl Harald wrote:
> because it's common sense

Sorry, but that is NOT an explanation.

>>> when postfix is configured to a unix socket which is a path it needs to
>>> live within the chroot postfix is using
>> I am not using chroot
> then why did you respond at all to something talking about postfix with
> the chroot column in master.cf not explicit disabled - default is
> *enabled*  even when you don't now it

I have not posted anything from master.cf at all. If I had it would have
shown that the chroot column has "n" in it. It always has.
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Linkcheck
In reply to this post by Benny Pedersen-2
On 11/11/2019 19:23, Benny Pedersen wrote:
> i am confused from your first post where you show spamPd and spamD
> config files

I posted all I could find relating to spamassassin. I missed chroot,
which never occurred to me might be relevant since I've never applied it.

> spamPd is a smtp proxy that does not require spamD to run at all

I find it confusing trying to determine what part of spamassassin IS
relevant to my requirement. I was rather hoping someone could supply a
basic setup that would allow spamass-milter to run with postfix, which
is why I originally posted so much information.

> spamass-milter does not use spamPd but only spamc

So how would I specify that, please?

> netstat -natpu

Thanks for the hint. Still does not resolve my confusion concerning what
else to set up, though.

--
Dave Stiles
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Linkcheck
In reply to this post by Matus UHLAR - fantomas
 > "with postfix, you may need to set up milter wocket within its chroot"

Ok, but since I do NOT use chroot which should I set up, bearing in mind
the other milters all run successfully?

My original posting gives my setup AS FAR AS I CAN DISCOVER IT.
Presumably something in it is incorrect or I have a wrong permission.
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Matus UHLAR - fantomas
In reply to this post by Linkcheck
>On 11/11/2019 19:23, Benny Pedersen wrote:
>>i am confused from your first post where you show spamPd and spamD
>>config files

On 13.11.19 12:01, Linkcheck wrote:
>I posted all I could find relating to spamassassin. I missed chroot,
>which never occurred to me might be relevant since I've never applied
>it.

>>spamPd is a smtp proxy that does not require spamD to run at all

>I find it confusing trying to determine what part of spamassassin IS
>relevant to my requirement.

FYI spampd is not part of spamassassin.

>I was rather hoping someone could supply a
>basic setup that would allow spamass-milter to run with postfix, which
>is why I originally posted so much information.

I use spamass-milter only with sendmail.  My postfix machines use
amavisd-milter.  And they are on debian, which uses chroot for smtpd by
default.

I am trying to help as much as I can, and seems nobody who replies yet runs
your combination of SW.

>>spamass-milter does not use spamPd but only spamc
>
>So how would I specify that, please?

you don't have to, it executes spamc automatically.

>>netstat -natpu
>
>Thanks for the hint. Still does not resolve my confusion concerning
>what else to set up, though.

BTW.

You mention having Mint (Ubuntu 16).  Ubuntu 16 also uses chroot for smtpd
by default:

# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (no)    (never) (100)
# ==========================================================================
smtp      inet  n       -       y       -       -       smtpd


--
Matus UHLAR - fantomas, [hidden email] ; 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.
Atheism is a non-prophet organization.
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Matus UHLAR - fantomas
>On 13.11.19 12:01, Linkcheck wrote:
>>I was rather hoping someone could supply a basic setup that would
>>allow spamass-milter to run with postfix, which is why I originally
>>posted so much information.


On 13.11.19 14:12, Matus UHLAR - fantomas wrote:
>You mention having Mint (Ubuntu 16).  Ubuntu 16 also uses chroot for smtpd
>by default:
>
># service type  private unpriv  chroot  wakeup  maxproc command + args
>#               (yes)   (yes)   (no)    (never) (100)
># ==========================================================================
>smtp      inet  n       -       y       -       -       smtpd

this may be the issue.
I looked into debians' /etc/init.d/spamass-milter and it contains following
code:

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

maybe your script contains the same and you need to override sock file
there...
--
Matus UHLAR - fantomas, [hidden email] ; 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.
LSD will make your ECS screen display 16.7 million colors
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Linkcheck
Thank you for your responses. Sorry it's taken a while to reply.

Bearing in mind your comments - and those of the other contributors - I
now have the following setup / observations but I still can't get it to
work.

/etc/default/spamassassin
   ENABLED=1
   OPTIONS="--create-prefs --maxchildren 5 -- helper-home-dir"
   PIDFILE="/var/run/spamass/spamd.pid"

/etc/default/spamass-milter
   OPTIONS="-u spamass-milter -i 127.0.0.1"
   SOCKET="/var/run/spamass/spamass.sock"
   SOCKETOWNER="postfix:postfix"
   SOCKETMODE="0660"

As I understand it, the above values over-ride those in the init.d files
of relevant name, but I have in any case put the same values at the top
of those files.

Before the ENABLED line in /etc/default/spamassassin is a recommendation
to run the command...
   systemctl enable spamassassin.service

This results in the following...

Synchronizing state of spamassassin.service with SysV init with
/lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable spamassassin
insserv: fopen(.depend.stop): Permission denied
insserv: fopen(.depend.stop): Permission denied
Failed to execute operation: Access denied

...and a perpetual failure to authenticate.

I looked into replacing unix:/var/run/spamass/spamass.sock with
inet:localhost:783 in main.cf (which I'm pretty sure is wrong!) and it
logged errors and refused mail.

By using unix:/var/run/spamass/spamass.sock in main.cf I have the
warning in the log: No such file or directory.
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Benny Pedersen-2
Linkcheck skrev den 2019-11-17 19:38:

> I looked into replacing unix:/var/run/spamass/spamass.sock with
> inet:localhost:783 in main.cf (which I'm pretty sure is wrong!) and it
> logged errors and refused mail.

glibc have ipv6 prefered over ipv4, so if spamd only listen on ipv4 ?

change localhost with [127.0.0.1] solves it

> By using unix:/var/run/spamass/spamass.sock in main.cf I have the
> warning in the log: No such file or directory.

ls -l that path would be nice to see
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Linkcheck
Thanks for the response.

 >> I looked into replacing unix:/var/run/spamass/spamass.sock with
 >> inet:localhost:783 in main.cf (which I'm pretty sure is wrong!)
 >> and it logged errors and refused mail.
 > glibc have ipv6 prefered over ipv4, so if spamd only listen on ipv4 ?
 > change localhost with [127.0.0.1] solves it

Reason I thought it was wrong is: I thought I was actually assigning
spamd when I should be assigning spamass sock. Am I wrong in that
assumption? If  I am I'll try it ASAP - it's a live server so I need to
pick a quiet time.

 > ls -l
drwxrwxr-x  2 postfix    postfix      40 Nov  5 19:45 spamass
(nothing in folder)

--
Dave Stiles
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Benny Pedersen-2
Linkcheck skrev den 2019-11-17 23:49:

> Thanks for the response.
>
>>> I looked into replacing unix:/var/run/spamass/spamass.sock with
>>> inet:localhost:783 in main.cf (which I'm pretty sure is wrong!)
>>> and it logged errors and refused mail.
>> glibc have ipv6 prefered over ipv4, so if spamd only listen on ipv4 ?
>> change localhost with [127.0.0.1] solves it
>
> Reason I thought it was wrong is: I thought I was actually assigning
> spamd when I should be assigning spamass sock. Am I wrong in that
> assumption? If  I am I'll try it ASAP - it's a live server so I need
> to pick a quiet time.

i lost that localhost is aswell the spamass socket aswell as spamd. just
diffrent ports ofcourse

>> ls -l
> drwxrwxr-x  2 postfix    postfix      40 Nov  5 19:45 spamass
> (nothing in folder)

socket can only be created here if spamas-milter starts as root and drop
priveleges later, this is what dovecot do with dovecot sasl sockets, but
if spamass-milter does not start as root then you can only use inet not
unix

mail route will be internet > postfix smtpd > spamass-milter inet >
spamc client > spamd inet

no unix socket needed
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Edda
In reply to this post by Linkcheck
Am 10.11.19 um 16:55 schrieb Linkcheck:
> I've tried altering things but the best I can get is the message:
>   "warning: connect to Milter service
> unix:/var/run/spamass/spamass.sock: No such file or directory"

This is the socket the spamass-milter daemon has to create for postfix
to communicate with.

>
> No matter how I start postfix and spamassassin, /var/run/spamass
> remains empty but spamassassin.pid is rewritten to /var/run.
>
> I am restarting using:
>   sudo service postfix restart
>   sudo service spamassassin restart
>
> I suspect is not spass-milter is not being started?
>
You did not start/restart spamass-milter?

Start/Restart spamass-milter and look for the socket it has created:

lsof <pid of spamass-milter>

There should be something like this in the output:

spamass-m 1711 spamass-milter    4u  unix 0xffff88003aaf0400 0t0  18591
/var/run/spamass/spamass.sock type=STREAM

That's the socket for your postfix configuration (main.cf)

smtpd_milters = unix:/var/run/spamass/spamass.sock [...]

Best regards,
Edda
Reply | Threaded
Open this post in threaded view
|

Re: Getting spamass-milter to work with postfix

Matus UHLAR - fantomas
In reply to this post by Linkcheck
On 17.11.19 18:38, Linkcheck wrote:
>Thank you for your responses. Sorry it's taken a while to reply.

no problem.

>Bearing in mind your comments - and those of the other contributors -
>I now have the following setup / observations but I still can't get it
>to work.
>
>/etc/default/spamassassin
>  ENABLED=1
>  OPTIONS="--create-prefs --maxchildren 5 -- helper-home-dir"
>  PIDFILE="/var/run/spamass/spamd.pid"
>
>/etc/default/spamass-milter
>  OPTIONS="-u spamass-milter -i 127.0.0.1"
>  SOCKET="/var/run/spamass/spamass.sock"
>  SOCKETOWNER="postfix:postfix"
>  SOCKETMODE="0660"
>
>As I understand it, the above values over-ride those in the init.d
>files of relevant name, but I have in any case put the same values at
>the top of those files.
>
>Before the ENABLED line in /etc/default/spamassassin is a
>recommendation to run the command...
>  systemctl enable spamassassin.service
>
>This results in the following...
>
>Synchronizing state of spamassassin.service with SysV init with
>/lib/systemd/systemd-sysv-install...
>Executing /lib/systemd/systemd-sysv-install enable spamassassin
>insserv: fopen(.depend.stop): Permission denied
>insserv: fopen(.depend.stop): Permission denied
>Failed to execute operation: Access denied

this is strange, are you running this as root?

>...and a perpetual failure to authenticate.
>
>I looked into replacing unix:/var/run/spamass/spamass.sock with
>inet:localhost:783 in main.cf (which I'm pretty sure is wrong!) and it
>logged errors and refused mail.
>
>By using unix:/var/run/spamass/spamass.sock in main.cf I have the
>warning in the log: No such file or directory.

note that there are/may be two sockets:

1. milter socket for communicating between postfix and spamass-milter;
It's defined by SOCKET option in spamass-milter init.d/default file
and postfix *_milters option

2.  spamd socket for communication between spamass-milter and spamd.
configured with --socketpath spamd option in default file and within spamc
options in spamass-milter after "--" in spamass-milter OPTIONS
- this socket is not used by default.

for example my spamass-milter options are:

OPTIONS="-i 127.0.0.1 -r 9 -m -u abuse -x -- -x -d 127.0.0.1 -s 20971520"

I don't use the latter socket, instead spamass-milter calls spamc that
communicates with spamd by localhost:783

However, my MTA communicates with milter via default socket (I haven't
overridden SOCKET in spamass-milter file).

just I don't use postfix on this machine, but sendmail that has no problems
communicating with /var/run/spamass/spamass.sock which is the default unless
debian init script finds /usr/sbin/postfix executable.

So, you should NOT use inet:localhost:783 for milter socket, since it's not
the milter, but the spamd socket.

find out which socket has spamass-milter open and try connecting postfix to
that one.

--
Matus UHLAR - fantomas, [hidden email] ; 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.
If Barbie is so popular, why do you have to buy her friends?
12