Been putting this off for months… migrating the mail server over to a newer OS. Dovecot changed its configuration schema in 2.4, so I have to carefully tip-toe around that migration.
Dovecot 2.4 is what ships in AlpineLinux 3.22, and given 3.23 was released not long ago, it's probably high time I ripped that bandaid off.
So first step, snapshot the existing VM and make a copy of it. That way, I have a sandbox to play and test in, that won't nuke my real mail.
```
lithium:~# rbd snap create one/one-54@20251220
Creating snap: 100% complete...done.
lithium:~# rbd snap create one/one-55@20251220
Creating snap: 100% complete...done.
lithium:~# rbd cp one/one-54@20251220 one/gapmx-testing-vda
Image copy: 100% complete...done.
lithium:~# rbd cp one/one-55@20251220 one/gapmx-testing-vdb
Image copy: 1% complete...
```
`one/one-55` ("one" being OpenNebula… no longer in use but the names remain) being my data volume for my mail. 512GB.
Steps forward from here:
1. change the IP address and hostname of the clone before booting it, disable message collection cron jobs
2. configure the clone to boot up (we'll put it on a different node to further isolate)
3. update to AlpineLinux 3.22 (this will nuke Dovecot config, but that's okay for now)
4. update again to 3.23
5. check LDAP is still sane
6. use the config on the _existing_ and _still in service_ mail server to get Dovecot working on the new one
7. check I can still see my mail
8. inject an email via SMTP and ensure it gets delivered to the correct place
9. shut down the two mail servers
10. drop the testing data volume
11. rename the volume names so they don't have non-descript OpenNebula image IDs so future-me doesn't get confused (we'll keep a copy of the existing VM just in case).
12. point the production VM at the new names
13. boot the new VM
14. undo the changes made in step (1).
15. reboot and ensure it's all working and sane.
https://doc.dovecot.org/2.4.1/core/admin/migration.html
#HomeServer #dovecot