Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: chome on April 14, 2009, 11:33:42 PM

Title: LDAP address book configuration problem
Post by: chome on April 14, 2009, 11:33:42 PM
I am using RC 0.21 latest release now.

I am trying to create LDAP address book and my config is:


$rcmail_config['ldap_public']['company'] = array(
  'name'          => 'company',
  'hosts'         => array('192.168.1.10'),
  'port'          => 389,
  'use_tls'       => false,
  'user_specific' => false,
  'base_dn'       => 'DC=company,DC=com,DC=sg',
  'bind_dn'       => 'CN=ldap,CN=Users,DC=company,DC=com,DC=sg',
  'bind_pass'     => 'password',
  'writable'      => false,
  'ldap_version'  => 3,
  'search_fields' => array('givenName', 'displayname', 'sn', 'mail'),
  'name_field'    => 'displayname',    
  'firstname_field' => 'givenName',
  'surname_field' => 'sn',    
  'email_field'   => 'mail',  
  'scope'         => 'sub',  
  'filter'        => '',  
  'fuzzy_search'  => TRUE);  

When i try to click the address book in RC, no entries is shown. No errors generated in RC log directory, no errors was found on my domain controller also.

I am using AD for Windows logon only. I am using Lotus Notes as my email.
Title: LDAP address book configuration problem
Post by: rosali on April 15, 2009, 12:58:52 AM
I don't think that LDAP entries are listed. Use the quicksearch box to pick up an address from LDAP.
Title: LDAP address book configuration problem
Post by: chome on April 15, 2009, 01:20:42 AM
Quote from: rosali;18434
I don't think that LDAP entries are listed. Use the quicksearch box to pick up an address from LDAP.


Don't quite understand.....if it is not listed then how to search for the address?
Title: LDAP address book configuration problem
Post by: rosali on April 15, 2009, 02:46:49 AM
Login @ mail4us.net. I saw you have a test account. Goto addressbook. Then select rz.uni.hamburg (my LDAP). Type "roland" into the quick search box and fire the search request ...
Title: LDAP address book configuration problem
Post by: Julius Caesar on April 15, 2009, 03:12:13 AM
What you can do is replace the line

Code: [Select]
'filter' => '',

with

Code: [Select]
'filter' => 'mail=*@*',
Title: LDAP address book configuration problem
Post by: chome on April 15, 2009, 03:51:08 AM
Quote from: rosali;18436
Login @ mail4us.net. I saw you have a test account. Goto addressbook. Then select rz.uni.hamburg (my LDAP). Type "roland" into the quick search box and fire the search request ...


Ya, yours  can work, but for mine, i typed a name to search it said "no contacts found"

How to display all the AD users in the address book without searching?
Title: LDAP address book configuration problem
Post by: chome on April 15, 2009, 03:52:55 AM
Quote from: Julius Caesar;18438
What you can do is replace the line

Code: [Select]
'filter' => '',

with

Code: [Select]
'filter' => 'mail=*@*',


I have tried, still the same. No entries is displayed. Try searching also can't work.
Title: LDAP address book configuration problem
Post by: chome on April 15, 2009, 03:54:38 AM
I saw there is an error in log directory:

[15-Apr-2009 15:48:29] PHP Warning:  ldap_search() [function.ldap-search]: Search: Operations error in C:\Inetpub\wwwroot\roundcube\program\include\rcube_ldap.php on line 549

Line 549:


$this->ldap_result = $function($this->conn, $this->prop['base_dn'], $this->filter, array_values($this->fieldmap), 0, 0);



What does this mean?
Title: LDAP address book configuration problem
Post by: rosali on April 15, 2009, 05:09:55 AM
[15-Apr-2009 09:30:03] PHP Warning:  ldap_search() [function.ldap-search]: Partial search results returned: Sizelimit exceeded in C:\xampp\htdocs\webmail\program\include\rcube_ldap.php on line 549

I have a similiar error, but it seems not to be a problem. Sorry, no further clue.
Title: LDAP address book configuration problem
Post by: chome on April 16, 2009, 03:47:16 AM
Finally i got it work! It's was the binding issue to my LDAP. ;D

Does anyone know the syntax of the FILTER of ldap? I may need to do a lot of 'AND' and 'OR' operations but dont know what was the syntax, it looks a bit weird in the example.
Title: LDAP address book configuration problem
Post by: chome on April 16, 2009, 05:25:59 AM
I want to have the following filter query:

To filter when (Group = 0 | GroupType = 2) & (Mail = '') [meaning mail field has no value]

How am i suppose to do that?

Thanks
Title: LDAP address book configuration problem
Post by: Julius Caesar on April 16, 2009, 06:02:58 AM
Maybe you can find here (http://msdn.microsoft.com/en-us/library/aa746475%28VS.85%29.aspx) more information on LDAP filtering.