Re: [Exim] LDAP query failures

Top Page
Delete this message
Reply to this message
Author: Jeff
Date:  
To: Philip Hazel
CC: exim-users
Subject: Re: [Exim] LDAP query failures
That's exactly it -

In the directors I'm using a condition line -
condition = "${lookup ldap {ldap:///?Mailbox?sub?(Mail=$local_part@$domain)}
{yes} {no} }"

and in the transport on the file line -
file = ${lookup ldap {ldap:///?MailBox?sub?(Mail=$localpart@$domain)}
{$value} fail}

One thing I'm not entirely clear on is why a RCPT TO line would contain a to
field of that format and what we should do with it as it will never succeed
in the ldap lookup. Some of the lookups I get are of the following different
types -

user.name@???@domain.com
username@???, user.name@???
username@??? smtp username@???)
user.name@???@domain.com)
user.name@???@@domain.com)
etc...

Are these from dodgy mail clients ? Should I be rejecting the email
immediately or is it possible that exim is corrupting the ldap query ?


Thanks,
Jeff.

> On Wed, 4 Apr 2001, Jeff wrote:
>
> > I'm seeing messages of the type -
> >
> >
> >

"ldap://localhost/?ispMailbox?sub?(mail=mary@???;bruno@anotherdomai
> > n.com;tract@???)" gave DEFER: ldap search failed: ()
> >
> > in the exim panic log. These messages are obviously failing because

they
> > are invalid requests as the request should be a lookup for a single

mailbox
> > not a list. How is this sort of query appearing as exim will reject this
> > sort of input to a RCPT TO command.
>
> How is this query generated? I'm guessing that you've got something like
>
> ...(mail=$local_part@$domain)...
>
> in the original text. Is this right? Where are you using this query?
>
> I can see one way it might arise:
>
> RCPT

TO:<"mary@???>
>
> I have only recently realized that the manual is not very clear in
> describing what value you actually get in $local_domain. The value is
> dequoted, so that, for example, "x@y"@z and x\@y@z give rise to the
> same local part (namely x@y). It's a good idea to use
>
> ${quote:$local_part}@$domain
>
> in places where special characters in the local part might cause
> problems.
>
> --
> Philip Hazel            University of Cambridge Computing Service,
> ph10@???      Cambridge, England. Phone: +44 1223 334714.

>
>