RoundCube Webmail Forum  

Go Back   RoundCube Webmail Forum > Release Support > Release Discussion

For more information about the ads and why they're here, please see the FAQ
Reply
  #1  
Old 01-14-2009, 01:34 AM
Registered User
 
Join Date: Jun 2008
Posts: 10
Default 0.2 LDAP Auto-complete Fills in system users

After upgrading to 0.2stable (and during 0.2-pre-SVN) the LDAP email-address auto-complete no longer functions as it did in previous version.

In previous versions it would only display (auto-fill) a name if they had an email-address somewhere in their LDAP record. If they didn't have an email address, it wouldn't show up (as it should).

Now, using the same settings, RC shows system users (admin, diradmin, etc.) as well as everyone else during auto-complete searches regardless if they have an email address or not.

Is there a way to set it up as before to show only users with an email address?

Here's my LDAP config:
Code:
 $rcmail_config['ldap_public']['ACME'] = array(
  'name'          => 'ACME Directory',
  'hosts'         => array('host.domain.net'),
  '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'       => 'dc=host,dc=domain,dc=net',
  'bind_dn'       => 'uid=%u,cn=users,dc=host,dc=domain,dc=net',
  'bind_pass'     => '',
  'writable'      => false,   // 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'),  // 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
  '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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 01-14-2009, 05:01 AM
rosali's Avatar
Super Moderator
 
Join Date: Dec 2007
Location: Germany
Posts: 1,090
Send a message via MSN to rosali
Default

./program/steps/mail/autocomplete.inc ...

If you have basic PHP coding knowledge it should be easy to some code to filter the addresses.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 01-14-2009, 04:10 PM
Registered User
 
Join Date: Jun 2008
Posts: 10
Default

Quote:
Originally Posted by rosali View Post
./program/steps/mail/autocomplete.inc ...

If you have basic PHP coding knowledge it should be easy to some code to filter the addresses.
Filters can be set in the LDAP settings in main.inc.php as well, but I'm not sure how to filter out everyone without an email address. Anyone know how?

Does this not seem like a bug? Why would you want people (or accounts) without any email addresses listed?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 01-14-2009, 06:30 PM
Registered User
 
Join Date: Jan 2009
Posts: 1
Thumbs up

Hi,

You can set a filter like this: (&(mail=*)(objectClass=person))

Humberto
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 01-20-2009, 11:35 PM
Registered User
 
Join Date: Jun 2008
Posts: 10
Default

Quote:
Originally Posted by humberto.pedroso View Post
Hi,

You can set a filter like this: (&(mail=*)(objectClass=person))

Humberto
Thank you Humberto. This worked perfectly.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
autofill, ldap

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


For more information about the ads and why they're here, please see the FAQ

All times are GMT. The time now is 08:21 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Copyright © 2006-2008 RoundCube Webmail Community