Re: [exim] LDAP lookup caching

Pàgina inicial
Delete this message
Reply to this message
Autor: Rafał Kupka
Data:  
A: exim-users
CC: Maykel Moya
Assumpte: Re: [exim] LDAP lookup caching
On Sat, Nov 03, 2007 at 03:27:27AM -0700, Phil Pennock wrote:
> On 2007-11-02 at 13:57 -0400, Maykel Moya wrote:

Hello,

> > Now I'm doing some ${extract {attrName} {${lookup ldap ... so the lookup
> > could be exactly the same whenever I need something from LDAP, but if
> > the results are not actually cached the ${extract are useless.



> Otherwise, you're looking at per-recipient lookups; to handle this, use
> the "address_data" option on a Router; this makes the value of the
> option available in the $address_data option in the Transport *AND* in
> later Routers (unless and until one of them uses the address_data
> option) and their Transports.


Value of $address_data is also available in acl_smtp_rcpt after
evaluation of verify = recipient. Very handy for per recipient options.

First local delivery router looks like:
address_data_fill:
    debug_print = "R: address_data_fill for $local_part@$domain"
    driver = redirect
    domains = +local_domains
    address_data = FILL_ADDRESS_DATA_MACRO
    data = :


Later routers, transports (with restrictions Phil wrote about) and post
verify = recipient ACL stanzas do string expansion like
${extract{attr_name}{$address_data}{$value}{}} to extract data from this
very one variable.

Regards,
Kupson