My setup is a productive server (e.g.
220.127.116.11) hosting a domain, lets say
example.com. Currently, postfix and courier (only IMAP) are doing the job of hosting mail. I am planning to transfer the domain to a new server (e.g.
18.104.22.168), also using postfix but with dovecot as a new IMAP server. I already setup postfix on
22.214.171.124 to accept all mails for example.com, which are delivered to the mailboxes and are accessable via IMAP. All accounts, including mail, are shell accounts. I use Debian for both servers.
In the webinterface of my virtual host provider I am able to set the IP of the server (A-record) and the mailserver (MX-record) for
example.com. Currently, they are pointing to
server.example.com (the latter automatically resolves to
126.96.36.199, too). I cannot influence any TTL-settings. And, I am not going to change my provider, just changing the virtual machine the domain is hosted on.
I would like to have my old server
188.8.131.52deliver all received mails to the new server
184.108.40.206for testing purposes (e.g. to test mailfilters, SPAM recognition, etc. as not everything will be setup identically). Is this a good idea (e.g. regarding bounces, etc.)? What's the correct way in postfix for achieving this (something like reverse-proxy in Apache HTTP Server)?
What's the best way to perform the domain transfer from the old server to the new server such that downtime is minimal (at least during IMAP account transfer I am sure I need to stop all mail servers) and no mails are getting lost/are deferred? I had the idea of letting the old server forward mails to the new server for a certain time such that mails can be received from systems with outdated DNS cache, too.
Generally speaking, I am searching for a convenient and best-practice way to perform this. And, I do not know, if my ideas regarding both questions are pointing in the correct direction.