>
> Subject: [Exim] Help with LDAP, please?
>
> Hi, everyone -
>
> I'm totally stuck trying to get Exim-3.12 to do an aliases-style
> lookup using ldap.
>
> The setup is:
>
> 1. In the directors part of the config file I've got the following
> set up
>
> system_aliases:
> driver = aliasfile
> search_type = ldap
> query = "user=\"cn=postmaster,dc=hw,dc=ac,dc=uk\" pass=notRealPwd
> -
> ldap:://rm03pc1.cen.hw.ac.uk/cn=${local_part},ou=Accounts,
> -
> dc=hw,dc=ac,dc=uk?uid"
> # user = exim
> file_transport = address_file
> pipe_transport = address_pipe
>
> (the query string is folded at the '-' for ease)
>
> 2. The ldap entries for each user look like this:
>
> dn: uid=cenkjc, ou=Accounts, dc=hw, dc=ac, dc=uk
> objectclass: top
> objectclass: account
> objectclass: posixAccount
> objectclass: hwAccount
> cn: Kevin Collins
> uid: cenkjc
> uidnumber: 502
> gidnumber: 297
> gecos: K.J.Collins
> homedirectory: /home/cen/cenkjc
> loginshell: /bin/csh
> hwmailname: K.J.Collins
> hwmaildelivery: cenkjc@???
>
> When I try looking something up using exim:
>
> exim -bt K.J.Collins@???
>
> I get an error
>
> K.J.Collins@??? cannot be resolved at this time:
> search_find deferred: malformed parameter setting precedes LDAP URL
>
> Any help appreciated.
>
> Thanks,
>
> Kev.
>
> ___________________________________________________________
> Kevin Collins, Computing Services | Tel 0131 451 3791
> Heriot-Watt University, EDINBURGH |
> EH14 4AS, Scotland, UK | Fax 0131 451 3261
> ___________________________________|_______________________
>
I think your LDAP query is wrong.
the general form is LDAP://url:port/searchbase?attribute?scope?filter
In your LDAP request, the search base is the point in the directory tree where tou start the search. It
should be something like dc=hw,dc=ac,dc=uk or dc=ac,dc=uk if you want to search from a higher level.
the attribute is what you search. uid seems correct.
the scope should be sub. (it means that it is a subtree search)
the filter should be the search condition. I don't know exactly what you
search, so I can't help you more.
Yann Algayon