When upgrading from Ubuntu 25.04 to 25.10, Dovecot was upgraded from 2.3 to 2.4.2. Dovecot changed its configuration format.
As there is no migration tool, three files had to be updated manually.
This setup includes:
- mailboxes in maildir format
- standard users (in
/home) - virtual users (in
/var/mail/vhosts) - certificates generated by Let’s Encrypt
These are the changes I made:
10-mail.conf
old
mail_location = maildir:/home/%u/Maildir
new
mail_driver = maildir
mail_home = /home/%{user|username}
mail_path = %{home}/Maildir
10-ssl.conf
old
ssl_cert = </etc/letsencrypt/live/mydomain.com/fullchain.pem
ssl_key = </etc/letsencrypt/live/mydomain.com/privkey.pem
new
ssl_server_cert_file = /etc/letsencrypt/live/mydomain.com/fullchain.pem
ssl_server_key_file = /etc/letsencrypt/live/mydomain.com/privkey.pem
auth-passwdfile.conf.ext
old
passdb {
driver = passwd-file
args = username_format=%n /var/mail/vhosts/%d/shadow
}
userdb {
driver = passwd-file
args = username_format=%n /var/mail/vhosts/%d/passwd
}
new
passdb passwd-file {
auth_username_format = %{user|username}
passwd_file_path = /var/mail/vhosts/%{user|domain}/shadow
}
userdb passwd-file {
auth_username_format = %{user|username}
passwd_file_path = /var/mail/vhosts/%{user|domain}/passwd
}