[Exim] Re: Exim+LDAP,Can't contact LDAP server

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Alexander G. Jerjomin
Data:  
Para: exim-users
Assunto: [Exim] Re: Exim+LDAP,Can't contact LDAP server
On Fri, Feb 13, 2004 at 12:56:48PM +0100, Daniel Tiefnig wrote:
> Alexander G. Jerjomin wrote:
> > acl_check_rcpt:
> >
> >   deny  message = DISABLED!!!
> >     domains = +protected_domains
> >     condition = ${lookup ldap \
>  >     {ldap://SERVER/dc=test,dc=test??sub?(uid=$local_part)}{0}{1}}

> >
> >
> > If LDAP is down on SERVER exim returns
> > 451 Temporary local problem - please try later
> >
> >
> > but I want to accept mail if LDAP is down.
>
> Well, you could do a lookup for a "static" address before trying the
> actual one, and if LDAP doesn't return something assume the server is
> down, and accept the mail:
>
> accept domains = +protected_domains
>         condition = ${lookup ldap {ldap:[...](uid=test)}{0}{1}}

>
> (LDAP stuff snipped out.)
>
> Or combine both lookups:
>
> deny  message = DISABLED!!!
>        domains = +protected_domains
>        condition = if{ and {{${lookup ldap "uid=test"}{1}{0}}\
>                             {${lookup ldap "uid=$local_part"}{0}{1}}}\
>                      }


Exim can't make lookup for a "static" address before trying the actual one if LDAP is down.

Exim mainlog:
2004-02-13 12:53:04 H=exim.host [ip] F=<mail> temporarily rejected RCPT <email>:
failed to expand ACL string "${lookup ldap
{ldap://SERVER/dc=DC1,dc=DC2??sub?(uid=$local_part)}{0}{1}}":
lookup of "ldap://SERVER/dc=DC1,dc=DC2??sub?(uid=test)" gave
DEFER: failed to bind the LDAP connection to server SERVER:389 -
LDAP error 81: Can't contact LDAP server

and exim returns to sender
451 Temporary local problem - please try later

and exim does not accept letter.

Is it possible to configure exim to accept letters if LDAP server is switched off?