How to get spamassassin working with postfix as a milter
Solution 1:
TLDR: Your postfix is connecting to socket of spamd, but should connect to socket of spamass-milter, which stands in between. Look for definition of second socket in your spamass-milter configuration/startup (/etc/init.d/spamass-milter) scripts.
Explanation (based on my Gentoo config, /etc/conf.d/ is similar to /etc/default/): Chain looks like this:
POSTFIX >spamass-milter.sock> MILTER >spamd.sock> SPAMD
-
/etc/postfix/main.cf
unix:/var/run/milter/spamass-milter.sock
-
/etc/conf.d/spamass-milter
SOCKET=/var/run/milter/spamass-milter.sock OPTIONS="-i 127.0.0.1 -m -I -- --socket=/var/spool/postfix/spamassassin/spamd.sock"
-
/etc/conf.d/spamd
--socketpath=/var/spool/postfix/spamassassin/spamd.sock
P.S. Thanks goes to Debugging spamassassin with postfix