Maintaining a local Dovecot mirror

A second use I’ve discovered for this script would be to update to a fresh install of Mail-in-a-Box. I’ve run into problems similar to issue #109 (https://github.com/JoshData/mailinabox/issues/109). As one approach to solving my problems, I want to attempt to copy all my mail off the server, re-install Mail-in-a-Box and copy the mail back.

In theory, the only steps necessary with standalone-dovecot-imap would be to:

  1. Local: Run sdimap init
  2. Local: Run sdsync mirror myuser@example.com box.example.com
  3. Server: Wipe the system clean
  4. Server: install Mail-in-a-Box, creating the myuser@example.com user
  5. Local: Run sdsync mirror myuser@example.com box.example.com

I haven’t tested the above steps yet, but maybe I’ll try it this week and report back.