Roundcube Community Forum

 

ldap search in email field dont work

Started by tiodary, January 30, 2008, 10:39:10 AM

Previous topic - Next topic

tiodary

Sorry for my bad english, i am from argentina and wanna to say that Rondcube rocks! but...
I set up an ldap server and when searching for names everything works fine in the address book, but if I'm searching for emails (or part of emails) in the compose window nothing will be found. I think the email-field is not searched, i check all the post with any possible solution in the forum with no results..:-(

any ideas?

thanks for your help

Tiodary

guneza

Hello,

I'm experiencing the same problems, but I got it working by doing something I consider a nasty hack:

$rcmail_config['ldap_public']['zaera-holo'] = array(
 'name'      => 'zaera-holo.net',
 'hosts'     => array('localhost'),
 'port'      => 389,
 'base_dn'    => 'ou=addressbook,dc=zaera-holo,dc=net',
 'bind_dn'    => 'uid=roundcube,ou=users,dc=zaera-holo,dc=net',
 'bind_pass'   => 'blank',
 'ldap_version'  => 3,       // using LDAPv3
 'firstname_field'=> 'givenName',  // this field represents the contact's first name
 'surname_field' => 'sn',     // this field represents the contact's last name
 'name_field'   => 'cn',     // this field represents the contact's name
 'email_field'  => 'mail',    // this field represents the contact's e-mail
 'search_fields' => array('name_field', 'email_field'), // fields to search in
 'scope'     => 'sub',     // search mode: sub|base|list
 'filter'     => '(objectClass=inetOrgPerson)',   // used for basic listing (if not empty) and will be &'d with search queries. ex: (status=act)
 'fuzzy_search'  => 1);      // server allows wildcard search

The search field above now refers to a name in the PHP config array, and not in the LDAP tree. Somehow, this works although I do get the following warning from PHP:

Warning: ldap_search(): Search: Bad search filter in /var/www/intranet.zaera-holo.net_443/roundcubemail-0.1-rc2/program/include/rcube_ldap.inc on line 409
Does anyone have any tips here?

cheers,
gustavo :-\

tiodary

guneza, thanks for your reply...but this "nasty hack" don´t work for me...
do you only change the code in main.inc.php, nothing in compose.inc?

thnks a lot!

tiodary