4

I have a dedicated domain mydomain.com and I have a Windows Azure service that has to send email from addresses @mydomain.com. I found a mail service that agrees to send email "on behalf" of my domain.

That mail service requires me to add an MX-record for my domain and looks like MX-record implies a static IP address. Windows Azure doesn't guarantee static IPs at the moment and the industry-wide solution is to use CNAME records to map my domain name onto the third-level domain name in Azure (mydomain.cloudapp.net).

So ideally I'd want both an A-record and a CNAME for my domain. Is that possible? What are other options for my situation?

1
  • 1
    I don't really see anybody answering this question directly. Would you have an A record and CNAME together?
    – barlop
    Oct 12, 2018 at 18:29

2 Answers 2

1

If you want to receive email you will want a static IP address for your mail server. In your case, I would have the mail service receive mail on your behalf as well. I would expect that the MX record would point to the provider's sever. Consider adding an SPF record indicating that the mail provider will be sending email for your domain.

If you are sending email to the Internet you do need an MX of some sort. Your email provider is correct in requiring you to setup an MX record. Your MX can point to their domain.

Consider mapping www.mydomain.com to the Azure service, if you have other services you can use the same subdomain, or additional subdomains. mydomain.com does not need to have an A record, but will need an MX record.

Having a CNAME record for mydomain.com eliminates the ability to have subdomains.

Try something like:

mydomain.com.     MX     10 mail.mailprovider.com
mydomain.com.     TXT    'v=spf1 mx -all"
www.mydomain.com. CNAME  mydomain.cloudapp.net
2
  • Hosting email does not require an MX record.
    – adaptr
    Nov 1, 2011 at 15:24
  • 1
    @adaptr: No it doesn't, but if you do unless A record of the domain points to the mail server. Most organizations prefer to have it point to their web servers. MX records are much more flexible than a records for specifying mail servers.
    – BillThor
    Nov 2, 2011 at 0:13
12

These are the rules:

  • A CNAME may not coexist with any other records.
  • An MX record may not point to a CNAME.

These are RFC requirements.

NOTE that you do not need an MX record to host mail services - an A record pointing to your domain is sufficient.

You could point a CNAME to that A record.

4
  • Most domains mail services have MX records because addresses are usually like [email protected] while the mail server is actually mail.example.com. example.com would have an MX record pointing to mail.example.com.
    – BillThor
    Nov 1, 2011 at 14:05
  • 1
    How is that related to what I said ?
    – adaptr
    Nov 1, 2011 at 14:12
  • An A record is only sufficient if you host email on the address of the domain. This rarely the case.
    – BillThor
    Nov 1, 2011 at 14:23
  • 1
    Yes, hosting email using an A record requires said A record to point to the IP of the mail server.
    – adaptr
    Nov 1, 2011 at 14:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .