Re: [exim] manualroute with ldap lookup problem

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Andy Firman
CC: exim-users
Sujet: Re: [exim] manualroute with ldap lookup problem
On Wed, 20 Oct 2004, Andy Firman wrote:

> smart_route:
> driver = manualroute
> domains = !+local_domains : +relay_to_domains
> condition = ${lookup ldap \
> {ldap://nvmtest.firmdog.info/dc=firmdog,dc=info(mail=${quote_ldap:$local_part}@${quote_ldap:$domain})}}
> transport = remote_smtp
> route_list = * nvmtest.firmdog.info
> no_more
>
> The router works fine when I comment out "verify = recipient" in the ACL area.
> (makes sense)
>
> When I actually verify recipient, I get this in the logs:
> "temporarily rejected RCPT <andy@???>: lowest numbered MX record points to local host"
>
> Why? Of course the lowest numbered MX points to local host.
>
> Is it saying that because the lookup is failing?


Probably. The lookup probably fails because when verifying, the code is
run as "exim", not as "root". The way you've coded it, a failing lookup
generates an empty string; thus the condition is false and the router
does not run. The next router is presumbly the one that is then trying
to route the address.

> Any ideas?


(1) Note that the result of a "condition" expansion should be yes/no or
true/false or 1/0. Does your lookup yield that (when it works)?

(2) Test with -bh to see what is actually happening. Add -d for even
more debugging information.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book