Can't you use the "mail" attribute instead? That will return the default reply address.
ldapsearch -Hldap://OURDC -s sub -x -D "mylogin@domain" -W '(samaccountname=*)' mail
If you're running this on a windows machine, you could use ldifde.exe instead. This is what I use to get proxyaddress details out and into an LDIF file.
Chris
-----Original Message----- From: openldap-technical-bounces+chris.clemson=ihg.com@OpenLDAP.org [mailto:openldap-technical-bounces+chris.clemson=ihg.com@OpenL DAP.org] On Behalf Of Michael Ströder Sent: 18 August 2008 10:18 To: Chris Henderson Cc: openldap-technical@openldap.org Subject: Re: ldapsearch - Active Directory proxyaddresses:smtp
Chris Henderson wrote:
I am trying to filter proxyaddress:smtp email addresses querying Active Directory. I need to use this for sendmail address lookup. I tried the following queries but they give a lot of extraneous information I don't need.
If you search for an entry all attribute values of attribute proxyaddress are returned. There's a LDAP extended control called valuesReturnFilter (see RFC 3876) for this use-case. But AFAIK MS AD does not implement it.
So you have to sort things out at the client side.
Ciao, Michael.