Author: Mark Sapp Date: To: exim-users Subject: [Exim] Ldap sender_address lookup
I would like to enable SMTP AUTH via LDAP with the username/password
query based upon the sender's domain. In essence, the main site will
receive mail from other domains, which happen to be subsidiary
companies. These companies are represented as organizational units
within the root dn...i.e. users at subcompany1.com would be found in
ou=people,ou=subcompany1,dc=maincompany,dc=com
When performing the authorization, I would like to lookup the sender's
email domain in a linear file and grab the appropriate ou name for that
domain. I've tried:
"${lookup ldap {user=\"${lookup \
ldapdn{ldap:///ou=people,ou=${lookup
{$sender_address}lsearch{/etc/ldap.domains}},dc=maincompany,dc=com?sn?sub?(&(uid=$2))}
{$value}{no}}\" pass=$3 \
ldap:///ou=people,ou=${lookup
{$sender_address}lsearch{/etc/ldap.domains}{$value}},dc=maincompany,dc=com?sn?sub?(&(uid=$2))}{yes}{n
o}}"