> 
> Very cool.  I think that's exactly what we want.  How is the handoff
> to clamav handled?  I would probably want that to be on the external
> server too.

Here you go.  Smtp, well, that should be obvisous.  Anyway, it' hands it off to 
[IP]:PORT (clamsmtpd) which will then call back on 9993.  9993 will then hand 
it off to the spamassassin PIPE, which will then call the 
/etc/postfix/spamassassin-filter.sh script.  From there it's inject back into 
postfix to continue on it's way.  You do need to make sure you start 
spamassassin the array with "-i 0.0.0.0 -A 0.0.0.0/0" where 0.0.0.0 and 
0.0.0.0/0 are your network settings, so as not to allow random access to your 
SA server.  Make sure you have the clamsmtpd to make this work properly.

If you are going to go through all of this trouble, I should probably ask are 
you also running sometype of greylisting as well? 

/etc/postfix/spamassassin-filter.sh: (tweak the command options to fix your 
needs).
spamc -u filter -d IP  | sendmail -i "$@"

/etc/postfix/master.cf
smtp inet  n       -       n       -       -       smtpd -o 
content_filter=scan:[IP]:PORT
          -o myhostname=yada
9993      inet  n       -       n       -       -       smtpd
          -o content_filter=spamassassin:dummy
          -o 
smtpd_recipient_restrictions=permit_mynetworks,reject_unauth_destination
spamassassin unix  -       n       n       -       32      pipe
          flags=Rq user=filter argv=/etc/postfix/spamassassin-filter.sh -f 
${sender} -- ${recipient} 


That's all I can think of right now.  There's probably more.

Reply via email to