I have one postfix+cyrusIMAP mail server in the production environment, now I need to migrate it to a new hardware platform. I've got the new server set up (ubuntu 10.04.2 LTS, postfix+cyrusIMAP), but how can I test it without messing with the current mail server? It's going to be on the same domain that the company is using.
You can send emails from a machine using some kind of fake DNS (or special transport map entry). So your mail client will believe this is the real mail server (you do not have to modify the real externally visible MX record yet).
You can do the same with connecting to the new machine with telnet or netcat and sending some test mail by hand and checking later if they arrived fine.
There is a parameter in postfix
In a migration scenario you want to either shut down SMTP on port 25 (after modifying the MX record) on the old server or use some mechanism (e.g. content_filter transport) to redirect the mails hitting the old server to the new one.