22 Sep
2017
22 Sep
'17
2:15 a.m.
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:
- The downtime required during the final incremental transfer.
- If you're using the same uid/gid on the destination server make sure you preserve them when transferring the data across.
- 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: figure for the estimated outage window.
- 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.
- Do the initial data transfer using "-avz --numeric-ids" and see if you're happy with the result in the destination.
- Run several incrementals adding "--delete" switch, followed by courier-dovecot-migrate.pl *executed as the mail user* to get a ballpark
- Test few mailboxes post-migration and compare the results with the source server.
- 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