i want to migrate to a new webserver software - already installed it. now i want to test it + be sure anything works fine.

is it possible to run both email servers on the same machine? i think there might be problems with the mx record pointing to the same ip.



Just add a second IP address to the server's network interface - should be pretty trivial - and have each mail server listen on its own IP. This will avoid the MX=Port 25 issues already mentioned.


If you're only having one IP on your Server, there's no way two run both mailservers at the same time (of course you could change the port - but that won't do anything good), because the MX-Record always refers to Port 25 (SMTP). I guess you'll just have two switch between those two mailservers and hope you don't miss any important mail. To minimize the risk you should do that on low traffic hours.

Best regards, Fabian


It is possible to run multiple MTAs on the one machine, but they have to bind to different ports. I know for a fact that Courier can listen to whichever port you like; it uses this feature to run a second server on 587 as an MSA, should you need it.

However, MX information cannot be directed to a port, only an IP address. The only way to test this is to manually send data to the non-standard port.


Assuming you're hosting your server, one solution is to use ip aliases and bind the two servers to the two ip addresses, then putting a proxy (HAProxy for example) in front of the mail servers and redirecting mail to the proxy, after that you can change the mail server you're using right from the proxy conf. You can also to the same if you can not use ip aliases and only use different ports binding for the mail servers.


Why wouldn't you have ONE mail server (software) running multiple domains?

For example... you can set up a single mail server to handle email for:





...without the need for having multiple servers/software running.

That being said... it IS possible... you just have to keep an eye on your IP addresses and the ports you're using.

In the end its WAY easier to manage if its just one server and multiple domains...

Hope this helps.


In regards (specifically) to migrating an old mail server to a new mail server...

Its always nice to have TWO static IP addresses. You can then create DNS entries (with a short TTL) to point to mail2.example.com

Test out the server all you like... when you're happy with it change the DNS to make it your new "mail.example.com" and then create a record for "oldmail.example.com" to point at the old mail server.

This also helps if you need to migrate user mailboxes, etc over or some user in a panic needs to (somehow) get back to the old mail server to get something.

  • i think you misunderstood - the old emailserver is already running multiple domains, and before migrating to the new emailserver i want to see if it works properly. the problem: i'm only having 1 ip on the server :( – Fuxi Dec 2 '09 at 0:01

one of the simplest way is to use virtualization, assuming that your computer server supports virtualization, that will help you a lot to provision new server without interrupting the old one

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.