Allow user changes their password in RoundCube webmail
Khanh is a full stack web developer with over 15 years of experience developing for the web
After installed RoundCube for my customer, they asked: user can change their own password
To do this, we have to enable password plugin of RoundCube
cd plugins/password
cp config.inc.php.dist config.inc.php
nano config.inc.php
Set $rcmail_config['password_driver'] = 'sql';
Save file
cd ../config
nano main.inc.php
Find the line $rcmail_config['plugins'] = array(); and change to $rcmail_config['plugins'] = array( 'password');
Save file
If you finish 9 steps above and access to RoundCube, you will see the Password tab in Settings section. However, you maybe meet the error:
[1305] FUNCTION xxx_roundcube.update_passwd does not exist (SQL Query: SELECT update_passwd('', '@'))
The simplest way is modify password_query:
Find $rcmail_config['password_query'] in plugins/password/config.inc.php
Change $rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)'; to $rcmail_config['password_query'] = 'UPDATE zpanel_postfix.mailbox SET password=CONCAT(\'{PLAIN-MD5}\',MD5(%p)) WHERE username=%u AND password=CONCAT(\'{PLAIN-MD5}\',MD5(%o)) LIMIT 1';
All done!




