[Exim] LDAP woes

Top Page
Delete this message
Reply to this message
Author: Lauri Tischler
Date:  
To: exim-users@exim.org
Subject: [Exim] LDAP woes
I'm sort of stumped. I'm trying to write a director to get user dn
from LDAP and the generate final email-address for the user.

In the director I make a ldapdn lookup to LDAP and I try to get
the dn somewhere so that I could then extract fields and make
new_address.
There is user Tom Brown, his user id is tomb and he is located in
organization Sjarvi. His mail is located in machine sjarvi, so
the new address would be tomb@???

The lookup is here:
....
local_parts = ${extract{cn}{${lookup ldapdn
{ldap://srvr.efore.fi/??sub?(&(mail=$local_part@$domain)
(objectclass=newPilotPerson))}}}}

....

It appears to almost work, here is debug info
....
perform_ldap_search: ldapdn URL
="ldap://srvr.efore.fi/??sub?(&(mail=tom.brown@???)
(objectclass=newPilotPerson))" server=NULL port=0 sizelimit=0
timelimit=0
Opened connection to LDAP server srvr.efore.fi:389
Binding with user=NULL password=NULL
Start search
ldap_result loop
LDAP entry loop
search ended by ldap_result yielding 101
LDAP search: returning: cn=Tomb,o=Sjarvi,organizationname=EFORE
lookup yielded: cn=Tomb,o=Sjarvi,organizationname=EFORE
tom.brown in "Tomb,o=Sjarvi,organizationname=EFORE"? no (end of list)
ldap_lookup director skipped: local part mismatch
....

the ldapdn returns correct dn info but then instead of getting data
in $localparts_data the darn thing fails

Must be something simple, like me...

--
Lauri Tischler, Network Admin
Tel:    +358-9-47846331        *       Mouse movement detected      *
Fax:    +358-9-47846500        * Reboot Windows to activate changes *
Mobile: +358-40-5569010    
EMail:  lauri.tischler@???