Author Topic: [0.4] password plugin, dovecot, password doesn't replace  (Read 7946 times)

deisler

  • Guest
[0.4] password plugin, dovecot, password doesn't replace
« on: August 13, 2010, 03:23:24 AM »
Hello.
I use dovecot, postfixadmin, password in cram-md5.
When I try to set a new password, I get an error:
Quote
Could not save new password. Encryption function missing.


My config.inc.php

Quote


// Password Plugin options
// -----------------------
// A driver to use for password change. Default: "sql".
// See README file for list of supported driver names.
$rcmail_config['password_driver'] = 'sql';

// Determine whether current password is required to change password.
// Default: false.
$rcmail_config['password_confirm_current'] = false;

// Require the new password to be a certain length.
// set to blank to allow passwords of any length
$rcmail_config['password_minimum_length'] = 5;

// Require the new password to contain a letter and punctuation character
// Change to false to remove this check.
$rcmail_config['password_require_nonalpha'] = false;

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

// 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.
//      %D is replaced with the dovecotpw-crypted version of the new password
//      %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'] = 'UPDATE mailbox set password=%D where username=%u limit 1';

// Path for dovecotpw (if not in $PATH)
$rcmail_config['password_dovecotpw'] = '/usr/sbin/dovecotpw';

// Dovecot method (dovecotpw -s 'method')
$rcmail_config['password_dovecotpw_method'] = 'CRAM-MD5';

// Enables use of password with crypt method prefix in %D, e.g. {MD5}$1$LUiMYWqx$fEkg/ggr/L6Mb2X7be4i1/
$rcmail_config['password_dovecotpw_with_method'] = true;

?>


Help me please :)

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
[0.4] password plugin, dovecot, password doesn't replace
« Reply #1 on: August 13, 2010, 04:07:39 AM »
Any errors in Roundcube logs? What you get when you're changing password using command
/usr/sbin/dovecotpw -s "CRAM-MD5"
?

deisler

  • Guest
[0.4] password plugin, dovecot, password doesn't replace
« Reply #2 on: August 13, 2010, 04:56:51 AM »
Quote from: alec;29375
Any errors in Roundcube logs?
?


Thanks, I realized the problem.
Path /tmp not been registered in php open_basedir :)

Offline yitiana

  • Newbie
  • *
  • Posts: 1
sql password
« Reply #3 on: August 16, 2010, 01:49:09 AM »
Try to use command prompt to change sql password.
Osql –S yourservername –E
1> EXEC sp_password NULL, ’yourpassword’, ’sa’
2> GO
This article is given 4 methods to change sql password, that could help.