Apr 30, '08 07:30:00AM • Contributed by: stephanbuys
Step 1: Determine the default naming context (base dn) for the search. Fire up Terminal and issue an ldapsearch to determine the default naming context:
$ ldapsearch -h your.exchange.server -x -b '' -s base '(objectclass=*)' 'namingContexts'
Search for the lines beginning with namingContexts:
namingContexts: DC=mycompany,DC=com
namingContexts: CN=Configuration,DC=mycompany,DC=com
namingContexts: CN=Schema,CN=Configuration,DC=mycompany,DC=com
The result you are looking for is the "base/root" and that is the shortest one in the case of Exchange (BTW, this will work on other LDAP servers, too). In this case, that's the first line, ie. DC=mycompany,DC=com.
Step 2: Configure Address Book to query the server. Fire up Address Book and go to the Preferences (Command-,). Select the LDAP tab, then click the "+" to add a new server. In the Server field, complete the hostname of your Exchange server (or Active Directory domain controller in the case of larger companies). In the Search Base field, use the information that you retrieved from ldapsearch earlier. It will be in the format DC=company,DC=com. Choose Simple authentication, and User Name and Password should be your standard Windows login credentials.
From now on, Address Book will automatically query the server whenever you search for a name. This will also happen whenever you type new addresses into Mail.app when composing emails. If you need more help, my original blog entry contains some additional detail and screenshots.
