I have a Postfix/Dovecot (2.0.19) IMAP/SMTP setup using mysql (5.5.29) as the backend database (Ubuntu 12.04.2 server). I have Roundcube (0.7.1) up and running in general, but I can't quite get the password plugin working.
The plugin displays, and it detects whether I'm entering my old password correctly, but when that is correct, the result is "Could not save new password." There's nothing interesting in the roundcube logs, nor in the mail or system logs. I turned on general logging for mysql, and this is what floats through during the attempt (I replaced long random-ish strings of characters with 'XXX' and used color to separate the two connections):
130412 13:47:39 115 Connect roundcubeuser@localhost on
115 Init DB roundcubedb
115 Query SET NAMES utf8
115 Query PREPARE mdb2_statement_mysql_XXX FROM 'SELECT vars, ip, changed FROM session WHERE sess_id = ?'
115 Prepare SELECT vars, ip, changed FROM session WHERE sess_id = ?
115 Query SET @0 = 'XXX'
115 Query EXECUTE mdb2_statement_mysql_XXX USING @0
115 Query DEALLOCATE PREPARE mdb2_statement_mysql_XXX
115 Query PREPARE mdb2_statement_mysql_XXX FROM 'SELECT * FROM users WHERE user_id = ?'
115 Prepare SELECT * FROM users WHERE user_id = ?
115 Query SET @0 = '2'
115 Query EXECUTE mdb2_statement_mysql_XXX USING @0
115 Query DEALLOCATE PREPARE mdb2_statement_mysql_XXX
116 Connect mailuser@localhost on
116 Init DB maildb
116 Query SET NAMES utf8
115 Query PREPARE mdb2_statement_mysql_XXX FROM 'SELECT vars, ip, changed FROM session WHERE sess_id = ?'
115 Prepare SELECT vars, ip, changed FROM session WHERE sess_id = ?
115 Query SET @0 = 'XXX'
115 Query EXECUTE mdb2_statement_mysql_XXX USING @0
115 Query DEALLOCATE PREPARE mdb2_statement_mysql_XXX
115 Quit
116 Quit
So from what I can see, it's connecting to the mail database (that houses the users/passwords), but isn't actually doing anything with the connection? I'm kind of out of ideas on where to look for more logs... any thoughts?
Did you setup the password plugin? What are your settings in the config.inc.php?
config.inc.php, comments removed, up to the end of the SQL section:
// Password Plugin options
$rcmail_config['password_driver'] = 'sql';
$rcmail_config['password_confirm_current'] = true;
$rcmail_config['password_minimum_length'] = 0;
$rcmail_config['password_require_nonalpha'] = false;
$rcmail_config['password_log'] = false;
// SQL Driver options
$rcmail_config['password_db_dsn'] = 'mysql://mailuser:mailuserpassword@localhost/maildb';
// Intended on fleshing this out a bit, but wanted to get something working first
$rcmail_config['password_query'] = 'UPDATE mailbox SET password=%D WHERE username=%u';
$rcmail_config['password_idn_ascii'] = false;
// Also tried making a shell script called dovecotpw that just passes the arguments on to doveadm pw, no difference
$rcmail_config['password_dovecotpw'] = '/usr/bin/doveadm pw';
$rcmail_config['password_dovecotpw_method'] = 'MD5-CRYPT';
$rcmail_config['password_dovecotpw_with_method'] = false;
$rcmail_config['password_hash_algorithm'] = 'sha1';
$rcmail_config['password_hash_base64'] = false;
Well all of that looks fine, it should put an error message in the RoundCube error log when it fails, what does that say?
Only thing in /var/log/roundcube/errors is the following two lines repeated often. Pretty sure it's unrelated, as they happen as part of regular operation and don't appear to affect anything.
[13-Apr-2013 02:44:25 UTC] PHP Deprecated: Assigning the return value of new by reference is deprecated in /usr/share/php/MDB2.php on line 393
[13-Apr-2013 02:44:25 UTC] PHP Deprecated: Assigning the return value of new by reference is deprecated in /usr/share/php/MDB2.php on line 2647