Re: [exim] Confused about lookups and ldap_default_servers

Top Page
Delete this message
Reply to this message
Author: Robert Bannocks
Date:  
To: exim-users
Subject: Re: [exim] Confused about lookups and ldap_default_servers

Thanks, is there a reason why this is so?
Would it be possible to put it on the list of desired changes.

Rob


Peter Bowyer wrote:

On 16/03/07, Robert Bannocks <R.Bannocks@xxxxxxxxx> wrote:

I want to set ldap_default_servers to get its data from the dns and have
developed a look up as follows:

ldap_default_servers = ${extract{4}{\ }{${extract{1}{!}{${lookup
dnsdb{>!srv=_gc._tcp.nhm.ac.uk}{$value}fail}}}}}


http://www.exim.org/exim-html-4.66/doc/html/spec_html/ch14.html


ldap_default_servers Use: main Type: string list Default: unset


No dagger sign next to the Type, so it doesn't get expanded.

Peter
--
Peter Bowyer
Email: peter@xxxxxxxxxx


> -----Original Message-----
> From: Robert Bannocks
> Sent: 16 March 2007 15:36
> To: 'exim-users@???'
> Subject: Confused about lookups and ldap_default_servers
>
> I want to set ldap_default_servers to get its data from the dns and

have
> developed a look up as follows:
>
> ldap_default_servers = ${extract{4}{\ }{${extract{1}{!}{${lookup
> dnsdb{>!srv=_gc._tcp.nhm.ac.uk}{$value}fail}}}}}
>
> (actually is is mopre complex but that should suffice for an example

of
> the problem)
>
> When I test this with exim -be this works:
>
> # exim -be
> > ${extract{4}{\ }{${extract{1}{!}{${lookup
> dnsdb{>!srv=_gc._tcp.nhm.ac.uk}{$value}fail}}}}}
> somehost.nhm.ac.uk
>
> However when I rely on this in the configuration file it fails.
> It seems that the string that is ldap_default_servers does not get
> interpreted
>
> Is this correct behaviour? Is my syntax wrong? At what time is this
> parameter interpreted, it at start time or at router run time?
>
> Any help appreciated.
>
> Extract from exim -bv -d+all for the appropriate router:
>
> 15:29:53 16404 expanding: user=LOOKUPACCOUNT pass=PASSWORD
>

ldap:///DC=nhm,DC=ac,DC=uk??sub?(&(mailNickname=${quote_ldap:$local_part
})
> (&(objectclass=person)(msExc
> hUserAccountControl=0)))
> 15:29:53 16404    result:  user=LOOKUPACCOUNT pass=PASSWORD

>

ldap:///DC=nhm,DC=ac,DC=uk??sub?(&(mailNickname=robt4)(&(objectclass=per
so
> n)(msExchUserAccountControl=
> 0)))
> 15:29:53 16404 search_open: ldapdn "NULL"
> 15:29:53 16404 search_find: file="NULL"
> 15:29:53 16404 key="user=LOOKUPACCOUNT pass=PASSWORD
>

ldap:///DC=nhm,DC=ac,DC=uk??sub?(&(mailNickname=robt4)(&(objectclass=per
so
> n)(msExchUserAccountControl=0)))"
> partial=-1 affix=NULL starflags=0
> 15:29:53 16404 LRU list:
> 15:29:53 16404 :/etc/aliases
> 15:29:53 16404 End
> 15:29:53 16404 internal_search_find: file="NULL"
> 15:29:53 16404 type=ldapdn key="user=LOOKUPACCOUNT pass=PASSWORD
>

ldap:///DC=nhm,DC=ac,DC=uk??sub?(&(mailNickname=robt4)(&(objectclass=per
so
> n)(msExchUserAccountC
> ontrol=0)))"
> 15:29:53 16404 database lookup required for user=LOOKUPACCOUNT
> pass=PASSWORD
>

ldap:///DC=nhm,DC=ac,DC=uk??sub?(&(mailNickname=robt4)(&(objectclass=per
so
> n)(msExchUs
> erAccountControl=0)))
> 15:29:53 16404 LDAP parameters: user=LOOKUPACCOUNT pass=PASSWORD

size=0
> time=0 connect=0 dereference=0 referrals=on
> 15:29:53 16404 perform_ldap_search: ldapdn URL =
>

"ldap:///DC=nhm,DC=ac,DC=uk??sub?(&(mailNickname=robt4)(&(objectclass=pe
rs
> on)(msExchUserAccountControl=0)))"
> server=${extract{4}{\ }{${extract{1}{!}{${lookup
> dnsdb{>!srv=_gc._tcp.nhm.ac.uk}{$value}fail}}}}} port=0 sizelimit=0
> timelimit=0 tcplimit=0
> 15:29:53 16404 after ldap_url_parse: host=${extract{4}{\
> }{${extract{1}{!}{${lookup
> dnsdb{>!srv=_gc._tcp.nhm.ac.uk}{$value}fail}}}}} port=0
> 15:29:53 16404 initialized for LDAP (v3) server ${extract{4}{\
> }{${extract{1}{!}{${lookup
> dnsdb{>!srv=_gc._tcp.nhm.ac.uk}{$value}fail}}}}}:389
> 15:29:53 16404 binding with user=LOOKUPACCOUNT password=PASSWORD
> 15:29:53 16404 failed to bind the LDAP connection to server

${extract{4}{\
> }{${extract{1}{!}{${lookup
> dnsdb{>!srv=_gc._tcp.nhm.ac.uk}{$value}fail}}}}}:389 -
> ldap_bind() returned -1
> 15:29:53 16404 lookup deferred: failed to bind the LDAP connection to
> server ${extract{4}{\ }{${extract{1}{!}{${lookup
> dnsdb{>!srv=_gc._tcp.nhm.ac.uk}{$value
> }fail}}}}}:389 - ldap_bind() returned -1
> 15:29:53 16404 failed to expand: ${lookup ldapdn { user=LOOKUPACCOUNT
> pass=PASSWORD
>

ldap:///DC=nhm,DC=ac,DC=uk??sub?(&(mailNickname=${quote_ldap:$local_part
})
> (&(o
> bjectclass=person)(msExchUserAccountControl=0)))}}
> 15:29:53 16404    error message: lookup of "user=LOOKUPACCOUNT
> pass=PASSWORD

>

ldap:///DC=nhm,DC=ac,DC=uk??sub?(&(mailNickname=robt4)(&(objectclass=per
so
> n)(msExchUs
> erAccountControl=0)))" gave DEFER: failed to bind the LDAP connection

to
> server ${extract{4}{\ }{${extract{1}{!}{${lookup
> dnsdb{>!srv=_gc._tcp.nhm.ac.uk}{$va
> lue}fail}}}}}:389 - ldap_bind() returned -1
> 15:29:53 16404 condition check lookup defer
> 15:29:53 16404 search_tidyup called
> 15:29:53 16404 unbind LDAP connection to ${extract{4}{\
> }{${extract{1}{!}{${lookup
> dnsdb{>!srv=_gc._tcp.nhm.ac.uk}{$value}fail}}}}}:389
> 15:29:53 16404 >>>>>>>>>>>>>>>> Exim pid=16404 terminating with rc=1
> >>>>>>>>>>>>>>>>