Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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
share|improve this answer
    
Hosting email does not require an MX record. –  adaptr Nov 1 '11 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 '11 at 0:13

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.

share|improve this answer
    
Most domains mail services have MX records because addresses are usually like user@example.com while the mail server is actually mail.example.com. example.com would have an MX record pointing to mail.example.com. –  BillThor Nov 1 '11 at 14:05
1  
How is that related to what I said ? –  adaptr Nov 1 '11 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 '11 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 '11 at 14:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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