Re: [Exim] dnslookup blocking for an addresslist

Top Page
Delete this message
Reply to this message
Author: Jonathan Vanasco
Date:  
To: Andreas J Mueller
CC: exim-users
Subject: Re: [Exim] dnslookup blocking for an addresslist
Thats a pretty nice approach to the problem. thanks!

btw, i do want things to go to the next router on the list ... this
router is just a fix for a mail migration -- i've got 2 servers
pretending they're the same hostname and trying to communicate with
each other.

it would be nice if entire addresses were supported in the routers -
its odd that local_parts, domains, and a host of other address data /
testing is, except for the adddress itself



On Monday, June 30, 2003, at 02:30 PM, Andreas J Mueller wrote:

> Hi Jonathan!
>
>> addresslist myaddresses = lsearch;/path/to/file
>> dnslookup
>>         driver = dnslookup
>>         domains = ! +local_domains
>>>      local_parts = ! +myaddresses
>>         transport = remote_smtp
>>         no_more

>
>> problem is, i can only figure out how to do it with local_parts -- is
>> the entire address even supported? can't find anything in the exim4
>> specification or book
>
> Entire addresses are not directly supported in router preconditions.
> However, since the domains precondition is checked before local_parts,
> and local_parts is expanded, you can base your lookup on the $domain
> variable:
>
> local_parts = ! lsearch;/path/to/local_parts_dir/$domain
>
> You could then put all the local parts belonging to, e.g. the aol.com
> domain, in file /path/to/local_parts_dir/aol.com.
>
> Please also note, that a failed precondition will just cause the
> router to be skipped, not to be "failed". Exim will simply go on to
> the next router in the list, even if no_more is set. What you seem to
> want is something like this, just before the dnslookup router:
>
> fail_dnslookup:
> driver = redirect
> domains = dsearch;/path/to/local_parts_dir
> local_parts = lsearch;/path/to/local_parts_dir/$domain
> data = :fail:
> allow_fail
> no_more
>
> Or, if your Exim doesn't have support for dsearch compiled in:
>
> fail_dnslookup2:
>   driver = redirect
>   condition =
> ${lookup{$local_part@$domain}lsearch{/path/to/fail_addresses}\
>                 {yes}{no}}
>   data = :fail:
>   allow_fail
>   no_more

>
> Andy
>
> --
> Andreas J Mueller                             email: <andy@???>

>