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. Any help would be much appreciated. Thanks.
- ldapsearch -x -h 192.168.25.16 -p 3268 -b "DC=company,DC=com" "(&(proxyAddresses=SMTP:*))"
- ldapsearch -x -h 192.168.25.16 -p 3268 -b "DC=company,DC=com" -P2 -s sub "objectclass=*" SMTP
- ldapsearch -x -h 192.168.25.16 -p 3268 -b "DC=company,DC=com" -P2 -s sub "proxyAddresses=*"
Normally the address comes in this exact format while querying Active Directory: "proxyAddresses: SMTP:firstname.lastname@company.com"
Thanks.
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.
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.
Michael StrXder wrote:
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.
I am also finding I am in the same ball park. I am performing a search for a user home directory and just want the value and nothing else to be used in a bash script. I am finding the same question asked by others but at the same time I am not finding or understanding how it is done without the ldif information.
-Adam
openldap-technical@openldap.org