Upgrading vpopmail + courier to vpopmail + dovecot First install dovecot with vpopmail support: Ensure the vpopmail use flag is set for dovecot. # emerge dovecot Adjust the dovecot.conf file: Uncomment and adjust the protocols line as appropriate: protocols = imap imaps pop3 pop3s Uncomment and adjust the first_valid_uid and last_valid_uid lines to match the vpopmail user id: first_valid_uid = 89 last_valid_uid = 89 Comment out any existing userdb/passwd blocks. Uncomment the passdb vpopmail line and the userdb vpopmail line. Stop courier: # /etc/init.d/courier-imap stop Migrate IMAP subscription lists from courier format to dovecot format: # wget http://www.dovecot.org/tools/courier-dovecot-migrate.pl # for i in ~vpopmail/domains/*; do perl ./courier-dovecot-migrate.pl --to-dovecot --recursive $i; done Start dovecot: # /etc/init.d/dovecot start Test that IMAP/POP3 is working ok. Rejoice! Remove courier from the run levels # rc-update del courier-imapd default # rc-update del courier-imapd-ssl default Add dovecot # rc-update add dovecot default Remove courier # emerge -C courier-imapd