I have setup a new mail server which will eventually replace a current mailserver. Now, without changing the MX records to point to the new server, I will be unable to test this mailserver. Is their a way that I can still test that the mailserver is working? I've created a new domain alias (such as test.domain.com) and that is working fine- just wandering if there is any way through some DNS tricks that can trick an email program into sending the email to a different host (such as my new host) than the current email server?
There are 3 different methods I can think of to achieve the desired result. (see note at end)
Set up the box either with a different public IP to your real mail server, or even better connected to a firewall/router with a different ip to your mail server. Set up MX records for a different domain pointing to this and configure your mailserver to accept emails for this test domain. This way you can test internally and externally but you will have to use a different domain.
Set up a box where you can specify the mailserver IP rather than it looking up the MX record. Many multi function print/scan devices could do the job, or you could go further and set up something like a postfix box or a server 2003 box with IIS and set it to forward emails for your domain to your test server so you can use a variety of test boxes to send email. This will use your specified IP address for that domain rather than a DNS lookup of the MX record. This will only work internally, unless you have another public IP to send the mails to.
Set up a DNS server - something like Windows Server DNS or djbdns and then create your fake MX records and set the sender to use this machine for DNS. Again this will only work internally unless you have a 2nd public ip, and you will need to either allow your test DNS server to be accessed via VPN/WAN, or you will need to have a remote test DNS server.
Caveat - I haven't tried having both a production and test Exchange box serving the same email domain and on the same windows domain as a test Exchange box - I have a feeling they may not get on together but I'm not certain.