1 (edited by hata_ph 2010-05-31 15:41:15)

Topic: Configure password change for roundcubemail-0.3.1 [SOLVED]

I have just upgraded roundcubemail-0.3.1 on my iRedOS-5 and all working fine except for the plugins especially password change....do anyone know how to configure it for iRedMail?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Configure password change for roundcubemail-0.3.1 [SOLVED]

I guess you're using OpenLDAP backend, right?
Reference: http://iredmail.org/wiki/index.php?titl … be_Webmail

3 (edited by hata_ph 2010-05-31 15:43:21)

Re: Configure password change for roundcubemail-0.3.1 [SOLVED]

ZhangHuangbin wrote:

I guess you're using OpenLDAP backend, right?
Reference: http://iredmail.org/wiki/index.php?titl … be_Webmail

I am using MySQL as backend and I have found out the way...
just update below setting to plugins/password/config.inc.php

// SQL Driver options
// ------------------
// PEAR database DSN for performing the query. By default
// Roundcube DB settings are used.
//$rcmail_config['password_db_dsn'] = '';
$rcmail_config['password_db_dsn'] = 'mysqli://roundcube:xxx@localhost/vmail';

// The SQL query used to change the password.
// The query can contain the following macros that will be expanded as follows:
//      %p is replaced with the plaintext new password
//      %c is replaced with the crypt version of the new password, MD5 if available
//         otherwise DES.
//      %o is replaced with the password before the change
//      %n is replaced with the hashed version of the new password
//      %q is replaced with the hashed password before the change
//      %h is replaced with the imap host (from the session info)
//      %u is replaced with the username (from the session info)
//      %l is replaced with the local part of the username
//         (in case the username is an email address)
//      %d is replaced with the domain part of the username
//         (in case the username is an email address)
// Escaping of macros is handled by this module.
// Default: "SELECT update_passwd(%c, %u)"
//$rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)';
$rcmail_config['password_query'] = 'UPDATE mailbox SET password=%c,modified=NOW() WHERE username=%u LIMIT 1';

http://www.roundcubeforum.net/7-third-p … ugins.html


remember to activate the plugin in config/main.inc.php

$rcmail_config['plugins'] = array('additional_message_headers', 'archive');

http://trac.roundcube.net/wiki/Doc_Plugins

4

Re: Configure password change for roundcubemail-0.3.1 [SOLVED]

I added 'LIMIT 1' in iRedMail moment ago, thanks for your remind.
And we use this in plugin:

$rcmail_config['password_query'] = 'UPDATE vmail.mailbox SET password=%c,modified=NOW() WHERE username=%u LIMIT 1';

5

Re: Configure password change for roundcubemail-0.3.1 [SOLVED]

ZhangHuangbin wrote:

I added 'LIMIT 1' in iRedMail moment ago, thanks for your remind.
And we use this in plugin:

$rcmail_config['password_query'] = 'UPDATE vmail.mailbox SET password=%c,modified=NOW() WHERE username=%u LIMIT 1';

what is the different of using......

UPDATE vmail.mailbox SET password=%c,modified=NOW() WHERE username=%u LIMIT 1';

???

6

Re: Configure password change for roundcubemail-0.3.1 [SOLVED]

Same.