[Exim] LDAP lookup in router condition

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Gregg Berkholtz
Datum:  
To: exim-users
Betreff: [Exim] LDAP lookup in router condition
I'm trying to setup an exim router that routes mail to a particular
server based on a successful LDAP lookup. Is this possible within
Exim? If so, can anyone help me understand what I'm doing wrong?

Currently, I'm using a flatfile:
imaplist:
driver = domainlist
condition ="${lookup{$local_part}lsearch{/etc/exim/imapusers}{yes}{0}}"
transport = remote_smtp
domains = domains.com
route_list = "* host.domain.com byname"

The flatfile works fine, but, we need to move to LDAP for simplicity of
account administration.

This is what I've got for the LDAP lookup condition, though I cant seem to
catch anything with it. I do see successful queries against the ldap
server:
ldapRoute:
driver = domainlist
condition ="${lookup ldap{ldap://ldapmaster.domain.com:389/ou=People,dc=domain,dc=com?uid?base?uid=${local_part}}{yes}{0}}"
transport = remote_smtp
domains = domains.com
route_list = "* host.domain.com byname"

What the ldap server shows:
Jun 28 13:24:18 host slapd[27504]: conn=6 op=0 BIND dn="" method=128
Jun 28 13:24:18 host slapd[27504]: conn=6 op=0 RESULT tag=97 err=0 text=
Jun 28 13:24:18 host slapd[27504]: conn=6 op=1 SRCH base="ou=People,dc=domain,dc=com" scope=0 filter="(uid=greggberkholtz)"
Jun 28 13:24:18 host slapd[27504]: conn=6 op=1 SEARCH RESULT tag=101 err=0 text=
Jun 28 13:24:18 host slapd[27504]: conn=6 op=2 UNBIND
Jun 28 13:24:18 host slapd[27504]: conn=-1 fd=14 closed

Gregg Berkholtz