oreilly.comSafari Books Online.Conferences.


Building an Address Book with OpenLDAP
Pages: 1, 2, 3

Configuring Netscape 7 and Outlook 2002 as LDAP Clients

Now that we have an LDAP server set up and ready to go, our next step is to configure our LDAP clients to use the directory. This article uses Netscape 7 under Linux and Microsoft Outlook 2002 under, not surprisingly, Windows. Let's begin with Netscape 7.

In my opinion, Netscape has a much better interface for LDAP-based directories than Outlook. To some extent, that is understandable. Outlook is built to work with Exchange as both a mail client and groupware application. How is Netscape better? For one thing, Netscape Address Book can import all of the entries in an LDAP directory into your address book and keep those entries synchronized with the directory. Essentially, you can disconnect from the local network and use the LDAP-based address book even if you no longer have access to the actual LDAP server. Now that's nifty.

Let's configure Netscape Address Book to use our LDAP server.

  1. Begin by opening Netscape Address Book, either directly or from Netscape Communicator.
  2. Choose File->New->LDAP Directory.
  3. Netscape Address Book will open up the properties page for an LDAP directory. First, enter a friendly name in the Name field, such as "Company LDAP Directory."
  4. In the Hostname field, enter either the LDAP server's hostname or IP address.
  5. The Base DN is simply the base search path specified for ldapsearch with the -b option, so enter ou=addressbook, dc=example, dc=com.
  6. Choose OK.
  7. Restart Netscape, and you should see the new LDAP entry in the Address Books pane.

That's all there is to it. To test the search feature, type "Jane" into the search field labeled "Name or Email contains:," and then press Enter. Jane Doe's listing should come up. Select that listing to see all of the properties we defined for Jane that the Netscape Address Book recognizes. To look up an LDAP contact when composing an email message, do the following:

  1. Choose Compose.
  2. Select the Address icon.
  3. In the "Look in:" drop-down menu, choose your LDAP server entry defined earlier in the Netscape Address Book.
  4. Enter "Jane" in the text field labeled "for:" and press Enter.

Next, let's configure Microsoft Outlook 2002 to use our LDAP server:

  1. Start Outlook and then select Tools->Email Accounts.
  2. Choose "Add a new directory or address book" under the "Directory" label and then choose Next.
  3. Choose "Internet Directory Service (LDAP)" as the address book type and then choose Next.
  4. For "Server Name" specify the IP address or the hostname of the LDAP server.
  5. Choose "More Settings" and then select the "Search" tab. Here you need to specify the base search path, which we also specified to ldapsearch using the -b option. Type ou=addressbook, dc=example, dc=com in the text field labeled "Search base" and then choose OK.
  6. Choose Next.
  7. Outlook will present a congratulations screen. Choose Finish to close the Wizard.
  8. Restart Outlook to be able to use the LDAP directory you just specified.

There are two ways to test Outlook's LDAP directory access. First, let's try the fast and easy way:

  1. Click the New Mail icon to bring up the New Mail window.
  2. In the To: field, enter "Jane". (Outlook may try to auto-complete Jane's name or address if you have ever emailed another Jane before. Be sure to not use this entry, as that will short-circuit the LDAP lookup.)
  3. You can now either tab to the next field or enter Ctrl-K to force an address lookup. If you do not enter Ctrl-K, then Outlook will perform the lookup while you are doing another operation, such as entering the text of the message.

Related Reading

Essential System Administration
Tools and Techniques for Linux and Unix Administration
By Æleen Frisch

At this point, Outlook should have filled in "Jane Doe" for you in the To: field. Note that for some older Outlook clients, such as Outlook 97, you may need to specify that Outlook always automatically perform an LDAP lookup, using the Outlook Options screen.

The second method of searching the LDAP directory is to use the Outlook Find tool from the New Mail screen:

  1. Click the New Mail icon to bring up the new mail window.
  2. Click the To: icon.
  3. In the "Choose Names from the" field, choose your LDAP server entry.
  4. Choose Find.
  5. Enter "Jane" in the "Display Name" field, and then choose OK.

To see all of the contact's attributes, simply double-click the entry in the To: field. Alternatively, you can always use the Start->Search->Using Microsoft Outlook tool instead of being forced to load Outlook every time you want to call a contact. Netscape Address Book has a better interface for this, but Outlook is certainly usable.

Concluding Remarks

OpenLDAP continues to make inroads in small and medium-sized businesses as an easy, cost-effective way to manage data. This article gave just one small example of how you can use OpenLDAP, and indeed any LDAP server, to fine-tune the level of control you have over the information required by your business and by your users.

I'd like to say thank you to Howard Chu of the OpenLDAP team for helping to debug this article.

Additional Resources

Dustin Puryear is a consultant providing expertise in managing and integrating UNIX and Windows systems and services, with a strong focus on open source.

Return to

Sponsored by: