Hi,
I am using postfix-mysql on centos6.2 with dovecot sasl login.Also for webuser I am able to login on roundcube and all working perfectly fine.Also placed config.inc.php.dist under plugin/password and enabled password change option via main.inc.php in roundcube .I got stuck with configuration of password change as can't make out what has to be paasword_db_DSN and password query.Does DB needs to be db of roundcube or it has to be my main db?Also what should be my password_query should look like?
My config looks like this for postfix DB.
Created a database for postfix with username postfix and password admin.There is table mailbox as well for mailbox logins.
which looks like below.
CREATE TABLE `mailbox` (
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`name` varchar(255) CHARACTER SET utf8 NOT NULL,
`maildir` varchar(255) NOT NULL,
`quota` bigint(20) NOT NULL DEFAULT '0',
`local_part` varchar(255) NOT NULL,
`domain` varchar(255) NOT NULL,
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`active` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`username`),
KEY `domain` (`domain`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Postfix Admin - Virtual Mailboxes';
Dovecot is something like this
auth_mechanisms = plain login
passdb {
driver =sql
args = /etc/dovecot/dovecot-sql.conf
}
userdb {
driver = prefetch
}
userdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf
}
Dovecot-sql.conf is as below
driver = mysql
connect = host=/var/lib/mysql/mysql.sock dbname=postfix user=postfix password=admin
# Alternatively you can connect to localhost as well:
default_pass_scheme = CRYPT
password_query = SELECT password,username as user FROM mailbox WHERE username = '%u' AND active = '1'
user_query = SELECT maildir, 10000 AS uid, 10000 AS gid FROM mailbox WHERE username = '%u' AND active = '1'
All is working fine for me except password change.
Need expert opinion on this.
Regards,
Sushil