Version 7 (modified by andudi, 2 years ago) (diff)


(this page is still under construction!)

LDAP Addressbook Field Mapping

This howto describes the mapping of the contact fields of Roundcubes LDAP addressbook. If you are looking for a description how to setup a simple LDAP server as functional backend of RC, see Howto_Ldap.

Since RCv0.6 the addressbook frontend is based on the vcard standard and the native (SQL) backend is designed to fit the needs of the frontend. On the other hand it is possible to use a LDAP server as addressbook backend as well. In this case, the question is how to map the contact fields of this different worlds.

If using a LDAP server as RC backend, one of the following situation is possible:

  1. the LDAP server is given and can not be influenced by the users
  2. the LDAP server is under full control of the RC administrator, beside RC are other clients that must work as well
  3. the LDAP server is under full control of the RC administrator, RC is the main client, others can just read some fields

In situation 1, the contact fields of the LDAP are limited to the set of attributes defined in the schemas of the LDAP server. The topic is to find a corresponding set of fields for the RC frontend.

In situation 2, the question is how to find a set of fields that is supported on both sides, server and all the clients planed to use with it. To extend the LDAP schema could be a possibility, but only if the fieldmapping of the other clients can be configured as well as the one of RC can.

In situation 3, when RC is the main client, the possbility is to create LDAP schematas such that all of the RC fields are supported.

Even if this Howto is writen for RC admins in situation 3, it can be usefull in the two other situations as well.

LDAP Schemas

The Default OpenLDAP Schema

Exsample of an Extended Schema

Roundcube Fieldmap Configurations

Supported Fields


The Default Configuration

  'fieldmap' => array(
    // Roundcube  => LDAP
    'name'        => 'cn',
    'surname'     => 'sn',
    'firstname'   => 'givenName',
    'email'       => 'mail',
    'phone:home'  => 'homePhone',
    'phone:work'  => 'telephoneNumber',
    'phone:mobile' => 'mobile',
    'street'      => 'street',
    'zipcode'     => 'postalCode',
    'locality'    => 'l',
    'country'     => 'c',
    'organization' => 'o',

Exsample of an Extended Configuration