On 04/12/2015 07:54 PM, Charlie Mordant wrote:
Hi Roundcube experts!
We've got an ldap structure like this one
{{{ dc=tld,dc=dn,ou=people,ou=company,uid=foo dc=tld,dc=dn,ou=people,ou=contacts,ou=foo,cn=foocontact1 dc=tld,dc=dn,ou=specialUser,cn=contactWriter }}}
With the following roundcube configuration for contacts (company ldap is another one), we're using this configuration:
{{{ $rcmail_config['ldap_public']['Personal'] = array( 'name' => 'Personal', 'hosts' => array('<% if @dirsrvprefix %><%= @dirsrvprefix %>.<% end %><%= @dn %>.<%= @tld %>'), 'port' => 389, 'use_tls' => false, 'ldap_version' => 3, // using LDAPv3 'network_timeout' => 10, // The timeout (in seconds) for connect + bind arrempts. This is only supported in PHP >= 5.3.0 with OpenLDAP 2.x 'user_specific' => false, // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login. 'base_dn' => 'ou=%u,ou=contacts,ou=people,dc=<%= @dn %>,dc=<%= @tld %>',// 'bind_dn' => 'cn=<%= @contactSO %>,ou=Special users,dc=<%= @dn %>,dc=<%= @tld %>', 'bind_pass' => '<%= @contactSOPwd %>', 'search_base_dn' => 'ou=%u,ou=<%= @contactOu %>,ou=people,dc=<%= @dn %>,dc=<%= @tld %>', 'search_filter' => '(objectClass=inetOrgPerson)', (uid=%u))'
This line is invalid syntax
'search_bind_dn' => 'cn=<%= @contactSO %>,ou=Special users,dc=<%= @dn %>,dc=<%= @tld %>', 'search_bind_pw' => '<%= @contactSOPwd %>',
Above search_* parameters are used only if user_specific=true. Also, %u variable is resolved only if user_specific=true.
This is already described in defaults.inc.php file, at least in the recent version, I didn't check in 0.9.