My setup is a productive server (e.g. 1.1.1.1
) 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. 1.1.1.2
), also using postfix but with dovecot as a new IMAP server. I already setup postfix on 1.1.1.2
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 1.1.1.1
respectively server.example.com
(the latter automatically resolves to 1.1.1.1
, 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.
Two questions:
I would like to have my old server
1.1.1.1
deliver all received mails to the new server1.1.1.2
for 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.