Email for your domain needs a few DNS records. MX records tell other mail servers where to deliver mail for the domain. TXT records carry SPF, DKIM, and DMARC, which let receiving servers check that mail from your domain is really yours. If you run your own mail server, it also needs reverse DNS on its IP address. Mail that fails these checks often lands in spam, or is refused.
Before you begin
Section titled “Before you begin”- The domain is on Manage DNS. See Add a domain.
- You have the values from your mail provider, or from your own mail server: the mail server names and priorities, the SPF text, and the DKIM selector and key.
- If you run your own mail server, it has a name with an A record, such as
mail.example.com. See Add a DNS record.
To add each record, open the domain with Actions, then Manage, on Manage DNS, click Add Record, and choose the type under Select Record Type.
Check the MX record E2E created
Section titled “Check the MX record E2E created”When you added the domain, E2E created an MX record with priority 10 that points to the domain
itself, example.com.. It sends the domain’s mail to the address in the domain’s A record.
Your domain’s MX records must name the servers that receive its mail. If that is the server at the domain’s own address, keep this record. If another server or provider receives your mail, edit the record so that Mail Server names that server, or delete it and add your provider’s records. See Edit a DNS record and Delete a DNS record.
Add MX records
Section titled “Add MX records”- Under Select Record Type, choose MX.
- In Host Name, enter
@for mail toyou@example.com. - In TTL(SECONDS), enter the TTL, such as
14400. - In Priority, enter a number from zero to 65535, such as
10. Mail servers try the lowest number first. - In Mail Server, enter the mail server’s full host name, such as
mail.example.com. MyAccount adds the dot at the end. An MX record points to a host name rather than an IP address. - Click Submit.
For a backup mail server, or a provider that gives you several servers, add one MX record for each, with its own priority. Servers with the same priority share the mail. MX records on one host name share one TTL, so give them all the same TTL; a different TTL on a new one changes it for all of them.
Add an SPF record
Section titled “Add an SPF record”An SPF record lists the servers allowed to send mail for your domain. It is a TXT record on the domain itself.
- Under Select Record Type, choose TXT.
- In Host Name, enter
@. - In TTL(SECONDS), enter the TTL.
- In TXT, enter the SPF text without quotes. MyAccount adds them.
- Click Submit.
Two common forms:
v=spf1 mx -allv=spf1 include:_spf.example.com ~allThe first allows only the servers in your MX records to send mail for the domain. The second allows
your mail provider’s servers, with the provider’s own name after include:. Your provider gives you
its exact text. A domain has one SPF record, so put every sender in one line.
TXT is a single line. Enter the whole text on it, with no quotes; the field says Enter TXT string here. Quotes are not allowed.
Add a DKIM record
Section titled “Add a DKIM record”DKIM signs your outgoing mail, and receiving servers check the signature against a public key in your DNS. Your mail provider or mail server gives you a selector and the key.
-
Under Select Record Type, choose TXT.
-
In Host Name, enter the DKIM host name your provider gives you: the selector, then a dot and the word domainkey with an underscore in front. For a selector called
selector1, enter:selector1._domainkey -
In TTL(SECONDS), enter the TTL.
-
In TXT, paste the DKIM value on one line, without quotes. It starts like this:
v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA... -
Click Submit.
A long key, such as a 2048-bit key of about 400 characters, goes in as one value and answers correctly.
Add a DMARC record
Section titled “Add a DMARC record”DMARC tells receiving servers what to do with mail that fails SPF and DKIM, and where to send reports. Add it as a TXT record with this host name:
_dmarcA starting value that only collects reports, with your own address:
v=DMARC1; p=none; rua=mailto:dmarc@example.comOnce the reports show your mail passing, you can change p=none to p=quarantine or
p=reject.
Set reverse DNS for your own mail server
Section titled “Set reverse DNS for your own mail server”If you run your own mail server on an E2E node or a reserved IP, set its IP’s reverse DNS to the
server’s name, such as mail.example.com. Many receiving servers check that the IP’s reverse name
matches the name the server uses, and that this name’s A record points back to the same IP. See
Set up reverse DNS.
A mail provider that sends your mail from its own servers looks after reverse DNS for them.
Check the records
Section titled “Check the records”Each one confirms with Domain Record has been created successfully. A TXT value shows in the list without its quotes. To see what other mail servers will read, ask an E2E nameserver:
dig @ns50.e2enetworks.net.in example.com MX +shortdig @ns50.e2enetworks.net.in example.com TXT +shortdig @ns50.e2enetworks.net.in selector1._domainkey.example.com TXT +shortThe MX output lists each record as its priority and server, such as 10 mail.example.com.. The TXT
output shows each value in quotes. A long DKIM key comes back as two or more quoted parts, which
mail servers join into the original key.
For help when a record is refused, or when a mail record seems to replace another, see Troubleshooting DNS.