Skip to content

Set up email records

View as Markdown

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.

  • 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.

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.

  1. Under Select Record Type, choose MX.
  2. In Host Name, enter @ for mail to you@example.com.
  3. In TTL(SECONDS), enter the TTL, such as 14400.
  4. In Priority, enter a number from zero to 65535, such as 10. Mail servers try the lowest number first.
  5. 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.
  6. 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.

An SPF record lists the servers allowed to send mail for your domain. It is a TXT record on the domain itself.

  1. Under Select Record Type, choose TXT.
  2. In Host Name, enter @.
  3. In TTL(SECONDS), enter the TTL.
  4. In TXT, enter the SPF text without quotes. MyAccount adds them.
  5. Click Submit.

Two common forms:

v=spf1 mx -all
v=spf1 include:_spf.example.com ~all

The 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.

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.

  1. Under Select Record Type, choose TXT.

  2. 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
  3. In TTL(SECONDS), enter the TTL.

  4. In TXT, paste the DKIM value on one line, without quotes. It starts like this:

    v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...
  5. Click Submit.

A long key, such as a 2048-bit key of about 400 characters, goes in as one value and answers correctly.

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:

_dmarc

A starting value that only collects reports, with your own address:

v=DMARC1; p=none; rua=mailto:dmarc@example.com

Once the reports show your mail passing, you can change p=none to p=quarantine or p=reject.

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.

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 +short
dig @ns50.e2enetworks.net.in example.com TXT +short
dig @ns50.e2enetworks.net.in selector1._domainkey.example.com TXT +short

The 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.