roundcube / plugin-installer

A composer installer for Roundcube plugins
26 stars 15 forks source link

Roundcube AD LDAP connection for Address List #28

Closed mahbodfo closed 3 years ago

mahbodfo commented 3 years ago

After change config.inc.php for connecting to AD LDAP as below in configuration I have get this error [27-Apr-2021 11:42:34 UTC] PHP Fatal error: Uncaught Error: Class 'Net_LDAP3' not found in /usr/share/roundcube/program/lib/Roundcube/rcube_ldap_generic.php:29 Stack trace:

0 /usr/share/roundcube/program/lib/Roundcube/bootstrap.php(485): include_once()

1 [internal function]: rcube_autoload()

2 /usr/share/roundcube/program/lib/Roundcube/rcube_ldap.php(253): spl_autoload_call()

3 /usr/share/roundcube/program/include/rcmail.php(220): rcube_ldap->__construct()

4 /usr/share/roundcube/program/steps/addressbook/func.inc(152): rcmail->get_address_book()

5 /usr/share/roundcube/program/steps/addressbook/list.inc(47): rcmail_contact_source()

6 /usr/share/roundcube/index.php(302): include_once('/usr/share/roun...')

7 {main}

thrown in /usr/share/roundcube/program/lib/Roundcube/rcube_ldap_generic.php on line 29

my reference is : https://github.com/roundcube/roundcubemail/wiki/Configuration%3A-LDAP-Address-Books

configuration of config.inc.php : $config['ldap_public'] = array( 'MyAdLdap' => array ( 'name' => 'Big Company, Inc', 'hosts' => array('myserver.**.*'), 'sizelimit' => 6000, 'port' => 3268, # See comments below 'use_tls' => false, 'user_specific' => false, 'base_dn' => 'CN=users,DC=***,DC=*', 'bind_dn' => '****@****.*', 'bind_pass' => '***', 'writable' => false, 'ldap_version' => 3, 'search_fields' => array( 'mail', 'cn', ), 'fieldmap' => array( 'name' => 'cn', 'email' => 'mail', 'surname' => 'sn', 'firstname' => 'givenName', ), 'sort' => 'sn', 'scope' => 'list', # or 'sub' 'filter' => '(&(mail=*)(|(&(objectClass=user)(!(objectClass=computer)))(objectClass=group)))', 'global_search' => true, 'fuzzy_search' => true, 'vlv' => false, ), );

thomascube commented 3 years ago

Although this is the wrong place to report this issue, I think the solution is simple. You're lacking the kolab/net_ldap3 module which is an optional dependency of Roundcube and needs to be installed via composer when using LDAP. I've just added an according paragraph to the wiki page: https://github.com/roundcube/roundcubemail/wiki/Configuration:-LDAP-Address-Books#prerequisites

If the problem persists, please open an issue at https://github.com/roundcube/roundcubemail/issues