Trouble handling encrypted passwords

Dan Wilson dwilson at hanceville.biz
Fri Mar 25 00:45:57 UTC 2016


I am running into trouble when I try to use encrypted passwords.

I set my dovecot 2.2.10-5 installation back to plain text passwords and 
was then able to login and retrieve emails. When I set the 
default_pass_scheme to MD5-CRYPT in my sql config file, and store an 
MD5-CRYPT password in the sql database, I invariably get password 
mismatch errors on login:

Mar 24 19:40:30 server1 dovecot: auth: Debug: client in: 
AUTH#0113#011PLAIN#011service=imap#011secured#011session=25HcztQuwQBHCDBi#011lip=xx.x.xx.xxx#011rip=71.8.48.98#011lport=993#011rport=60609#011resp=<hidden>
Mar 24 19:40:34 server1 dovecot: auth-worker(9443): Debug: 
sql(test1 at xxxxxx.com,xx.x.xx.xx): query: SELECT email as user, password 
FROM virtual_users WHERE email='test1 at xxxxxx.com';
Mar 24 19:40:34 server1 dovecot: auth-worker(9443): 
sql(test1 at xxxxxx,xx.x.xx.xx): Password mismatch
Mar 24 19:40:36 server1 dovecot: auth: Debug: client passdb out: 
FAIL#0113#011user=test1 at xxxxxx.com

The password in the database was created using doveadm pw command and is 
stored as:

{MD5-CRYPT}$1$5QAeG70c$dP8y7XJVd.VxZBF/DvcAa0

I tried removing the {MD5-CRYPT} from the password string, but that 
didn't help.

I have to be doing something stupid because this should just work! Any 
ideas from anyone?

Thanks much,

Dan




More information about the dovecot mailing list