Re: [exim] How would you do this?

Top Page
Delete this message
Reply to this message
Author: Mike Cardwell
Date:  
To: Exim Mailing List
Subject: Re: [exim] How would you do this?
Marc Perkel wrote:

>>> Looking up NZ records as follows:
>>>
>>> set acl_c_ns = ${lookup dnsdb{ns=$acl_c_sender_host_domain}{$value}fail}
>>>
>>> But what I want to do is look up each nameserver to see if any match a
>>> black list. How would I do that?
>>>
>> Define the blacklist. Is it a list of domain names or ip addresses for
>> example? I'm assuming the list will be made up of domains like the
>> following, but you weren't completely clear:
>>
>> ns1.example.com
>> ns1.badnameserver.org
>>
>> Define the lookup. Is it a dnsbl style lookup or something else?


> Yes - I want to look up each name in a name based dnsbl. What I'm hoping
> to do is lookup/create a name based blacklist based on the nameserver
> information.


The following would look up each nameserver for the domain
$acl_c_sender_host_domain and then check them in turn against the
ficticious rbl rhsbl.example.com until one succeeds.

dnslists=rhsbl.example.com/<|${lookup
dnsdb{>|ns=$acl_c_sender_host_domain}{$value}fail}

The following would do the same, but could be used in a condition or a
router:

${lookup dnsdb{>:a=<:${sg{${lookup
dnsdb{>:ns=$acl_c_sender_host_domain}{$value:}fail}}{:}{.rhsbl.example.com:}}}}

The second option is less readable, less efficient as it continues to do
lookups even after one has matched, but it can be used in more places.

*untested*

Mike