TIL: DNS MX record needs corresponding A record

Wenn migrating one domain to a new server I managed to temporally disable email reception by configuring the DNS record incorrectly.

Assumming ip-old is the IP of the server I want to move away from and ip-new is the IP of the new server, I started with the following DNS table:

A 	ip-old 
A 	ip-old *
MX 	mail.domain.com

I wanted to have the domain redirected to the new server which had the new website, but keep the emails at the old server. So I changed only the A records as follows:

A 	ip-new
A	ip-new 	*
MX 	mail.domain.com

And that’s when I could not receive email anymore. Reading about it I learned, that MX records always point to a domain, not an IP. So there always has to be an appropriate A record for that domain. So far the wildcard record took care of that. But since I pointed that to the new IP as well, it broke. The correct configuration is:

A 	ip-new
A	ip-new 	*
A 	ip-old	mail
MX 	mail.domain.com