<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello all,<div class=""><br class=""></div><div class="">I’ve been battling how to migrate my imap mail following a new server install that has Dovecot and Postfix upgrades.</div><div class=""><br class=""></div><div class="">The research seems pretty clear that the preferred method is to use <font face="Courier" style="font-size: 14px;" class="">dsync</font><font class=""> to get the mail from Server-A to B.</font>  After several hours and several different combos, I think I might finally have this working.  However, before committing to my procedure and running it against all mailboxes, I wanted to bounce this off of the community and get any feedback that might catch possible issues and\or offer some advice.</div><div class=""><br class=""></div><div class=""><b class="">Environment</b></div><div class=""><br class=""></div><div class=""><ul class="MailOutline"><li class=""><b class="">Old server:</b> Dovecot 2.2.2 running on AWS linux 1 (I believe that is based on RHEL 4 or 5).</li><li class=""><b class="">New server:</b> Dovecot 2.3.10.1 running on CentOS 7.6.</li><li class="">All authentication is done by Dovecot against a mySQL (and Maria) database — nothing is in files.</li><li class="">All mail data and mailboxes are owned by a dedicated user “vmail” and I’m using a static userdb.</li><li class="">SSH is via public key file only — no PW based SSH is allowed.</li><li class="">SSH is on a non-standard port</li></ul><div class=""><br class=""></div></div><div class=""><b class="">Operations</b></div><div class=""><br class=""></div><div class=""><ul class="MailOutline"><li class="">I’ve decided to migrate one mailbox per command.  I only have about 30 accounts on the server so this shoudn't be a huge deal.</li><li class="">Here is the command that I believe is good to go:</li></ul></div><div class=""><br class=""></div><div class=""><font face="Courier" style="font-size: 14px;" class="">sudo doveadm -Dv sync -u [ MBOX_TO_MIGRATE ] remote:vmail@[ SERVER ]</font></div><div class=""><font face="Courier" style="font-size: 14px;" class=""><br class=""></font></div><div class=""><ul class="MailOutline"><li class="">The SERVER references a host stanza in root's SSH connection file: <font face="Courier" style="font-size: 14px;" class="">/root/.ssh/config</font></li><li class=""><font class="">I need to use the config file because I <b class="">(a)</b> use a non-standard SSH port; <b class="">(b)</b> need to login as “vmail” ; <b class="">(c)</b> need to use the “vmail" identity file.</font></li></ul><div class=""><br class=""></div></div><div class=""><b class="">Comments & notes</b></div><div class=""><br class=""></div><div class=""><ul class="MailOutline"><li class="">The Dovecot 2.2 package for AWS Linux was apparently setup to install all of the sockets in <font face="Courier" style="font-size: 14px;" class="">/usr/local/var/run/dovecot</font>.  This must have caused authentication issues because to get it working properly, I then had to add <font face="Courier" style="font-size: 14px;" class="">"path = /var/run/dovecot/auth-master”</font> statement to the <font face="Courier" style="font-size: 14px;" class="">“auth"</font> stanza in <font face="Courier" style="font-size: 14px;" class="">dovecot.conf</font> file.</li><li class="">Also, the fact that I do not use a “standard” SSH config was an issue early on but once I committed to allowing vmail to SSH into the old server, that part became moot.  For security purposes, I will probably disable vmail SSH after the data is migrated.</li></ul><div class=""><br class=""></div><div class=""><b class="">Questions</b></div></div><div class=""><br class=""></div><div class=""><ul class="MailOutline"><li class="">First and foremost — any obvious issues here?</li><li class="">Next, any advice and\or lessons learned with this type of migration?</li><li class="">Finally, presuming this is the proper way to do this, will this migrate all mail content including Sent, Deleted, Drafts, etc.?</li></ul><div class=""><br class=""></div></div><div class=""><br class=""></div><div class="">Thanks in advance for taking the time and providing any feedback — very much appreciated...</div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>