Re: [Exim] Ldap sender_address lookup

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Mark Sapp
Date:  
À: exim-users
Sujet: Re: [Exim] Ldap sender_address lookup
It seems as if the $sender_address_domain variable is empty when I try
to access it. I thought perhaps the lsearch was hosed, so I modified
the code using extract:
ldapdn{ldap:///ou=people,ou=${extract{-2}{.}{$sender_address_domain}},dc=maincompany,dc=com?sn?sub?(&(uid=$2))}{$value}{no}}\"
pass=$3 \
ldap:///ou=people,ou=${extract{-2}{.}{$sender_address_domain}},dc=maincompany,dc=com?sn?sub?(&(uid=$2))}{yes}{no}}"

The query still returns a blank ou. Suggestions?

-M

jvanasco@??? wrote:

>
> 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/ ##
>>
>
>
>