Roundcube Community Forum

 

How to set up multiple public LDAP address books

Started by entropicsinkhole, June 06, 2013, 09:55:10 AM

Previous topic - Next topic

entropicsinkhole

Using Server 2003, Active Directory, for LDAP

I've looked all over and can't find out what I'm doing wrong to set up a second LDAP public addressbook.  I assumed I would just copy the entry for my working address book and just change the BASE_DN and give it a different 'name'.  When that didn't work, based on some other stuff I came across, I added in the parts highlighted in red.   The MYDOMAIN GAB works, while the LLTC Global Address Book shows its name but no results. 

Both public LDAP addressbook are from the same domain and AD structure, but exist in different OUs (different departments in our business).  They both use the same user account (MYDOMAIN\addressbook) for authentication.

Ideas?  Thanks


Current:

$rcmail_config['ldap_public']['MYDOMAIN GAB'] = array (
  'MYDOMAIN_LDAP' =>
  array (
   'name' => 'MYDOMAIN Global Address Book',
   'hosts' =>
    array (
      0 => 'mydomain-dc02',
   ),
    'sizelimit' => 9000,
    'port' => 389,
    'use_tls' => false,
   'user_specific' => false,
    'base_dn' => 'ou=users,ou=mydomain,dc=mydomain',
    'bind_dn' => 'mydomain\addressbook',
    'bind_pass' => '@DdressB0oK',
    'writable' => false,
    'ldap_version' => 3,
    'search_fields' =>array('mail','sn','gn'),
    array (
      0 => 'mail',
      1 => 'cn',
     2 => 'sn',
     //3 => 'givenName',
     3 => 'gn',
   
    ),
    'name_field' => 'cn',
   'email_field' => 'mail',
    'surname_field' => 'sn',
     'firstname_field' => 'gn',
    'sort' => 'sn',
    'scope' => 'sub',
    //'scope' => 'list',
   'filter' => 'mail=*',
    'fuzzy_search' => true
  ),
);

$rcmail_config['ldap_public']['LLTC Global Address Book'] = array (
  'MYDOMAIN_LDAP' => (I also changed this name, at one point, to be LLTC_LDAP)
  array (
   'name' => 'LLTC Global Address Book',
   'hosts' =>
    array (
      0 => 'MYDOMAIN-dc02',
   ),
    'sizelimit' => 9000,
    'port' => 389,
    'use_tls' => false,
   'user_specific' => false,
    'base_dn' => 'ou=users,ou=lltc,dc=MYDOMAIN',
    'bind_dn' => 'MYDOMAIN\addressbook',
    'bind_pass' => '@DdressB0oK',
    'writable' => false,
    'ldap_version' => 3,
    'search_fields' =>array('mail','sn','gn'),
    array (
      0 => 'mail',
      1 => 'cn',
     2 => 'sn',
     //3 => 'givenName',
     3 => 'gn',
   
    ),
    'name_field' => 'cn',
   'email_field' => 'mail',
    'surname_field' => 'sn',
     'firstname_field' => 'gn',
    'sort' => 'sn',
    //'scope' => 'sub',
    'scope' => 'list',
   'filter' => 'mail=*',
    'fuzzy_search' => true
  ),
);

alec

Quote from: entropicsinkhole on June 06, 2013, 09:55:10 AM
$rcmail_config['ldap_public']['MYDOMAIN GAB'] = array (
  'MYDOMAIN_LDAP' =>
  array (

This is wrong, should be:

$rcmail_config['ldap_public']['MYDOMAIN_LDAP'] =
  array (

entropicsinkhole

Excellent, I knew it would be something obvious to someone else :-)  Thanks!