On 01/18/2011 07:54 PM, J4 wrote: > > On 01/18/2011 06:51 PM, Patrick Ben Koetter wrote: >> * J4 <[email protected]>: >>> This is pretty much what I would like to achieve, & the reason I >>> decided not to use Dovecot Sieve (apart from me being incapable of >>> setting it. ;) ). >>> >>> Parse the SPAM during the SMPT session and use only RAM: Perfect. >>> >>> I would still like to notify the connecting SMTP client with a reject >>> message. Real spammers are uninterested anyway, but legitimate >>> e-mailers would be, although this is not essential to let them know. >> spamassassin can make Postfix REJECT clients in session if you integrate >> Spamassassin using a MILTER or amavis. Your master.cf excert below indicates >> you are not running Spamassassin in SMTP session, but after the mail has been >> accepted. >> >> If you only want to identify and reject spam use a Spamassassin Milter >> interface. There are several out there. See section "Integrated into >> Sendmail" >> in http://wiki.apache.org/spamassassin/IntegratedInMta. >> >> If you need more, go for amavis. >> >> Which plattform are you on? >> >> p@rick >> > Hi Patrick, > > I'm on Debian Squeeze. Right folks! I did all of this:
# spamass-milter -m -u nobody -f -p /var/run/spamass.sock # chown postfix.postfix /var/run/spamass.sock # spamass-milter -m -u nobody -f -p /var/spool/postfix/var/run/spamass.sock # chown postfix.postfix /var/spool/postfix/var/run/spamass.sock # ls -l /var/spool/postfix/var/run/spamass.sock srwxr-x--- 1 postfix postfix 0 Jan 18 20:13 /var/spool/postfix/var/run/spamass.sock 2 sockets are used above because someone else (thanks Google) wrote that that postfix chroots. Also, I added the above into an init.d script to be run at a reboot as the sockets might get lost. Added this into /etc/postfix/main.cf:- ### spamassassin-milter milter_default_action = accept # accept is for testing smtpd_milters = unix:/var/run/spamass.sock /etc/default/spamass-milter contains this: OPTIONS="-u nobody -m -r 15 -i 127.0.0.1 -f -p /var/spool/postfix/var/run/spamass.sock" SOCKET="/var/spool/postfix/spamass/spamass.sock" SOCKETOWNER="postfix:postfix" SOCKETMODE="0660" Restarted spamass-milter, but got some horrid messages: # /etc/init.d/spamass-milter restart Restarting Sendmail milter plugin for SpamAssassin: Jan 18 20:30:20 logout spamass-milter[29969]: spamass-milter 0.3.1 starting Jan 18 20:30:20 logout spamass-milter[29969]: SpamAssassin: Unable to bind to port /var/spool/postfix/var/run/spamass.sock: Permission denied Jan 18 20:30:20 logout spamass-milter[29969]: SpamAssassin: Unable to create listening socket on conn /var/spool/postfix/var/run/spamass.sock Jan 18 20:30:20 logout spamass-milter[29969]: spamass-milter 0.3.1 exiting chmod: cannot access `/var/spool/postfix/spamass/spamass.sock': No such file or directory All a bit odd, so deleted the sockets & tried to restart spamass-milter, and had the same error message. So, I deleted the two sockets, and then created these again but left off the chmod bits: # spamass-milter -m -u nobody -f -p /var/run/spamass.sock Jan 18 20:38:15 logout spamass-milter[30026]: spamass-milter 0.3.1 starting # spamass-milter -m -u nobody -f -p /var/spool/postfix/var/run/spamass.sock Jan 18 20:38:26 logout spamass-milter[30032]: spamass-milter 0.3.1 starting Next I restarted spamass-milter, but had exactly the same messages. All of the above taken from a guide on the Internet... which says something out users not being able to follow simple copy & paste instructions... :-D
