[exim] Using Exim with LDAP

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Luca Bertoncello
Dátum:  
Címzett: exim-users
Tárgy: [exim] Using Exim with LDAP
Hi again,

I'm trying to use Exim with LDAP (Active Directory) and I cannot figure out
how I have to search for the user...

If I search with ldapsearch:

ldapsearch -x -h dc1.cch.intra -D "CN=system,CN=Users,DC=cch,DC=intra" -W -b
"cn=users,dc=cch,dc=intra" -s sub
"(&(objectClass=user)(!(isCriticalSystemObject=TRUE))(mail=*))" sAMAccountName

I get the full list of the users on the system, that have an E-Mail.
Well, now I have to use this query in Exim, so I wrote:

hide ldap_default_servers = <; dc1.cch.intra:3268
LDAP_AD_BINDDN = "CN=system,CN=Users,DC=cch,DC=intra"
LDAP_AD_PASS = "myVerySecret"
LDAP_AD_BASE_DN = "CN=Users,DC=cch,DC=intra"
LDAP_AD_MAIL_RCPT = \
  user=LDAP_AD_BINDDN \
  pass=LDAP_AD_PASS \
  ldap:///LDAP_AD_BASE_DN\
  ?sAMAccountName?sub?\
  (&\
    (objectClass=user)\
    (!(isCriticalSystemObject=TRUE))\
    (mail=*)\
  )


and then in the router:

localWrite_gw:
driver = redirect
allow_filter
domains = +local_domains
user = EXIM_UID
group = EXIM_GID
data = ${lookup ldap {LDAP_AD_MAIL_RCPT} {# EXIM Filter\n\nsave /var/spool/mail/$value/Maildir}fail}
redirect_router = loopbackRouter
reply_transport = autoresponder
pipe_transport = address_pipe
file_transport = address_file
directory_transport = address_file
no_more

But it does not work...
exim -bt lucabert@??? always say:

lucabert@??? is undeliverable: Unrouteable address

What am I doing wrong?

Thanks and sorry for the question, this is the first time I use Exim with
LDAP...

Regards
Luca Bertoncello
(lucabert@???)