Based on work of lacri
I remove global contact from database, we use ldap for this
part 1
Add /etc/ldap/schema/mozillaorgperson.schema (debian)
and include it on /etc/ldap/slapd.conf
#
# mozillaOrgPerson schema v. 0.6.3
#
# req. core
# req. cosine
# req. inetorgperson
# attribute defs
attributetype ( 1.3.6.1.4.1.13769.2.1.1
NAME ( 'mozillaNickname' )
SUP name )
attributetype ( 1.3.6.1.4.1.13769.2.1.2
NAME ( 'mozillaUseHtmlMail' )
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.13769.2.1.3
NAME 'mozillaSecondEmail'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
attributetype ( 1.3.6.1.4.1.13769.2.1.4
NAME 'mozillaHomeLocalityName'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
attributetype ( 1.3.6.1.4.1.13769.2.1.5
NAME 'mozillaPostalAddress2'
EQUALITY caseIgnoreListMatch
SUBSTR caseIgnoreListSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.41 )
attributetype ( 1.3.6.1.4.1.13769.2.1.6
NAME 'mozillaHomePostalAddress2'
EQUALITY caseIgnoreListMatch
SUBSTR caseIgnoreListSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.41 )
attributetype ( 1.3.6.1.4.1.13769.2.1.7
NAME ( 'mozillaHomeState' ) SUP name )
attributetype ( 1.3.6.1.4.1.13769.2.1.8
NAME 'mozillaHomePostalCode'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{40} )
attributetype ( 1.3.6.1.4.1.13769.2.1.9
NAME ( 'mozillaHomeCountryName' )
SUP name SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.13769.2.1.10
NAME ( 'mozillaHomeFriendlyCountryName' )
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
attributetype ( 1.3.6.1.4.1.13769.2.1.11
NAME ( 'mozillaHomeUrl' )
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
attributetype ( 1.3.6.1.4.1.13769.2.1.12
NAME ( 'mozillaWorkUrl' )
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
# un-comment for all LDAP server NOT supporting SYNTAX 2.16.840.1.113730.3.7.1
attributetype ( 1.3.6.1.4.1.13769.2.1.13
NAME ( 'nsAIMid' )
DESC 'AOL Instant Messenger (AIM) Identity'
EQUALITY telephoneNumberMatch
SUBSTR telephoneNumberSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.50 )
attributetype ( 1.3.6.1.4.1.13769.2.1.14 NAME ( 'mozillaHomeStreet' )
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
# un-comment for Netscape 6.x and all other LDAP server supporting SYNTAX 2.16.840.1.113730.3.7.1
# attributeTypes ( 2.16.840.1.113730.3.1.2013
# NAME ( 'nsAIMid' )
# DESC 'AOL Instant Messenger (AIM) Identity'
# SYNTAX 2.16.840.1.113730.3.7.1 )
attributetype ( 1.3.6.1.4.1.13769.2.1.96
NAME ( 'mozillaCustom1' )
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.13769.2.1.97
NAME ( 'mozillaCustom2' )
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.13769.2.1.98
NAME ( 'mozillaCustom3' )
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.13769.2.1.99
NAME ( 'mozillaCustom4' )
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )
# defined in "A Summary of the X.500(96) User Schema for use with LDAPv3" - RFC 2256
#
# attributetype ( 2.5.4.6 NAME ( 'c' 'countryName' )
# DESC 'RFC2256: ISO-3166 country 2-letter code'
# SUP name SINGLE-VALUE )
# defined in "The COSINE and Internet X.500 Schema" - RFC 1274
#
# attributetype ( 0.9.2342.19200300.100.1.43
# NAME ( 'co' 'friendlyCountryName' )
# DESC 'RFC1274: friendly country name'
# EQUALITY caseIgnoreMatch
# SUBSTR caseIgnoreSubstringsMatch
# SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
# objectClass defs
objectclass ( 1.3.6.1.4.1.13769.2.2.1
NAME 'mozillaOrgPerson'
SUP top
AUXILIARY
MAY (
sn $
givenName $
cn $
mozillaNickname $
title $
telephoneNumber $
facsimileTelephoneNumber $
mobile $
pager $
homePhone $
street $
postalCode $
mozillaPostalAddress2 $
mozillaHomeStreet $
mozillaHomePostalAddress2 $
l $
mozillaHomeLocalityName $
st $
mozillaHomeState $
mozillaHomePostalCode $
c $
mozillaHomeCountryName $
co $
mozillaHomeFriendlyCountryName $
ou $
o $
mail $
mozillaSecondEmail $
mozillaUseHtmlMail $
nsAIMid $
mozillaHomeUrl $
mozillaWorkUrl $
description $
mozillaCustom1 $
mozillaCustom2 $
mozillaCustom3 $
mozillaCustom4 ) )
# not part of the official Mozilla schema but read by Mozilla: 'departmentNumber' and 'postOfficeBox'
#
modifie /program/config/main.inc.php
and add this on your $rcmail_config['ldap_public']['XXX'] section
'writable' => true, // Indicates if we can write to the LDAP directory or not.
// If writable is true then these fields need to be populated:
// LDAP_Object_Classes, required_fields, LDAP_rdn
'LDAP_Object_Classes' => array("top", "inetOrgPerson", "mozillaOrgPerson"), // To create a new contact these are the object classes to specify (or any oth
'required_fields' => array("cn", "sn", "mail"), // The required fields needed to build a new contact as required by the object classes (can includ
'LDAP_rdn' => 'mail', // The RDN field that is used for new entries, this field needs to be one of the search_fields, the base of base_dn is appended
'ldap_version' => 3, // using LDAPv3
'search_fields' => array('mail', 'cn','mozillaSecondEmail' ), // fields to search in
// identity block
'name_field' => 'cn',
'surname_field' => 'sn',
'firstname_field' => 'givenName',
'email_field' => 'mail',
'email2_field' => 'mozillaSecondEmail',
// telephone block
'w_tel_field' => 'telephoneNumber',
'p_tel_field' => 'homePhone',
'w_fax_field' => 'facsimileTelephoneNumber',
'w_mob_field' => 'mobile',
// business data block
'company_field' => 'o',
'w_address_field' => 'street',
'w_postcode_field' => 'postalCode',
'w_city_field' => 'l',
'w_url_field' => 'mozillaWorkUrl',
// personel data block
'p_address_field' => 'mozillaHomeStreet',
'p_postcode_field' => 'mozillaHomePostalCode',
'p_city_field' => 'mozillaHomeLocalityName',
'p_url_field' => 'mozillaHomeUrl',
// description block
'desc_field' => 'description',
'sort' => 'cn', // The field to sort the listing by.
'scope' => 'sub', // search mode: sub|base|list
'filter' => '', // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
'fuzzy_search' => true); // server allows wildcard search
modiefie /program/include/main.inc
search for
if ($type=='checkbox')
{
$attrib['value'] = '1';
$input = new html_checkbox($attrib);
and replace with
if($col == "desc")
{
$attrib['rows'] = "5";
$attrib['size'] = "60";
$attrib['cols'] = "60";
$input = new html_textarea($attrib);
}
else if ($type=='checkbox')
{
$attrib['value'] = '1';
$input = new html_checkbox($attrib);
modifie /program/include/rcube_contacts.php
search for
var $table_cols = array('name', 'email', 'firstname', 'surname');
and replace with
var $table_cols = array('name', 'firstname', 'surname', 'email', 'email2', 'w_tel', 'p_tel', 'w_fax', 'w_mob', 'company', 'w_address', 'w_postcode', 'w_city', 'w_url', 'p_address', 'p_postcode', 'p_city', 'p_url', 'desc');
modifie /program/localization/fr_FR/labels.inc
add the lines
/* ========================
Extended Adress Book
======================== */
// identity block
$labels['namelegend'] = $labels['surnamelegend'] = 'Identité';
// mail block
$labels['emaillegend'] = $labels['email2legend'] = 'E-mail';
$labels['email2'] = 'Adresse alternative ';
// telephone block
$labels['w_tellegend'] = $labels['w_moblegend'] = 'Numéros de téléphone';
$labels['w_tel'] = 'Travail ';
$labels['p_tel'] = 'Domicile';
$labels['w_fax'] = 'Fax';
$labels['w_mob'] = 'Portable';
// business block
$labels['companylegend'] = $labels['w_urllegend'] = 'Professionnel';
$labels['company'] = 'Société';
$labels['w_address'] = 'Adresse';
$labels['w_postcode'] = 'Code postal';
$labels['w_city'] = 'Ville';
$labels['w_url'] = 'Page Web';
// home block
$labels['p_addresslegend'] = $labels['p_urllegend'] = 'Personnel';
$labels['p_address'] = 'Adresse';
$labels['p_postcode'] = 'Code postal';
$labels['p_city'] = 'Ville';
$labels['p_url'] = 'Page Web';
// description block
$labels['desc'] = ' ';
$labels['desclegend'] = 'Remarques';