Re: [Exim] Ldap sender_address lookup

Pàgina inicial
Delete this message
Reply to this message
Autor: jvanasco
Data:  
A: Mark Sapp
CC: exim-users
Assumpte: Re: [Exim] Ldap sender_address lookup
I've got a lookup similar to that, but not as complex

maybe this snippet will help you:

ldap:///
fqdn=$sender_address_domain,ou=Email,o=mobwire,dc=redivi,dc=com?maildir?
sub?mail=${quote_ldap:$sender_address}

i know for certain it is possible, i haven't had enough coffee this
a.m. to take a stab at it though






On Thursday, August 14, 2003, at 03:51 AM, Mark Sapp wrote:

> 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}}"
>
> ldap.domains looks like:
> subcompany1.com : subcompany1
>
> The query errors out as a malformed DN - the second ou is blank.
>
> Is this even possible, or should I just put the crack pipe down?
>
> Thanks,
> -Mark
>
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users
> Exim details at http://www.exim.org/ ##
>