MailNews:LDAP Address Books: Difference between revisions

m (Add mailnews ab resources template.)
 
(6 intermediate revisions by the same user not shown)
Line 2: Line 2:


== LDAP Logging ==
== LDAP Logging ==
We have now enabled LDAP Logging on Release builds on the trunk and the 1.8.1 branch (aka SeaMonkey 1.1a/Thunderbird 2.0a)


The LDAP logging can be used to view the messages that the Address Book is sending and receiving to/from your LDAP server. We hope that this will aid debugging problems on an LDAP link.
The LDAP logging can be used to view the messages that the Address Book is sending and receiving to/from your LDAP server. We hope that this will aid debugging problems on an LDAP link.
Line 13: Line 11:
See these links for more detail:
See these links for more detail:


* [http://www.mozilla.org/quality/mailnews/mail-troubleshoot.html Troubleshooting Mail/News]
* [[Mailnews:Logging]]
* [http://www.mozilla.org/projects/nspr/reference/html/prlog.html NSPR Logging]
 
Trunk nightlies are available from:


* [ftp://ftp.mozilla.org/pub/mozilla.org/seamonkey/nightly/latest-trunk/ SeaMonkey]
== LDAP Address Book Schema ==
* [ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-trunk/ Thunderbird]


Branch nightlies are available from:
The address book code specifies default settings for communicating with LDAP servers.


* [ftp://ftp.mozilla.org/pub/mozilla.org/seamonkey/nightly/contrib/latest-mozilla1.8/ SeaMonkey]
The default settings are specified in a [[MailNews:Mozilla LDAP Address Book Schema|defined schema]], currently in an alpha version. Setting up a LDAP server with this schema, and setting up the address book (Thunderbird or SeaMonkey) to talk to that LDAP server will enable all fields to work correctly.
* [ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-mozilla1.8/ Thunderbird]


== LDAP Address Book Schema - Alpha Version ==
== Overriding the default schema for LDAP address books ==


This is the current alpha version of the Mozilla LDAP Address Book Schema. It will work with Thunderbird 1.5 and SeaMonkey 1.0 (both including alpha/beta versions).
As of SeaMonkey 1.0 and Thunderbird 1.5 it is possible to override some aspects of the default LDAP schema for address books.


To use it copy the text below into a file and point you LDAP server at it. With this specification you won't need to change any of the LDAP default attributes.
This can either be done for all LDAP address books, or for individual ones.


If you find any problems with this schema, they should be filed here on the [[MailNews_Talk:LDAP Address Books]] discussion page, bugs with Thunderbird or SeaMonkey should be filed in [https://bugzilla.mozilla.org/ bugzilla].
=== Globally overriding the default LDAP schema ===


Any Updates to the schema will be documented in the header.
In preferences (about:config/prefs.js) there are a set of preferences prefixed by "ldap_2.servers.default.attrmap.". For example:


----
<pre>
<pre>
# Mozilla: @VERSION@
pref("ldap_2.servers.default.attrmap.FirstName", "givenName");
#
pref("ldap_2.servers.default.attrmap.LastName", "sn,surname");
# mozillaAbPersonAlpha
pref("ldap_2.servers.default.attrmap.DisplayName", "cn,commonname");
#
pref("ldap_2.servers.default.attrmap.NickName", "mozillaNickname,xmozillanickname");
# Created initial version --[[User:Standard8|Standard8]] 12:21, 5 Dec 2005 (PST)
pref("ldap_2.servers.default.attrmap.PrimaryEmail", "mail");
#
pref("ldap_2.servers.default.attrmap.Company", "o,company");
# This file contains LDAPv3 schema for use with the Mozilla Address Book
</pre>
# and is intended to ...
 
# Depends upon
#  Definition of an X.500 Attribute Type and an Object Class to Hold
#  Uniform Resource Identifiers (URIs) [RFC2079], and A Summary of
#  the X.500(96) User Schema for use with LDAPv3 [RFC2256] (core.schema)
#
#  The COSINE and Internet X.500 Schema [RFC1274] (cosine.schema)
#
#  The InetOrgPerson Schema [RFC2798] (inetorgperson.schema)
 
# 1.3.6.1.4.1.13769.4.x - Mozilla AB 'Other' tab
 
attributetype ( 1.3.6.1.4.1.13769.4.1 NAME 'mozillaCustom1'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.13769.4.2 NAME 'mozillaCustom2'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE )
 
attributetype ( 1.3.6.1.4.1.13769.4.3 NAME 'mozillaCustom3'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.13769.4.4 NAME 'mozillaCustom4'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE )
# 1.3.6.1.4.1.13769.3.x - Mozilla AB 'Address' tab
 
attributetype ( 1.3.6.1.4.1.13769.3.1 NAME 'mozillaHomeStreet'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE )
 
attributetype ( 1.3.6.1.4.1.13769.3.2 NAME 'mozillaHomeStreet2'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE )
 
attributetype ( 1.3.6.1.4.1.13769.3.3 NAME 'mozillaHomeLocalityName'
        SUP name SINGLE-VALUE )
 
attributetype ( 1.3.6.1.4.1.13769.3.4 NAME 'mozillaHomeState'
        SUP name SINGLE-VALUE )
 
attributetype ( 1.3.6.1.4.1.13769.3.5 NAME 'mozillaHomePostalCode'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{40} SINGLE-VALUE )
 
attributetype ( 1.3.6.1.4.1.13769.3.6 NAME 'mozillaHomeCountryName'
        SUP name SINGLE-VALUE )
 
attributetype ( 1.3.6.1.4.1.13769.3.7 NAME 'mozillaHomeUrl'
        EQUALITY caseIgnoreMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE )
 
attributetype ( 1.3.6.1.4.1.13769.3.8 NAME 'mozillaWorkStreet2'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE )


attributetype ( 1.3.6.1.4.1.13769.3.9 NAME 'mozillaWorkUrl'
By changing these values (comma-separated lists), you are able to override the default mapping for address book attributes.
        EQUALITY caseIgnoreMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE )
# 1.3.6.1.4.1.13769.2.x - Mozilla AB 'Contact' tab


attributetype ( 1.3.6.1.4.1.13769.2.1
Taking the Company case, it is by default set to look up the "o" attribute first, if it doesn't find it to be present, it will look up the "company" attribute instead. Note that when searching for items, the address book will only search for the first attribute, i.e. "o" in this case.
        NAME ( 'mozillaNickname' 'xmozillanickname' )
        SUP name )


attributetype ( 1.3.6.1.4.1.13769.2.2
So changing "ldap_2.servers.default.attrmap.Company" to "organization,o,company" will cause the address book when searching for Companies, to look at the "organization" attribute, and to prioritise the organization attribute when pulling out values to display.
        NAME ( 'mozillaSecondEmail' 'xmozillasecondemail' )
        EQUALITY caseIgnoreIA5Match
        SUBSTR caseIgnoreIA5SubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} SINGLE-VALUE )


attributetype ( 1.3.6.1.4.1.13769.2.3
Note: You can only use each attribute once in the prefs, i.e. you can't set both FirstName and DisplayName to "cn".
        NAME ( 'mozillaUseHtmlMail' 'xmozillausehtmlmail' )
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )


# AOL Instant Messenger (AIM) Identity
=== Overriding individual LDAP Address Book Schemas ===
attributetype ( 1.3.6.1.4.1.13769.2.4
        NAME ( 'nsAIMid' 'nscpaimscreenname' )
        EQUALITY telephoneNumberMatch
        SUBSTR telephoneNumberSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.50 )


# 1.3.6.1.4.1.13769.9 - Mozilla AB objectclasses
In a similar manner to globally overriding the LDAP Address Book schema, it can also be overridden for individual address books.
# The mozillaAddressBookEntry object class is used to define entries
# representing Cards in the Mozilla Address Book.  The commonName attribute
# is used for naming entries of this object class, but may not be unique.
#            department $


objectclass ( 1.3.6.1.4.1.13769.9.1 NAME 'mozillaAbPersonAlpha'
# Create a LDAP address book in SeaMonkey/Thunderbird.
        SUP top AUXILIARY
# Exit SeaMonkey/Thunderbird
        MUST ( cn )
# Look in prefs.js for ldap_2.servers.xxx.description - The value should match the name you entered, note the xxx value.
        MAY( c $
# For the attribute(s) you wish to override, set up new preferences of the form: ldap_2.servers.xxx.attrmap.attribute (where attribute matches one of the global attributes) and set the value to whatever you wish for that address book.
              description $
# Save prefs.js and restart SeaMonkey/Thunderbird - you should find that the schema override works only for that particular address book.
              displayName $
              fax $
              givenName $
              homePhone $
              l $
              mail $
              mobile $
              mozillaCustom1 $
              mozillaCustom2 $
              mozillaCustom3 $
              mozillaCustom4 $
              mozillaHomeCountryName $
              mozillaHomeLocalityName $
              mozillaHomePostalCode $
              mozillaHomeState $
              mozillaHomeStreet $
              mozillaHomeStreet2 $
              mozillaHomeUrl $
              mozillaNickname $
              mozillaSecondEmail $
              mozillaUseHtmlMail $
              mozillaWorkStreet2 $
              mozillaWorkUrl $
              nsAIMid $
              o $
              ou $
              pager $
              postalCode $
              postOfficeBox $
              sn $
              st $
              street $
              telephoneNumber $
              title ) )
</pre>
----
canmove, Confirmed users, Bureaucrats and Sysops emeriti
3,628

edits