I'm wanting to set up a secondary MX server using Postfix but I am wondering what is the best way to test this prior to putting into production (by adding its MX entry)?
One possible way is to test it with an entirely different domain name, ie buy a domain like "fake-test-domain.com" and set it up its DNS zone with ONLY this backup MX server.
Any easier way I can just force a mail server to send a message to this server before it's listed in DNS?
I don't think I can use the hosts file on the sending system because that wouldn't emulate an MX record, right?
Just use a telnet session to test email delivery. As an example,
When telnet is not enough, or too tedious, I use SWAKS
eg: