You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



LDAP in Mozilla Thunderbird

This document is intended to "fill in the gaps" about how Enterprise customers can leverage and customize LDAP support in Mozilla Thunderbird. It is not intended as an introduction to LDAP and Mozilla products. It assumes you are already familiar with configuring preferences for deployed builds in addition to setting up Thunderbird to use an LDAP directory. It should be noted that all of this information applies to both Thunderbird and the Seamonkey application suite.

Mail Compose Typedown

In mail compose, when typing a partial mail address, a typedown window appears listing possible matches against address books and LDAP directories. For large companies, there may be a large number of users in the directory with the same name. In such a scenario, it may be hard to tell which person you really want to send the message to. In Thunderbird, the type down window can be customized to show arbitrary LDAP fields. This can be accomplished by setting the following preferences:

	    user_pref("mail.autoComplete.commentColumn", 2);
	    user_pref("ldap_2.servers.DIRECTORYNAME.autoComplete.commentFormat", "[ou]");
	  
The first preference tells us to use a comment column in the type down (the default value is 0 for no comment), and that the value for the comment is a custom string unique to each directory. The commentFormat preference is set on EACH directory. It acts as a template, specifying the extra LDAP attribute which should be used in the comment field along with how the attribute should be formatted. It expects the following format:
  • The desired LDAP attribute should be wrapped in square brackets. In this example, we are setting the organization unit as the LDAP attribute.
  • You can also insert arbitrary text to clarify the LDAP attribute. i.e. "Department: [ou]" would yield a type down entry that looks like "John Smit Department: Client Engineering".

LDAP Schema

The following table summarizes the schema used by Mozilla Thunderbird to map between LDAP attributes and attributes within the the addressbook. Some notes about the relationship:

  • There is a many to one relationship between ldap properties and its mozilla counterpart.
  • There is a one to one relationship between a mozilla property and its ldap counterpart. If there are multiple entries for a mozilla property, the first takes precedence.
These relationships ensure: Generality is maintained when mapping from ldap properties to mozilla. Consistent round tripping when editing mozilla properties which are stored on an ldap server.
Address Book Attribute
LDAP Property
FirstName
givenname
LastName
sn
LastName surname
DisplayName
cn
DisplayName
commonname
DisplayName
displayname
NickName
xmozillanickname
PrimaryEmail
mail
SecondEmail
xmozillasecondemail
WorkPhone
telephonenumber
HomePhone
homephone
FaxNumber
fax
FaxNumber
facsimiletelephonenumber
PagerNumber
pager
PagerNumber
pagerphone
CellularNumber
mobile
CellularNumber
cellphone
CellularNumber
carphone
WorkAddress
postofficebox
WorkAddress
streetaddress
WorkCity
l
WorkCity
locality
WorkState
st
WorkState
region
WorkZipCode
postalcode
WorkZipCode
zip
WorkCountry
countryname
JobTitle
title
Department
ou
Department
orgunit
Department
department
Department
departmentnumber
Company
o
Company
company
WorkCountry
countryname
_AimScreenName
nscpaimscreenname
WebPage1
workurl
WebPage2
homeurl
BirthYear
birthyear
Custom1
custom1
Custom2
custom2
Custom3
custom3
Custom4 custom4
Notes
notes
Notes
description
PreferMailFormat
xmozillausehtmlmail
LastModifiedDate
modifytimestamp

Custom LDAP Attributes

Add information here about how to use custom LDAP attributes for various address book properties. We don't support this yet. See Bug #119291 for more details.