Roundcube Community Forum

 

No LDAP addressbook available

Started by roundcubeRigge, August 18, 2010, 09:26:30 AM

Previous topic - Next topic

roundcubeRigge

Hi RC Forum,

I am running RC 0.4 on a Linux based system. I'd like to connect to openLDAP on the same machine.

My settings are:
$rcmail_config['address_book_type'] = 'ldap';
$rcmail_config['ldap_public'] = array(
  'name'          => 'LDAPtest',
  'hosts'         => array('localhost'),
  'port'          => 389,
  'use_tls'       => false,
  'user_specific' => false,
  'base_dn'       => 'dc=domain,dc=local,ou=Adressbuch',
  'bind_dn'       => 'cn=Manager,dc=domain,dc=local',
  'bind_pass'     => 'geheim',
  'writable'      => false,
  'LDAP_Object_Classes' => array("top", "inetOrgPerson"),
  'required_fields'     => array("cn", "sn", "mail"),
  'LDAP_rdn'      => 'mail',
  'ldap_version'  => 3,
  'search_fields' => array('mail', 'cn'),
  'name_field'    => 'cn',
  'email_field'   => 'mail',
  'surname_field' => 'sn',
  'firstname_field' => 'givenName',
  'sort'          => 'cn',
  'scope'         => 'sub',
  'filter'        => '',
  'fuzzy_search'  => true
  'sizelimit'     => '0',
  'timelimit'     => '0'
);
$rcmail_config['autocomplete_addressbooks'] = array('ldap_public');

Unfortunately, RC does not start with these settings. Just an empty $rcmail_config['ldap_public'] = array(); solves this issue.

What is wrong? How can I enable LDAP support in RC?

Thanks in advance.
 - roundcubeRigge

SKaero

Your ldap array is incorrect, you need to name it something like $rcmail_config['ldap_public']['ldap_data'] not just $rcmail_config['ldap_public']
Code below:

$rcmail_config['address_book_type'] = 'ldap';

$rcmail_config['ldap_public'] = array();

$rcmail_config['ldap_public']['ldap_data'] = array(
'name' => 'LDAPtest',
'hosts' => array('localhost'),
'port' => 389,
'use_tls' => false,
'user_specific' => false,
'base_dn' => 'dc=domain,dc=local,ou=Adressbuch',
'bind_dn' => 'cn=Manager,dc=domain,dc=local',
'bind_pass' => 'geheim',
'writable' => false,
'LDAP_Object_Classes' => array("top", "inetOrgPerson"),
'required_fields' => array("cn", "sn", "mail"),
'LDAP_rdn' => 'mail',
'ldap_version' => 3,
'search_fields' => array('mail', 'cn'),
'name_field' => 'cn',
'email_field' => 'mail',
'surname_field' => 'sn',
'firstname_field' => 'givenName',
'sort' => 'cn',
'scope' => 'sub',
'filter' => '',
'fuzzy_search' => true
'sizelimit' => '0',
'timelimit' => '0'
);
$rcmail_config['autocomplete_addressbooks'] = array('ldap_data');

roundcubeRigge

#2
Skaero,

Thanks for your answer - it works now!
I had also a missing "," behind true in line "'fuzzy_search' => true"

Cheers,
roundcubeRigge