[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Spamassassin + exim



On Fri, 2003-08-29 at 12:23, Jeff Elkins wrote:
> Is there a FAQ available for setting up Spamassassin and exim?  Googling found 
> several for SA + postfix, but not for exim.
> 
> Thanks,
> 
> Jeff Elkins
> 

I'm not sure if there is a complete FAQ available.  This is how I have
spamc integrated into the exim delivery sequence:

I only needed to add two sections to the exim.conf file and make
configure spamd to be running.

To the transports section add the following:

spamc_delivery:
        driver = pipe
        command = "/usr/bin/spamc -e /usr/sbin/exim -oMr spam-scanned -i
-f ${sender_address} ${pipe_addresses}"
        user = mail
        group = mail
        current_directory ="/tmp"

This specifies to "deliver" mail through spamc which will then be
redelivered into exim with the received protocol (-oMr) set to
spam-scanned.

In the directors section add:

spamcheck:
  driver = smartuser
  transport = spamc_delivery
  # When to scan a message :
  #   -   it isn't already flagged as spam
  #   -   it isn't already scanned
  condition = "${if and { {!def:h_X-Spam-Flag:} {!eq
{$received_protocol}{spam-scanned}}} {1}{0}}"

right after the real_local stanza so all incoming mail not grabbed by
real_local gets routed into the spamcheck director hence sent through
spamc.  After it's been "spam-scanned" it passes this director and gets
delivered however you have it configured below this stanza.

--mike



Reply to: