Roundcube Community Forum

Miscellaneous => Roundcube Discussion => Topic started by: Matt2cv on December 09, 2010, 06:04:31 AM

Title: Roundcube and ldap (read/write)
Post by: Matt2cv on December 09, 2010, 06:04:31 AM
Hello,

I currently use version roundcube 0.4 and openldap on the same machine.
For now, I can connect to my directory in using roundcube, but I can not change or add contact with roundcube.
Is it possible for roundcube? Is somebody has already managed to do it?

Thank you for your help.

Matt
Title: Roundcube and ldap (read/write)
Post by: Julius Caesar on December 16, 2010, 04:47:50 AM
I have the same setup. Does the user with which you connect to the LDAP have enough rights to update the information?
Title: Roundcube and ldap (read/write)
Post by: Matt2cv on December 16, 2010, 05:47:56 AM
I use the admin user. With phpldapadmin, I can create, update or remove any user. But with roundcube, I can't.
Title: Roundcube and ldap (read/write)
Post by: Julius Caesar on December 16, 2010, 08:26:13 AM
Enable debug logging and check the logfiles for errors:

In the main.inc.php change the following value:

$rcmail_config['debug_level'] = 1;
to
$rcmail_config['debug_level'] = 8;
Title: Roundcube and ldap (read/write)
Post by: Matt2cv on December 16, 2010, 11:42:37 AM
In the ldap's file, the message is "[16-Dec-2010 17:40:20 +0100]: C: Read [dn: ..." when I try to modify a contact and a message appears in roundcube like "Source in read only".
Title: Roundcube and ldap (read/write)
Post by: Julius Caesar on December 17, 2010, 03:53:23 AM
There is an option in the ldap config in the main.inc.php to enable writing:

set
  'writable'      => false,
// Indicates if we can write to the LDAP
// If writable is true then these fields need to be populated:
// LDAP_Object_Classes, required_fields, LDAP_rdn
to
  'writable'      => true,
// Indicates if we can write to the LDAP
// If writable is true then these fields need to be populated:
// LDAP_Object_Classes, required_fields, LDAP_rdn
Title: Roundcube and ldap (read/write)
Post by: Matt2cv on December 17, 2010, 11:54:55 AM
My config for the access to my LDAP

Code: [Select]

$rcmail_config['ldap_public']['domain.net'] = array(
  'name'            => 'Addressbook',
  'user_specific'   => true,
  'hosts'           => array('localhost'),
  'port'            => 389,
  'base_dn'         => 'ou=%u,ou=addressbook,dc=domain,dc=net',
  'bind_dn'         => 'cn=admin,dc=domain,dc=net',
  'bind_pass'       => '<password>',
  'writeable'       => true,
  'LDAP_Object_Classes' => array('top','inetOrgPerson'),
  'search_fields'   => array('cn', 'mail'),
  'required_fields' => array('cn', 'sn', 'mail'),
  'LDAP_rdn'        => 'mail',
  'ldap_version'    => 3,
  'name_field'      => 'cn',
  'firstname_field' => 'gn',
  'surname_field'   => 'sn',
  'email_field'     => 'mail',
  'scope'           => 'sub',
  'filter'          => '',
  'fuzzy_search'    => true);
Title: Roundcube and ldap (read/write)
Post by: Julius Caesar on December 27, 2010, 05:19:58 AM
  'user_specific'   => true,
This uses user specific authentication. Set this to:

  'user_specific'   => false,
And the user specified in the config will be used.
Title: Roundcube and ldap (read/write)
Post by: madal on January 11, 2011, 01:18:38 PM
hello there,

Right now when I send email it uses username from identities. so people who i sent email they get username in from. is there a way i can change  / or get the display name from LDAP so when i sent email it goes like display name ? Any tips on this would be appericiated.

Regards,
Madal
Title: Roundcube and ldap (read/write)
Post by: Matt2cv on January 11, 2011, 06:08:53 PM
Hi,

If I use the option

Code: [Select]
'user_specific'   => false,  

the contact don't appear in roundcube.

Thx
Title: Roundcube and ldap (read/write)
Post by: madal on January 12, 2011, 03:46:52 AM
hello Matt2cv,

we also use openldap and like to disallow changes in LDAP so I do not need to configure write access. how is your ldap config look like ? I would like to get user display name from LDAP server instead of username. could you please through me some hints ?

Madal
Title: Roundcube and ldap (read/write)
Post by: Julius Caesar on January 12, 2011, 03:59:45 AM
Have you tried this:

'name_field'      => 'displayName',
Title: Roundcube and ldap (read/write)
Post by: madal on January 12, 2011, 07:49:16 AM
Thanks,

is not these setting are for address book ? or this will also apply for user identities ?

M
Title: Roundcube and ldap (read/write)
Post by: Julius Caesar on January 12, 2011, 08:29:58 AM
AFAIK, user identities are stored in the RoundCube-database.

However, you could try this (http://code.google.com/p/roundcubeldap/) plugin.
Title: Roundcube and ldap (read/write)
Post by: morganlawerence on January 12, 2011, 09:11:52 AM
thank you.
Title: Roundcube and ldap (read/write)
Post by: madal on January 13, 2011, 05:44:10 AM
I am having address book issue from LDAP. here is my config for address book and the error:

$rcmail_config['address_book_type'] = 'ldap';
$rcmail_config['ldap_public']['offaddress'] = array(
  'name'          => 'offaddress',
  'hosts'         => array('myldaphost'),
  'port'          => 389,
  'use_tls'       => false,
  'user_specific' => false,
  'base_dn'       => 'dc=hi,dc=is',
  'bind_dn'       => 'uid=test,ou=People,dc=domain,dc=com',
  'bind_pass'     => 'mypassword',
  'writable'      => false,
  'LDAP_Object_Classes' => array("top","inetOrgPerson"),
  'required_fields'     => array("cn", "mail"),        
  'LDAP_rdn'      => 'mail',
  'ldap_version'  => 3,
  'search_fields' => array('mail', 'cn'),
  'email_field'   => 'mail',
  'displayname_field => 'displayName',
  'sort'          => 'cn',
  'scope'         => 'sub',
  'filter'        => 'cn',
  'global_search' => true,
  'fuzzy_search'  => true,
   );

$rcmail_config['autocomplete_addressbooks'] = array('offaddress');

so I am always getting this error :
PHP Fatal error:  Call to a member function set_pagesize() on a non-object in /var/www/html/roundcube/program/steps/addressbook/func.inc on line 35

What i am doing wrong here, LDAP is an open LDAP. any hints ?

Madal
Title: Roundcube and ldap (read/write)
Post by: madal on January 13, 2011, 07:56:29 AM
Hello all,

I made this working - some configuration mismatch.

Is there a way to allow user to have their Personal Addressbook and LDAP address book ? if i choose ldap address book then users personal address are not listed in ldap. how can i do that ?

PS: Now the problem is if i type username on compose To: it comes the full address from LDAP i.e Joe Smith , and hit the send now button it comes up with error like this :
PHP Error: Invalid compose ID in /var/www/html/roundcube/program/steps/mail/sendmail.inc on line 33 (POST /roundcube/?_unlock=loading1294928059503?_task=mail&_action=send)

so I cannot send email to this user as using like above however if i use only username@domain.com the mail sends successfully. Is there a workaround ?



M