Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: Cascuda on September 11, 2025, 03:38:05 PM

Title: Issue configuring Roundcube Password plugin with LDAP (lldap/lldap:stable)
Post by: Cascuda on September 11, 2025, 03:38:05 PM
Hi everyone,

I have a mail server running with DockerMailServer authenticating against LDAP (lldap/lldap:stable). Everything works fine so far: user logins against LDAP work perfectly, and Roundcube itself can authenticate without issues.

From inside the Roundcube container, if I install the LDAP tools and drop into Bash, I can run commands like ldapsearch or ldappasswd and successfully change user passwords directly in LDAP.

The problem is with the Roundcube password plugin. I cannot get it properly configured to connect to my LDAP server and allow users to change their password from the web interface.

To summarize:

Has anyone managed to get this working with lldap and could share a working plugin configuration (or some hints on what's missing)?

Thanks in advance!
Title: Re: Issue configuring Roundcube Password plugin with LDAP (lldap/lldap:stable)
Post by: Cascuda on September 12, 2025, 02:08:01 AM
Last night I forgot to attach the configuration I use in the plugin, just in case the error is there. I'd appreciate any help.

<?php
$rcmail_config
['password_driver'] = 'ldap';
$rcmail_config['password_ldap_host'] = 'ldap://mail-server_lldap:3890';
$rcmail_config['password_ldap_base'] = 'ou=people,dc=dockermailserver,dc=lan';
$rcmail_config['password_ldap_userDN'] = 'uid=%u,ou=people,dc=dockermailserver,dc=lan'
$rcmail_config['password_ldap_pass'] = 'xxxXXXxxxXXXxxx';
$rcmail_config['password_ldap_method'] = 'plain'
$rcmail_config['password_ldap_starttls'] = false
$rcmail_config['password_ldap_debug'] = false;
Title: Re: Issue configuring Roundcube Password plugin with LDAP (lldap/lldap:stable)
Post by: Cascuda on September 12, 2025, 04:52:48 PM
The original Roundcube password plugin didn't work for me with LDAP, so I built my own solution. I created an API that handles the password update in LDAP, and modified the plugin so that it only validates the input and sends the request in JSON to that API.

This way, Roundcube is just the interface while the actual password change happens in the backend.