1

I need to migrate from Courier IMAP to Dovecot IMAP.

Can Dovecot IMAP use two types of encrypted passwords on a virtual user's database password field?

I have database with a password field that is encrypted in MySQL format encrypt (MD5) so its limited to 8 chars and SHA-512. Courier is working with that and user can login using old encryption method and SHA-512 encrypted passwords.

Some users have old encryption and some users have new SHA-512 encryption.

Will this work for Dovecot IMAP?

Courier imapd has

MYSQL_CRYPT_PWFIELD    password

What Dovecot should have?

dovecot-sql.conf

default_pass_scheme = SHA512-CRYPT

dovecot.conf

auth default {
  mechanisms = digest-md5
  passdb sql {
    args = /etc/dovecot/dovecot-sql.conf
  }

Will this work the same as it does for Courier?

1 Answer 1

0

see e.g. https://doc.dovecot.org/configuration_manual/authentication/password_schemes/

"The password scheme can be overridden for each password by prefixing it with {SCHEME}, for example: {PLAIN}pass."

So, you may just need to provide an appropriate scheme prefix with what you're importing from Courier.

Then see https://wiki.dovecot.org/HowTo/ConvertPasswordSchemes - which shows how you could re-hash an existing password to use a more secure hash.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.