This is what I used, and it works...
$rcmail_config['ldap_public']['District Directory'] = array('hosts'
=> array('ldap.standard.k12.ca.us'),
'port' => 389,
'base_dn'
=> 'ou=Users,dc=standard,dc=k12,dc=ca,dc=us',
'search_fields' => array('Email' => 'mail', 'Name' => 'gecos'),
'name_field'
=> 'gecos',
'mail_field'
=> 'mail',
'scope'
=> 'sub',
'fuzzy_search' => 1);
Make sure you have the correct fqdn, the correct base dn, according to your ldap config.
I'd like to add something to this... For some reason searching the internal addressbook while typing in the to: or other similar fields works, but it does not search the ldap directory a la thunderbird or other e-mail clients. Has anyone gotten this working, and if so, what is necessary.
-Jeff
On 3/1/06, Chintan Zaveri smile@sis.net.in wrote:
Hello,
I wish to use LDAP with RoundCube 0.01 Beta...
I noticed the following commented lines in main.inc.php:
// in order to enable public ldap search, create a config array // like the Verisign example below. if you would like to test, // simply uncomment the Verisign example. /**
- example config for Verisign directory
- $rcmail_config['ldap_public']['Verisign'] =
array('hosts' => array('directory.verisign.com'),
'port' => 389,
'base_dn' => '',
'search_fields' => array('Email' => 'mail', 'Name' => 'cn'),
'name_field' => 'cn',
'mail_field' => 'mail',
'scope' => 'sub',
'fuzzy_search' => 0); */
Based on the above, I added the following lines:
$rcmail_config['ldap_public']['Mydomain'] = array('hosts' => array('mail.mydomain.org'), 'port' => 636, 'base_dn' => 'dc=mydomain,dc=org',
'search_fields' => array('Email' => 'mail', 'Name' => 'cn'),
'name_field' => 'cn',
'mail_field' => 'mail', 'scope' => 'sub',
'fuzzy_search' => 0);
However, LDAP Directory Search does not work. It takes a lot of time and then says No Contacts Found.
Here are the LDAP details for my domain:
dc=mydomain,dc=org Name: Mydomain Hostname: mail.mydomain.org Base DN: dc=mydomain,dc=org Port: 636 Bind DN: cn=Manager,dc=mydomain,dc=org Check Use secure connection (SSL) The LDAP user: cn=Manager,dc=bkwsu,dc=org Manager pw: mypassword
Can someone help me understand where I am making a mistake and how I can add these lines for LDAP?
Thank-you,
Sincerely,
Chintan Zaveri.