On 22-09-2017 4:34, Stroller wrote:
[...]

I think my main question is whether there's any reason I shouldn't
just rsync the maildirs across from the old mail server to the new
one?

There aren't many clients using this server, so I don't care if
clients have to redownload all their messages (in fact, I expect
they'll probably end up doing so anyway).

I'd like to preserve read/unread status of each message, but can't
think of anything else important.
[...]

Using rsync should be fine, I've done it myself recently several times. What you need to consider:
1. The downtime required during the final incremental transfer.
2. If you're using the same uid/gid on the destination server make sure you preserve them when transferring the data across. 3. To avoid duplicate messages in the destination you *must* use --delete rsync switch for the incremental transfers.

Important: I'm assuming you're using virtual mailboxes under the same uid/gid.

Suggested mandatory steps, ymmv:
1. Configure Dovecot in the destination to use Maildir and test everything: logging, SSL, authentication, mail delivery and so on. If you have Courier-IMAP specific configuration, e.g. folders that are being automatically created/subscribed upon the first login, replicate it and test it on the Dovecot server as well. 2. Do the initial data transfer using "-avz --numeric-ids" and see if you're happy with the result in the destination. 3. Run several incrementals adding "--delete" switch, followed by courier-dovecot-migrate.pl *executed as the mail user* to get a ballpark figure for the estimated outage window. 4. Test few mailboxes post-migration and compare the results with the source server. 5. On Day D, stop Courier-IMAP and Dovecot services on both servers to prevent any mailbox changes and run the last incremental, sanity checks, IP reconfiguration if Dovecot is the drop-in replacement, start Dovecot, another round of sanity checks, check the logs and so on. Here you're already at the point of no return :)

---
Adi Pircalabu

Reply via email to