[exim] Check if LDAP server can be reached

Top Page
Delete this message
Reply to this message
Author: Moritz Wilhelmy
Date:  
To: exim-users
Subject: [exim] Check if LDAP server can be reached
Hello,

On my setup, LDAP lookups happen through NSS. If the LDAP server goes
down, the lookup fails, and the mail gets permanently rejected. I'd like
to either reject it only temporarily or accept all messages if the LDAP
server is down/can't be reached and freeze them.

I tried a simple lookup like this
${if eq{\
    ${lookup ldap{ldaps:///ou=People,dc=bla?uid?sub?(uid=${quote_ldap:$local_part)}}}}\
    {$local_part}\
    {true}{false}}


However, if the LDAP server can't be reached, it "generates an error"
(as described in the specification). What is the correct way to handle
such an error? Am I trying to do something stupid?


Best regards,

Moritz