![]() |
Courier and encrypted passwords
My mail server is built largely using "how to" information here, and it is providing POP3 mail serving via Courier. User data is in MySQL and I'm using ViMbAdmin to manage the MySQL data. This works fine for plain text passwords.
But if I change the passwords to being encrypted (ViMbAdmin uses MD5) then the password is rejected. With diagnostics turned up, there is a message in the log, which simply quotes the plain text password submitted by the mail client, and says it does not match the encrypted password (which it quotes) extracted from the database. The Courier configuration file giving the MySQL information is being modified to contain a reference to encrypted passwords at the same time as the field in the database was changed to encrypted. Is the wrong encryption being used? Or does Courier need some further configuration? |
Can you post your /etc/postfix/main.cf and your Courier configuration?
|
Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete versionCode:
RANDFILE = /usr/lib/courier/pop3d.randCode:
MYSQL_SERVER 127.0.0.1 |
Try to comment out the:
MYSQL_CLEAR_PWFIELD password line and remove the # in front of the line: MYSQL_CRYPT_PWFIELD password then restart courier authdaemon. |
Thanks for your suggestion.
I understand that is required to use encrypted passwords. But that is exactly what I did do, at the same time as changing the database table to make the passwords encrypted. The result was that connection attempts were refused, with the mail log showing an error message quoting the plain text password submitted through the mail client, and showing the encrypted password from the database, along with text telling me that they did not match. So what I'm trying to find out is whether Courier is expecting the same encryption as used by ViMbAdmin (i.e. MD5) or whether there is a need to specify the encryption used to Courier, or what. |
The default encryption on Linux system is "crypt" and as far as I know, courier expects that passwords are encrypted with crypt. For example ISPConfig is storing the passwords in crypt format in the mysql database and that works fine with courier.
|
Thanks. The code in ViMbAdmin only supports MD5:
PHP Code:
|
Code example to create a encrypted password:
Code:
$salt="$1$"; |
Thanks.
I understand the code ok, but not how Courier would be able to use the password. Courier receives the password as plain text, and unless I've missed something, the only thing that is stored in the database table is the encrypted password. If the encryption is done using a random salt, I don't see how Courier would be able to process the plain text password in order to do a comparison with the encrypted password, since Courier does not know the salt. |
Courier knows the salt, as the salt is the first part of the encrypted password string.
|
| All times are GMT +2. The time now is 05:39. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.