> On Jul 12, 2020, at 4:17 PM, Kishore Potnuru <kishore.reachme at
gmail.com> wrote:
>
> Hi All,
>
> I need to migrate the complete data & setup/environment from an old
dovecot environment to a new dovecot environment.
>
>
I did a similar move recently?I don?t have a step-by-step guide but it was
pretty straightforward. My recommendation is to get the mail copied before
working on the HA/Resilience part of the migration.
>
> In the new environment, I have 2 servers. I have got 2 of the above servers
with above configuration and need to create HA/Resilience. I know there is
advanced versions in Redhat and Dovecot. As per my organisation's existing
support/policy, that is what maximum supported RHEL and official version of
dovecot as per RHEL 7.7.
>
> Now my questions are:
>
> 1. I will stop the dovecot/postfix services on the server in old
environment. Is it possible to move/copy the complete configuration along with
data (directories/sub-directories/users/groups/existing email in new or cur
folders/complete email domains along with complete structure) to the other 2
servers in new env? Could you please suggest me the commands or steps follow
that?
>
The steps I followed:
1) Configure postfix and dovecot on the new server using the old configuration
as a GUIDE. Make sure you know why you need a setting before blindly copying it
over.
? I wanted to reuse the old hostnames on the new servers so I named the new
machine newXXXX (where XXXX is the original host name). You may not want to do
that
? I also took this as an opportunity to cleanup some configuration pain
points (e.g. I moved the blacklist from inside my amavisd.conf file to an
external file)
2) Setup DNS A (and CNAME if necessary) records with the new machines.
3) Test the new configuration to make sure it receives mail correctly and IMAP
(and POP3) clients work correctly. Test the new servers with mail server
testing services (particularly making sure you are not an open relay). Test
that outgoing mail works correctly (recommend using a mail server testing
service and not regular email services).
4) Make sure you test again.
5) If you have this already configured, setup replication on the old and new
dovecot servers.
6) Use doveadm backup to move existing mail from the old server to the new
server.
7) Do that again
8) Change your DKIM record to relaxed
9) At a time of the day when your users are typically idle, shutdown postfix.
10) Update DNS records (e.g. add new server to MX, take off old server from MX,
update A, CNAME, reverse records if you are reusing the hostname). Don?t forget
to update SPF and DKIM records.
11) Wait for the changes to propagate (could be an hour).
12) Use doveadm backup to move mail from old server to new server (very few if
any messages will be transferred)
13) Test incoming messages (you could be getting new mail already)
14) Test outgoing messages
15) Test again
16) If possible, use doveadm backup to replicate mail from the new server to the
old server (or setup automatic replication)
17) When you feel comfortable (at least a week) decommission the old email
server.
18) Make sure you have been backing up and that they work (replication to
separate dovecot instance can be part of backup solution).
19) Implement HA and Resiliency
20) Change your DKIM record to something stricter than relaxed
> 2. Now, With the above 2 servers, I would like to create the HA/Resilience.
I know there is a Replication options which are there. Could you please provide
me the steps/video, how it needs to be done?
The dovecot documentation is pretty straightforward. I recommend that you do it
over TCPS. I created a CA and made client certificates signed by that CA. That
way only my certificates worked.
>
> I have got the systems and I need to move/copy the environment to a new
environment and create the HA/Resilience. I am not sure, how to proceed and what
needs to be done clearly? I am stuck here.
>
Hope that helps
> Please help me in this step by step procedure.
>
> Thanks,
> Kishore Potnuru