Re: [Exim] SpamAssassin for all mail

Pàgina inicial
Delete this message
Reply to this message
Autor: Greg Ward
Data:  
A: exim-users
Assumpte: Re: [Exim] SpamAssassin for all mail
On 10 June 2002, j.linn said:
> We have a couple of mailhubs which look after all mail deliveries whether
> it is to local mailservers or to external sites.
>
> The SA configuration of EXIM3 works fine for local deliveries but I would
> also like to scan external deliveries as we don't want to send spam from
> this site (in theory).
>
> Any ideas on how to do this.


You could use the system filter. I have a couple of scripts that I use
for calling SA from the system filter:

http://satools.sourceforge.net/routespam.html

Read that whole page. You'll find a snippet of Exim filter code like
this:

  # If this message originated locally, or if it has already been
  # processed by spamcheck, then stop processing now.  Send it on as-is.
  if ($received_protocol is "local" or
      $received_protocol is "spamc" or
      $sender_host_address is "127.0.0.1" or
      $h_X-Spam-Flag: is not "") then
    finish
  endif


followed by piping the message to my routespam script, which runs spamc
and interprets its output.

You would obviously want to change this so locally-originating messages
are still scanned:

  if ($received_protocol is "spamc" or
      $h_X-Spam-Flag: is not "") then
    finish
  endif


With that small change, the tools at satools.sourceforge.net should be
useful for you.

        Greg
--
Greg Ward - software developer                gward@???
MEMS Exchange                            http://www.mems-exchange.org