Fwd: Dsync mail migration from v2.2 --> v2.3

Antonio Leding tech at leding.net
Tue Jul 14 07:16:20 EEST 2020


Two items I forgot to mention in my initial post:

(A) I am running the sync command on the new v2.3 server.

(B) To get sync to work, I had to add the following to the old v2.2 server:


auth_socket_path = /var/run/dovecot/auth-master


I think this relates to what I said in my initial post about AWS linux installing all of the sockets into a non-standard location.

I say this because when I was trying get this working but before I had added the above setting, I noticed the following message:


Error: userdb lookup: connect(/usr/local/var/run/dovecot/auth-userdb) failed: No such file or directory


This seemed to indicate that the old server was looking for the auth socket in the incorrect location.  So, I decided to correct this with the setting I noted above.

Please let me know if I had this correct or perhaps there is something else going on here…

Thanks...



> Begin forwarded message:
> 
> From: Antonio Leding <tech at leding.net>
> Subject: Dsync mail migration from v2.2 --> v2.3
> Date: July 13, 2020 at 8:45:18 PM PDT
> To: dovecot at dovecot.org
> 
> Hello all,
> 
> I’ve been battling how to migrate my imap mail following a new server install that has Dovecot and Postfix upgrades.
> 
> The research seems pretty clear that the preferred method is to use dsync to get the mail from Server-A to B.  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.
> 
> Environment
> 
> Old server: Dovecot 2.2.2 running on AWS linux 1 (I believe that is based on RHEL 4 or 5).
> New server: Dovecot 2.3.10.1 running on CentOS 7.6.
> All authentication is done by Dovecot against a mySQL (and Maria) database — nothing is in files.
> All mail data and mailboxes are owned by a dedicated user “vmail” and I’m using a static userdb.
> SSH is via public key file only — no PW based SSH is allowed.
> SSH is on a non-standard port
> 
> Operations
> 
> 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.
> Here is the command that I believe is good to go:
> 
> sudo doveadm -Dv sync -u [ MBOX_TO_MIGRATE ] remote:vmail@[ SERVER ]
> 
> The SERVER references a host stanza in root's SSH connection file: /root/.ssh/config
> I need to use the config file because I (a) use a non-standard SSH port; (b) need to login as “vmail” ; (c) need to use the “vmail" identity file.
> 
> Comments & notes
> 
> The Dovecot 2.2 package for AWS Linux was apparently setup to install all of the sockets in /usr/local/var/run/dovecot.  This must have caused authentication issues because to get it working properly, I then had to add "path = /var/run/dovecot/auth-master” statement to the “auth" stanza in dovecot.conf file.
> 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.
> 
> Questions
> 
> First and foremost — any obvious issues here?
> Next, any advice and\or lessons learned with this type of migration?
> Finally, presuming this is the proper way to do this, will this migrate all mail content including Sent, Deleted, Drafts, etc.?
> 
> 
> Thanks in advance for taking the time and providing any feedback — very much appreciated...
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20200714/9e07d9f3/attachment-0001.html>


More information about the dovecot mailing list