Re: [exim] LDAP second level queries?

Góra strony
Delete this message
Reply to this message
Autor: Mikhail Golub
Data:  
Dla: exim-users
Temat: Re: [exim] LDAP second level queries?
13.06.2017 12:55, Marco Gaiarin пишет:
>
> I've googled a bit around but i've not found relevant info.
>
>
> I need to do ''second level'' or ''nested'' ldap queries, because i need to
> found user in a ''group of names'' (really: an AD LDAP server).
>
> So, a first query have to return DNs for every member in a group, and a
> second query have to extract UID fron the DNs.
>
>
> How can achieve that? Thanks.
>


Hi.
Maybe this?
It's a router return addresses of group members.
Works with AD.


data = ${sg \
                 { ${lookup ldapm {LDAP_AUTH 
ldap:///DC=CORP,DC=COM?mail?sub?(&(objectClass=user)(mail=*)(memberOf:1.2.840.113556.1.4.1941:=\
                   ${sg { ${lookup ldapm {LDAP_AUTH 
ldap:///OU=MYOU,DC=CORP,DC=COM?distinguishedName?sub?(&(proxyAddresses=smtp:${quote_ldap:$local_part}@$domain)(objectclass=*))}}\
                   } {,,} {,} } ))}} } {\n} {,} }



--
Mikhail Golub