Re: [exim] Denying spam and keeping a copy for me

Etusivu
Poista viesti
Vastaa
Lähettäjä: Dennis Davis
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] Denying spam and keeping a copy for me
On Tue, 25 Oct 2005, John Oxley wrote:

> From: John Oxley <john@???>
> To: exim-users@???
> Date: Tue, 25 Oct 2005 13:32:50 +0200
> Subject: [exim] Denying spam and keeping a copy for me
>
> Exim 4.51 with Spam Assassin.
>
> I am denying spam in the DATA acl with 
>    deny  message     = This message scored $spam_score points.  Congratulations!
>       condition   = ${if <{$message_size}{80k}{1}{0}}
>       spam        = spamd:true
>       condition   = ${if >{$spam_score_int}{80}{1}{0}}

>
> When a message gets denied, how can I catch that message for
> inspection to check that it actually is SPAM? Is it an Exim thing
> or a SpamAssassin thing?


It's an exim thing. One way to do this is to use:

control = fakereject

in an accept clause. The connection site gets a 550 rejection but
the message is accepted for delivery. See Section 39.18 of the
manual. Note it says this facility should be used with extreme
caution.

You'd write something like:

    accept
       condition   = ${if <{$message_size}{80k}{1}{0}}
       spam        = spamd:true
       condition   = ${if >{$spam_score_int}{80}{1}{0}}
       control     = fakereject/This message scored $spam_score points.


(I *haven't* tested the above.)

You might want to redirect the message to a special mailbox,
delivery address etc.  I use this technique to pick up viruses that
are detected by just one of the virus scanners I use, and not both.
However the last thing you want to do is actually deliver the message
in this case.  That's why I divert the message elsewhere.
-- 
Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK
D.H.Davis@???               Phone: +44 1225 386101