Re: [exim] Filtering bad domains

Top Page
Delete this message
Reply to this message
Author: Marc Perkel
Date:  
To: exim-users
Subject: Re: [exim] Filtering bad domains


Dave Lugo wrote:
> On Sun, 15 Oct 2006, Marc Perkel wrote:
>
>> Looking for ACL rules that I can use to drop bad sender domains. This
>> would include domains that don't exist. Domains where DNS servers refuce
>> the request as opposed to just failing to respond, and other things that
>> let me know the domain itself is bogus.
>>
>>
>
> Didn't this get covered a few weeks ago?
>
> defer !verify = sender
>
> Trying to get much more fancy than that may result
> in 5xx'ing mail from domains that are having temporary
> issues. (at least that's my understanding)
>
>


I don't want to defer it. I have some targeted sender verification but
raw sender verify has too many false positives. What I want to do is do
a hard bounce on domains that don't exist. Here's some code I found but
it doesn't catch everything.

drop    message = No MX or A record for sender domain F=$sender_address
    !senders = :
    condition = ${if and {\
                    {eq {${lookup 
dnsdb{a=$sender_address_domain}{$value}{NONE}}}{NONE}}\
                    {eq {${lookup 
dnsdb{mx=$sender_address_domain}{$value}{NONE}}}{NONE}}\
                    }\
                    {yes}{no}}


This could probably use some cleanup.