[Exim] Cache $address_data from verification, and make it av…

Top Page
Delete this message
Reply to this message
Author: Tore Anderson
Date:  
To: exim-users
Subject: [Exim] Cache $address_data from verification, and make it available to routers
Hi. I'd like to request an addendum to the WishList. It could
possibly be seen as an amendment of this one:

    (191) 26-Aug-03 M  Preserve $address_data for a verified recipient


    The idea is to preserve it in the recipients data structure so that
    local_scan can have access to it.


However, I want the cached $address_data to be visible to the routers
as well as local_scan. The reason for this is to be able to keep the
number of external lookups as small as possible, for performance
reasons. Quite often I end up setting up Exim like this:

    begin acl
    rcpt:
      [...]
      accept domains = +ldap_domains
             endpass
             verify = recipient
      [...]


    begin routers
    getdata:
      driver = redirect
      domains = +ldap_domains
      unseen
      data = ""
      address_data = ${lookup ldap {...}}
    [...]


The reason is of course that after I run that first router, I've
made sure to fetch all the information I will possibly need during
subsequent routing, so the number of LDAP lookups is limited to one.

However, when a message arrives over SMTP (usually that's the case for
almost all messages, in my setups), two identical lookups are made,
one when verifying the recipient, and one when routing her. That's
costly and inefficient, as the result will always be the same.

What I would like to do is to simply add

    condition = ${if def:address_data {no}{yes}}


to the getdata router, which will ensure that there will be only one
lookup per address.

Thanks,
--
Tore Anderson