In a new server setup, I use two consecutive transport lookups:
transport_maps = ldap:/etc/postfix/foo.cf ldap:/etc/postfix/bar.cf
The lookup defined in foo.cf MAY return a result for a given recipient,
while using bar.cf MUST return a result. This works, but with a caveat:
Adding or removing the relevant attribute for the foo.cf based lookup is
not recognised by my Postfix tests until I run "postfix reload".
ldap_table(5) mentions that all cache* LDAP parameters are ignored, so I
assume I cannot affect result caching there. As a consequence, I tried
setting the following queue manager parameters:
qmgr_message_recipient_limit = 1
qmgr_message_recipient_minimum = 1
However, this does not resolve the issue, even if I use changing
recipient addresses in an attempt to flush the qmgr in-memory status
cache.
I have two questions which I hope you guys can answer:
1. How do I force Postfix to perform an LDAP lookup every time a new
inbound message arrives (i.e., how to disable caching lookup results)?
2. Can I configure a single LDAP lookup instead of two sequential ones,
which behaves according to the following pseudocode:
x = ldap_lookup_recipient_record(envelope_to_address)
if x.has_attribute(alpha)
return x.value_of_attribute(alpha)
else
return x.value_of_attribute(beta)
Your help is appreciated.
-Ralph