Roundcube Community Forum

 

roundcube & ldap configuration, "bad search filter"

Started by ducdung, August 05, 2016, 04:57:36 AM

Previous topic - Next topic

ducdung

Hi,
I got the problem why using ldap with roundcube webmail. Here is my ldap configuration in 'config.inc.php'.
###############
$config['ldap_public']['GAL'] = array(
'name' => 'GAL',
'hosts' => array('localhost'),
'port' => 389,
'use_tls' => false,
'user_specific' => true,
'base_dn' => 'vd=%d,o=hosting,dc=server,dc=com',
'bind_dn' => 'cn=phamm,o=hosting,dc=server,dc=com',
'bind_pass' => 'abcd1236',
'writable' => false,
'LDAP_Object_Classes' => array("top", "inetOrgPerson"),
'required_fields' => array("cn", "sn", "mail"),
'LDAP_rdn' => 'mail',
'ldap_version' => 3,
'search_fields' => array('mail', 'cn'),
'name_field' => 'cn',
'email_field' => 'mail',
'surname_field' => 'sn',
'firstname_field' => 'gn',
'sort' => 'cn',
'scope' => 'sub',
'filter' => '(&(|(objectClass=VirtualMailAccount)(objectClass=VirtualMailAlias))(accountActive=TRUE))',
'fuzzy_search' => true
);
$config['autocomplete_addressbooks'] = array('sql','GAL');
#################
But I got the waring as below why sending an email:
ldap_search failed for dn=vd=run.biz,o=hosting,dc=server,dc=com: Bad search filter.

How can I eliminate the "dn=" and correct the format for ldap_search ? Thanks.

alec

What Roundcube version? You have the warning when you send or when you do address autocompletion? Enable ldap_debug and check the log for mor info.

ducdung

#2
- The roundcube version is 1.2.1.
- I think the warning appears while i typing receiver address in Compose tab.
- I have added $config['ldap_debug'] = true in config.inc.php and no more log appears.