Author Topic: LDAP address book configuration problem  (Read 8348 times)

Offline chome

  • Jr. Member
  • **
  • Posts: 18
LDAP address book configuration problem
« 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.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
LDAP address book configuration problem
« Reply #1 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.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline chome

  • Jr. Member
  • **
  • Posts: 18
LDAP address book configuration problem
« Reply #2 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?

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
LDAP address book configuration problem
« Reply #3 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 ...
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
LDAP address book configuration problem
« Reply #4 on: April 15, 2009, 03:12:13 AM »
What you can do is replace the line

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

with

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

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

Offline chome

  • Jr. Member
  • **
  • Posts: 18
LDAP address book configuration problem
« Reply #5 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?

Offline chome

  • Jr. Member
  • **
  • Posts: 18
LDAP address book configuration problem
« Reply #6 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.

Offline chome

  • Jr. Member
  • **
  • Posts: 18
LDAP address book configuration problem
« Reply #7 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?

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
LDAP address book configuration problem
« Reply #8 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.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline chome

  • Jr. Member
  • **
  • Posts: 18
LDAP address book configuration problem
« Reply #9 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.

Offline chome

  • Jr. Member
  • **
  • Posts: 18
LDAP address book configuration problem
« Reply #10 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

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
LDAP address book configuration problem
« Reply #11 on: April 16, 2009, 06:02:58 AM »
Maybe you can find here more information on LDAP filtering.
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he