LDAP in Mozilla Thunderbird
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:
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:user_pref("mail.autoComplete.commentColumn", 2); user_pref("ldap_2.servers.DIRECTORYNAME.autoComplete.commentFormat", "[ou]");
- 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.
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.