> I want  to use Spamassassin on  our Postfix bastion mail  host to filter
> all mail before it's relayed to  our MAILSweeper (which then forwards to
> Exchange).

I use the content filtering facility in Postfix.
I get Postfix to call procmail as the content filter and then use
procmail to call spamc/spamd and I then go on to call amavis/amavisd/sophie
as my virus scanner. Amavisd then sends the message back into Postfix.

main.cf includes :-

content_filter = vscan:

master.cf includes :-

vscan     unix  -       n       n       -       5       pipe user=vscan
        argv=/usr/local/bin/procmail -m /etc/postfix/procmailrc ${sender} 
${recipient}
localhost:10025 inet n  -       n       -       -       smtpd
        -o content_filter= -o local_recipient_maps=

procmailrc includes :-

EXITCODE=0
some spam checking that sets SPAAM=1 if it thinks it is spam, then :-

:0
* SPAAM ?? 0
{
  :0fw
  |/usr/local/bin/spamc

  :0 H
  * X-Spam-Flag: YES
  {
     SPAAM=1
  }
}

:0
* SPAAM ?? 1
{
        do something with the spam
        eg
        EXITCODE=77
        dump it somewhere
}

# We don't think it is to be filtered out,
# so let delivery occur ...
# scanning for viruses

SENDMAIL=/path/to/amavis

:0W
! "$@"

# We get here if amavis failed, so pass back the error
EXITCODE=75
:0e
/dev/null

This appears to work, but no guarantees ;-)
I use the daemonised versions of spamassassin, amavis and sophos (sophie)
as this has a major impact on the load of our elderly mailhost.

Geoff

UK-Human Genome Mapping Project-Resource Centre,
Hinxton, Cambridge, CB10 1SB, UK
Tel: +44 1223 494530  Fax: +44 1223 494512  E-mail: [EMAIL PROTECTED]


_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to