Using your Mac OS X Server Open Directory Database to share e-mail addresses

—by Joel Rennich, mactroll@afp548.com

10 September 2002 - Updated 22 January 2003

Note: This article has been superseded by the new Using your Mac OS X Server Open Directory Database to share e-mail addresses.

Now that we have an LDAP server included with Mac OS X 10.2 Server it is incredibly easy to use this as an address book for your entire organization. To get this running you will need to have the LDAP server running, obviously. You were given this option when you first configured your machine. If you turned it off then you can turn it on by running the Open Directory Assistant application and re-enabling it. By default the LDAP server will only serve out your network NetInfo database and not your local. This can be changed by editing your slapd.conf file. We’ll discuss this in another article.

The next step is to populate your users' entries in your NetInfo database with e-mail addresses and telephone numbers. This can be done using niutil from the command line or the NetInfo Manager.

To add an e-mail address you create a new property called “mail” with the user’s e-mail address as the value. Phone numbers can be added by creating a new property “telephonenumber” with the user’s phone number as the value.

You’re done with the server, so move on over to the clients. Open up the Address Book application. In the preferences select the LDAP tab and add a new LDAP server. Set the name to whatever you want. The Server property should be the IP address or fully qualified domain name of the server. You can leave the Search Base field empty for testing, but you’ll want to refine this later. Otherwise your searches will encompass every item in your NetInfo database and take a much longer time to complete.

To limit this to just the users use “cn=users,dc=domain,dc=topleveldomain” On our server at afp548.com this would be “cn=users,dc=afp548,dc=com". By default the last piece of this should be whatever your server’s IP address reverse maps to. You can check this by going into your NetInfo database and finding the entry for your server in the machines directory. Here you should find a “suffix” property that will look familiar.

Save the LDAP server that you added and go to Address Book’s main window. Select the Directories icon in the left-hand column. Do a search on a user’s full name or e-mail address in the Search box and the results will be listed on the right. You can drag any of the results into your address book to make entries if you want to. Otherwise Mail.app will automatically query the LDAP server that you have specified when you are composing new e-mails.

Entourage will also be able to get this contact information from your LDAP server.