Re: [Exim] assigning variables from pieces of a lookup

Pàgina inicial
Delete this message
Reply to this message
Autor: Colin Sampaleanu
Data:  
A: exim
CC: 'Exim-Users (E-mail)'
Assumpte: Re: [Exim] assigning variables from pieces of a lookup
exim@??? wrote:

>>So the question is, how can I assign a value to
>>transport_home_directory, short of doing another lookup?
>>
>>
>
>Exim caches the last lookup anyway so there wouldn't be that big a loss
>from simply running the exact same query again. I think ;) From the
>manual...
>
>9.7. Lookup caching
>-------------------
>An Exim process caches the most recent lookup result on a per-file basis
>for single-key lookup types, and keeps the relevant files open. In some
>types of configuration this can lead to many files being kept open for
>messages with many recipients. To avoid hitting the operating system
>limit on the number of simultaneously open files, Exim closes the least
>recently used file when it needs to open more files than its own
>internal limit, which can be changed via the lookup_open_max option.
>
>For query-style lookups, a single data cache per lookup type is kept.
>The files are closed and the caches flushed at strategic points during
>delivery - for example, after all routing is complete.
>
>Ted.
>
>
>

I think what may also work is using

ldap_user:
driver = redirect
hide data = ${lookup ldapm
{user="cn=mailldapquery,ou=people,dc=whatever,dc=com" pass=whatever
ldap://localhost:389/ou=mailaccounts,dc=whatever,dc=com?homeDirectory?sub?(uid=${local_part})}}

file_transport = local_delivery
transport_home_directory=$address_file
unseen
cannot_route_message = Unknown user

$address_file is supposed to be available for the append transport
(which is what I'm using) and set by the redirect router. The only issue
is if it's available in the router itself. I will try this tonight, and
fallback to the dual lookup, if nobody comes up with other suggestions.