Hi List,

I've been having some adventures with pre queue filtering with
SpamAssassin. This has introduced me to 'milters' which look really
interesting.

I've been trying to set up suggested spamassassin milter
(spamass-milter) but I'm find large gaps in my basic Linux
understanding.I don't mind admitting that I'm stupid and need help at
times. My question is more 'unix' than 'Postfix' but someone here will
know.

If I have a milter set up and it creates a 'unix socket' on start up,
e.g.
/home/mail/email/private/samilter 

then defining the milter in main.cf like this (bear in mind Postfix is
running chrooted) 
smtpd_milters = unix:/private/samilte 
milter_default_action = tempfail

Would set up the communications 'channel' via this socket to the MILTER.
I have go this basic thing clear and right in my head?

The reason I ask is the milter kicks off as root:root and I get this;
Jun 24 11:40:30 mx1 postfix/smtpd[3880]: warning: connect to Milter
service unix:/private/samilter: Permission denied

This looks to be because the milter creates the socket with ownerships
root:root. A quick debug 'chown postfix:postfix' on the socket and we
see this when we get an incoming connection;

Jun 24 11:42:56 mx1 postfix/smtpd[3946]: connect from
11-38-132-95.pool.ukrtel.net[95.132.38.11]
Jun 24 11:42:56 mx1 spamass-milter[3603]: Could not retrieve sendmail
macro "i"!.  Please add it to confMILTER_MACROS_ENVFROM for better
spamassassin results

but when an 'allowed' message runs through (having passed through CLAMAV
first hence the 127.0.0.1 source) I get this;

Jun 24 11:46:17 mx1 postfix/smtpd[4086]: connect from
localhost[127.0.0.1]
Jun 24 11:46:17 mx1 postfix/smtpd[4086]: warning: connect to Milter
service unix:/private/samilter: No such file or directory
Jun 24 11:46:17 mx1 postfix/smtpd[4086]: NOQUEUE: milter-reject: CONNECT
from localhost[127.0.0.1]: 451 4.7.1 Service unavailable - try again
later; proto=SMTP

The milter stays running and other than this, there are no clues why
smtpd could see the socket and then can't.

My grasp of sockets and milters is weak - I've still lots to learn. I
appreciate this is not 'strict Postfix' but am I missing something
really really obvious ?

Better still, I learn by doing, Can someone recommend a really simple
pre-queue milter using a unix socket I can play with to troubleshoot my
understand? The docs for the particular milter I've compiled don't
appear to run past the 'readme' file in the source.

AHA - my thanks as always to those much brighter than me.


Reply via email to