[RCU] OpenLdap no success

Kees de Keizer (RC) kees at de-keizer.net
Thu Feb 12 16:05:25 CET 2009


On Thu, 12 Feb 2009 12:13:42 -0200, Juliano Souza - TI
<jsouza at bembandeirante.com.br> wrote:
> I've tried to address book with openldap, but I have no success:
> 
> There is the entry on main.inc.php:
> 
> $rcmail_config['ldap_public']['LDAPBEM'] = array('hosts' =>
> '192.168.0.199',
>  'port' => 389,
>  'use_tls' => false,
>  'base_dn' => 'dc=domain,dc=com,dc=br',
>  'bind_dn' => 
> 'cn=phpldapadmin,ou=ldapadmin,o=sistemas,dc=domain,dc=com,dc=br',
>  'bind_pass' => 'pass',
>  //'base_dn' => 'o=ENT,dc=domain,dc=com,dc=br',
>  'search_fields' => array('Email' => 'mail', 'Name' => 'cn'),
>  'name_field' => 'cn',
>  'mail_field' => 'mail',
>  'email_field' => 'mail',
>  'scope' => 'sub',
>  'fuzzy_search' => 1);
> 
> Please, this is the issue to assign roundcubemail to be a official 
> webmail in my enterprise, but the ldap contacts is the first subject for 
> my users.

I use the following settings with openldap:

$rcmail_config['ldap_public']['localhost'] = array(
 'name'          => 'Rolodex',
 'hosts'         => array('localhost'),
 'port'          => 389,
 'use_tls'	   => false,
 'user_specific' => false,   // If true the base_dn, bind_dn and bind_pass
default to the user's IMAP login.
 // %fu - The full username provided, assumes the username is an email
 //       address, uses the username_domain value if not an email address.
 // %u  - The username prior to the '@'.
 // %d  - The domain name after the '@'.
 'base_dn'       => 'ou=Users,dc=keizer,dc=local',
 'bind_dn'       => 'cn=Manager,dc=keizer,dc=local',
 'bind_pass'     => 'mypassword',
 '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"), // To create a new
contact these are the object classes to specify (or any other classes you
wish to use).
 'required_fields'     => array("cn", "sn", "mail"),     // The required
fields needed to build a new contact as required by the object classes (can
include additional fields not required by the object classes).
 '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 to the RDN to insert into the LDAP directory.
 'ldap_version'  => 3,       // using LDAPv3
 'search_fields'   => array('mail', 'cn', 'o'),  // fields to search in
 'name_field'          => 'cn',    // this field represents the contact's
name
 'email_field'         => 'mail',  // this field represents the contact's
e-mail
 'surname_field'       => 'sn',    // this field represents the contact's
last name
 'firstname_field'     => 'givenName',  // this field represents the
contact's first name
 'organisation_field'  => 'o',     // Company
 'street_field'        => 'street',
 'postalcode_field'    => 'postalCode',
 'city_field'          => 'l',
 'phone_field'         => 'homePhone',
 'mobile_field'        => 'mobile',
 'url_field'           => 'URL',
 '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
 'global_search' => true,    // perform a global search for address
auto-completion on compose
 'fuzzy_search'  => true);   // server allows wildcard search

It look like something with your base_dn.

On eother question. What kept me busy for a long time was that the php_ldap
extension was not loaded,
so al the ldap call where declined by the php interprter.

-- 
Kees de Keizer
kees at de-keizer.net
http://www.de-keizer.net/
_______________________________________________
List info: http://lists.roundcube.net/users/



More information about the users mailing list