Previously our domain, let's call it ourdomain.com, pointed to an IP address (our web host). In addition, we use Office 365 to handle our domain email accounts. DNS records:
ourdomain.com A XXX.XXX.XXX.XXX
ourdomain.com MX 10 our-domain.protection.mail.outlook.com
Now we have moved to Azure's cloud environment. It is recommended to not use A records and rather CNAME records, as IP addresses are not guaranteed to be retained.
So we removed the A record and added the CNAME:
ourdomain.com CNAME ourcloudsite.cloudapp.net
ourdomain.com MX 10 our-domain.protection.mail.outlook.com
Now our email is not being received. The result of an nslookup for MX records on ourdomain.com is also incorrect.
I've read that we need to have an A record for MX records to resolve. What A record are we supposed to use then?
We could use the IP of ourcloudsite.cloudapp.net, but then we risk having downtime.