Re: [exim] Address_data persistence problem

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Russell Wilton
CC: exim-users
Sujet: Re: [exim] Address_data persistence problem
On Thu, 28 Jul 2005, Russell Wilton wrote:

> peer_hub:
> driver = manualroute
> transport = remote_smtp
> domains = +virtual_domains
> address_data = ${lookup ldap{USER PASS ldap:///.....} {$value} fail }
> route_data =
>
> The 'fail' on the end of the lookup, and the blank route_data mean that the
> router will always decline whether the LDAP lookup succeeds or not.


Instead of "fail" just let it set a blank string; surely that does what
you want?

> The solution, although I haven't implemented it yet, seems to be to change my
> LDAP lookup to replace the trailing 'fail' with a '{}' so that the
> address_data will get cleared if the lookup fails, like this:
>
> address_data = ${lookup ldap{USER PASS ldap:///.....} {$value} {} }


Yup. Or even

address_data = ${lookup ldap{USER PASS ldap:///.....}}

because those values are the default.

> I realize my configuration has an error, but it was an easy mistake to make
> and it appeared to run correctly for months before I noticed there was a
> problem.


I will document the fact that, when the expansion for address_data is
forced to fail, the value of $address_data is not changed.

> I wonder if other people could be spared some grief with this subtle
> error by making address_data a little less persistent. Perhaps the
> address_data should get cleared at the start of each pass through the routers.


That would almost certainly break things. Resetting address_data before
expanding a new value for it might not, but I suspect that it still
might. I'd rather leave it the way it is and improve the documentation.


-- 
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