You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by mouss <mo...@netoyen.net> on 2007/10/01 16:31:31 UTC

Re: Discarding RBL-Mails, forwarding others

Dietmar Braun wrote:
> Wednesday, September 26, 2007, 12:12:13 PM, you wrote:
> m> then you should say what exactly you want to achieve. we could spend a month at guess games.
>
> I think I said all you have to know - the one missing was just the
> "domain dependent" thing.
>
>   
>>> Additionally, this rejects RBL listed mails - but I want to discard
>>> them to /dev/null...
>>>       
> m> This is a _bad_ idea. not only will you be wasting resources reading
> m> data that you want handle, but you run the risk of discarding legitmate
> m> mail.
> m> (note that reject != bounce).
>
> I know that. In this case, it's ok because it is a 100% spamtrap domain.
>   

I'm not sure I understand your goal. do you really want to not reject 
(421 or other) such mail at smtp time for some reason, or you don't care 
if it's a reject or a discard? do you want to discard so that client 
thinks the message was delivered (so it won't retry)?
> m> you can use rbl_reply_maps to set the reply code to 421 so that postfix
> m> closes the connection. only use this for those RBL that list zombes 
> m> (spamhaus pbl). otherwise, you'll need to watch your logs for retries 
> m> from MTAs and explicitely reject them.
>
> m> Please understand that this is not SA related. so followup on the 
> m> postfix users list.
>
> Since I know Postfix quite good, I think this cannot be done with
> Postfix features - you will need to expand it with SA and perhaps
> procmail.
>   

postfix has DISCARD action that you can use after SA. you can for 
example let SA add its headers, and in the after-the-filter postfix, use 
header_checks to looks for SA headers and discard mail if a match is found.