Author Topic: Help LDAP Search  (Read 5790 times)

Offline ko1

  • Newbie
  • *
  • Posts: 3
Help LDAP Search
« on: September 18, 2006, 06:18:29 PM »
Hi everybody,

i had a LDAP Server and it running well. I like to search with the Addressbook from roundcube. Can anybody giv me a roundcube main.inc.php with LDAP search, that works. I found no howto or examples.
Thanks for help

Offline ko1

  • Newbie
  • *
  • Posts: 3
Re: Help LDAP Search
« Reply #1 on: September 19, 2006, 02:56:52 PM »
Is there nobody who can help me? Here is my main.php.inc
" $rcmail_config['ldap_public']['xxxx.de'] = array('hosts'     => array('servernamel'),
                           'port'     => 389,
                          'base_dn'    => 'ou=Users,dc=xxxx,dc=info,',
                          'search_fields' => array('Email' => 'mail', 'Name' => 'cn'),
                          'name_field'  => 'cn',
                          'mail_field'  => 'mail',
                          'scope'     => 'sub',
"                          'fuzzy_search' => 1)
it dosen`t work. Please help

Offline ko1

  • Newbie
  • *
  • Posts: 3
Re: Help LDAP Search
« Reply #2 on: September 21, 2006, 12:34:04 PM »
Thanks for all you help. What a good forum. I just managed it. :'(

Offline Adam

  • Jr. Member
  • **
  • Posts: 46
Re: Help LDAP Search
« Reply #3 on: September 23, 2006, 08:16:53 AM »
how about posting how to do it?

I have asked questions that people haven't answered but I don't take that tone..

Offline ckmandli

  • Newbie
  • *
  • Posts: 9
Re: Help LDAP Search
« Reply #4 on: December 18, 2006, 05:05:30 PM »
Ko1 I would be interested in seeing how you got this to work.

Offline haralder

  • Newbie
  • *
  • Posts: 2
Re: Help LDAP Search
« Reply #5 on: January 02, 2007, 07:01:41 AM »
I have it working with the LDAP installed in my server with the following config:

$rcmail_config['ldap_public']['localhost'] = array('hosts'     => array('localhost'),
                          'port'     => 389,
                          'base_dn'    => 'ou=addressbook,dc=xxxx',
                          'search_fields' => array('Email' => 'mail', 'Name' => 'cn'),
                          'name_field'  => 'cn',
                          'mail_field'  => 'mail',
                          'scope'     => 'sub',
                          'fuzzy_search' => 1);

What I didn't manage to configure is that the addresses are autocompleted when writing an email.

Offline NaiosKae

  • Jr. Member
  • **
  • Posts: 40
Re: Help LDAP Search
« Reply #6 on: January 02, 2007, 07:55:24 AM »
Hi every body and happy new Year

Mine works well after some changes

first, I'm using french locales and it seems there's a bug in it

in file /usr/share/roundcube/program/localization/fr/labels.inc
you have to replace this line :
$labels['addcontact']   = 'Ajouter le contact sélectionné à votre Carnet d\'adresses';
by this one :
$labels['addcontact']   = 'Ajouter le contact sélectionné à votre Carnet d\\\'adresses';

my conf looks like :
grep -A 8 ldap_public /etc/roundcube/main.inc.php

$rcmail_config['ldap_public']['domain'] = array('hosts'      => array('server'),
                            'port'       => 389,
                            'base_dn'     => 'ou=users,dc=domain',
                            'search_fields'  => array('Email' => 'mail', 'Nom' => 'cn', 'Prenom' => 'sn', 'identifiant' => 'uid'),
                            'name_field'    => 'cn',
                            'firstname_field' => 'sn',
                            'mail_field'    => 'mail',
                            'scope'      => 'sub',
                            'fuzzy_search'   => 1);

as you can see, have made some little changes to have name and first name shown in the result list (so firstname_field won't be usefull for you)

--

I have a second ldap server with personnal adress books

where contact dn looks like :
dn: cn=contactname,ou=username,ou=personal_addressbook,dc=domain
only readable and writeable by
dn: uid=username,ou=users,dc=domain

I don't know to build ldap conf for roundcube to make this ldap directory usable due to user specific bind options and search dn.

If someone could help me on this point