Title: LDAP, Active Directory, SMTP addresses
The only part that seems to not have been addressed is this question about the schema.  What was that about?
 
 
Al


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of joe
Sent: Tuesday, August 31, 2004 7:55 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] LDAP, Active Directory, SMTP addresses

I see a couple of vbscript solutions. My guess is that your guys are sitting on *nix doing this so I will give some generics.
 
Your search filter assuming you just want users with mailboxes in exchange is going to be something like
 
(&(objectcategory=person)(objectclass=user)(msExchHomeServerName=*))
 
That should get all users with mailboxes on exchange. This will also return system mailboxes and AV software mailboxes etc. You have the option of removing those in the initial search filter by excluding their names like
 
(&(objectcategory=person)(objectclass=user)(msExchHomeServerName=*)(!(name=SystemMailbox{*)))
 
but it may impact your performance on the query so you may want to return them all, and then filter from the script itself.
 
If you want anything with an SMTP proxy address in the Exchange system your filter would look like
 
(proxyaddresses=smtp:*)
 
but you may want to filter out some of the names with a ! (NOT) or clean them up afterwards.
 
 
So now you have the filter. I would recommend searching a GC as you get the entire forest in one shot. So that would be
 
Port: 3268
Search Base: rootdomain.com   (if you have multiple trees you will want a null base "" or else you will only pick up stuff under the rootdomain tree).
Attribute: proxyaddresses
 
Depending on how they want to index things, they could also pull samaccountname or DN or mailnickname or whatever, I would recommend indexing off of DN/mailnickname probably since samaccountnames aren't guaranteed to be unique.
 
proxyAddresses is multivalued and you will find things other than SMTP addresses so make sure they realize that when writing the script so they can filter out that information. All smtp addresses will start with smtp:. There should be one value with an uppercase SMTP: and the rest should all be lowercase. The uppercase SMTP: is the primary mail address according to Exchange.
 
Note that the script will have to bind with a valid user ID to see this information.
 
Hope that helps out, it should at least get them started.
 
   joe
 
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brown Glyn
Sent: Monday, August 30, 2004 5:15 PM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] LDAP, Active Directory, SMTP addresses

Hi Everybody

We are running a Windows 2000 domain with Exchange 2000.
I have very little to do with LDAP, however I have had a request from the admins of our internet SMTP gateway. They wish to do a regular extract of all users in certain OUs to get all valid SMTP addresses. They want to do this so they can accept mail at the gateway for only valid recipients, and also wish to rewrite some addresses from secondary SMTP addresses to the primary before passing the mail to the internal mail system.

They would like to know our schema and the appropriate attributes.

My question is...  How do I go about providing this information to them in appropriate LDAP terms?

Thank you for any advice you may be able to provide

Cheers

-Glyn

Reply via email to