Re: [exim] No bounce for spam.

Top Page
Delete this message
Reply to this message
Author: Todd Lyons
Date:  
To: Paweł Zadrąg
CC: exim-users
Subject: Re: [exim] No bounce for spam.
On Wed, Apr 8, 2009 at 5:07 AM, Paweł Zadrąg <p.zeddi@???> wrote:
> Hi, mighty list...
>
> My situation is as follows:
> I have a antispam system which forwards all messages to exim, if a
> message is spam, antispam system adds
> "X-Spam: YES" header. If message contains "X-Spam: YES" header,
> meaasge is put into "Spam" inbox, which can be eventually checked by
> end user.


Filtering into subfolders as it's delivered like you are doing is ideal IMHO.

> But lot's of messages as passed to exim (messages with "X-Spam: YES"
> header) and then bounced back.


So your front end is accepting the email without scanning and
forwarding to your internal exim machine. For what reason would the
exim system bounce the message back? The front end should only accept
the email if it passes all RBL and user exists tests, so exim should
never have to bounce it, it should just deliver locally.

However... If you're accepting email destined for a _forwarded_
mailbox, say AOL or Hotmail or Gmail, this is much more difficult.
Whether you detect it is spam or they refuse to accept it because they
call it spam, you are in a pickle because technically you must send a
bounce back. But since it's spam, the sender is forged. Now you're
stuck. So your solution is to blackhole it and not to send a bounce
if you marked it as spam. I can understand that, just be aware you're
going to get some false positives.

> All I want to do is to stop bouncing if message is "X-Spam: YES".
> And, the question is: how to achieve that.


This is untested, so syntax may be incorrect, but I'd probably start
with this in your routers which do remote smtp delivery:
condition      = ${if eq{$h_x-spam:}{YES} {false}{true}}


-- 
Regards...      Todd