Con­vert­ing from Couri­er IMAP to dove­cot is easy

I have used Couri­er IMAP at home since a long time. As I want to update a dove­cot 1.2 set­up to dove­cot 2.x, I decid­ed to first have a look at dove­cot 2.x at home.

Switch­ing from Couri­er IMAP to dove­cot is real­ly easy. I just con­fig­ured the cor­rect path to the maildir, set­up a passdb/userdb, and it was working.

The impor­tant part was the cor­rect trans­fer of the pass­words. I used already an userdb in Couri­er IMAP with MD5 pass­words. For each user it has imappw=XXX with XXX sim­i­lar to $1$abc.

This can be con­vert­ed into a dove­cot passdb/userdb line very easily:

username:{MD5-CRYPT}$1$abc::UID:GID::HOMEDIR::userdb_mail=maildir:~/path/to/maildir

The cor­re­spond­ing passdb/userdb set­tings for dove­cot are:

passdb {
   args = scheme=MD5-CRYPT username_format=%u /usr/local/etc/dovecot/dovecot.pws
   driver = passwd-file
}
userdb {
   args = username_format=%u /usr/local/etc/dovecot/dovecot.pws
   driver = passwd-file
}

Com­pared to when I had a look the last time, dove­cot is also able to use OTP as an authen­ti­ca­tion mech­a­nism now. Unfor­tu­nate­ly I did not find any doc­u­men­ta­tion how to configure/use it.