[Exim] src/lookups/ldap.c in Exim 4.12

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Peter A. Savitch
Dátum:  
Címzett: Philip Hazel
CC: exim-users
Tárgy: [Exim] src/lookups/ldap.c in Exim 4.12
Hello people,

My scenario is:

1) I have two LDAP servers, primary and slave.

1) LDAP servers are told to close idle connections within the
given timeout.

2) Exim uses those two servers in a 4.12 "chained" way,
"this-fail-ask-next".

I observe periodical mail recipient rejection, especially on large
envelopes with many recipients. As I can see from the code, Exim tries
to use cached LDAP connections, but if one is closed from the
server-side, ldap_errno() is obviously LDAP_SERVER_DOWN. Then Exim
tries to switch to the next available server. If Exim gets stucked
again with DNS lookups/etc, my slave server also closes idle
connection. Again, Exim gets LDAP_SERVER_DOWN on a last available
server, and gives up with the rest of recipients.

Opposing to MySQL, LDAP client API does not have any kind of automatic
reconnection (rebinding) logic triggered by flags/etc. That's why this
lookup issue seems to be LDAP-specific.

I think that Exim LDAP connection caching/binding logic should be
reviewed in such a way that Exim should try to unbind/connect/bind
cached connection once before giving up with the server. This gives
some overhead when server is just gone.

What do You think?

2 Philip: no problem, I can handle it. Just asking before coding ;-)

--
Best regards,
 Peter                          mailto:spam4octan@highway.ru