Re: [exim] Implementing laser.txt LDAP draft...

Top Pagina
Delete this message
Reply to this message
Auteur: Phil Pennock
Datum:  
Aan: Marco Gaiarin
CC: exim-users
Onderwerp: Re: [exim] Implementing laser.txt LDAP draft...
On 2012-02-14 at 14:58 +0100, Marco Gaiarin wrote:
>   route_data = ${if !eq{\
>         ${if eq{${lookup ldap {LOCAL_MAILHOST_LDAP_ROUTE_QUERY}}}{}\
>                 {DEFAULT_MAILHOST_NAME}\
>                 {${lookup ldap {LOCAL_MAILHOST_LDAP_ROUTE_QUERY}}}}\
>         }{LOCAL_MAILHOST_NAME}{\
>                 ${if eq{${lookup ldap {LOCAL_MAILHOST_LDAP_ROUTE_QUERY}}}{}\
>                 {DEFAULT_MAILHOST_NAME}\
>                 {${lookup ldap {LOCAL_MAILHOST_LDAP_ROUTE_QUERY}}}}\
>         }{}}


> But... ok that query are cached, but doing 4 times the same lookup on a
> router is the right thing?


Yes: it's all evaluated within the same context, so if you use
"exim -d+lookup+expand" then you should see that the results are pulled
from the cache.

*If* you were also going to do this in the transport, then it would make
sense to use "address_data = ..." on the router, to stash away the
value.

> Again, i've read and test that if route_data are empty, the router are
> skipped; but there's a better way to ''skip'' this router, so again
> better condition writing?


condition = ${lookup ldap {LOCAL_MAILHOST_LDAP_ROUTE_QUERY}{yes}{no}}

> Also, if the destination server (in this example, mail.pp.lnf.it) are
> down, unreachable or generically ''on error'', what this router will
> do?


The Router doesn't attempt to connect. It decides what should be done
but the connection is then done in the Transport. If the remote host
is down, the message will hold in Exim's queue.

The retry configuration then applies, for deciding when to send back
warnings and when to give up.
--
https://twitter.com/syscomet