How email reaches an inbox
How a message travels from a mail app to someone's inbox, and what MX, SPF, DKIM and DMARC records have to do with it.
An email passes through several servers on its way, and DNS tells each of them where to go and whom to trust. This page follows one message from alex@example.com to sam@example.net.
Sending
Section titled SendingAlex writes the message in a mail app or in webmail. The app signs in to Alex's mail server with Alex's address and password, and hands the message over with SMTP, the protocol that mail servers use to pass messages on. Alex's server then delivers the message to the server that takes mail for example.net, with SMTP again.
Finding the receiving server
Section titled Finding the receiving serverTo know where to deliver, Alex's server looks up the MX records of example.net, the part of the address after the @. They name the servers that accept mail for that domain.
So for a mail service to receive mail for your domain, your domain's MX records must name that service's servers. Mail Hosting shows the MX records to publish for each domain (Mail DNS records).
Checking the message
Section titled Checking the messageAnyone can write any From address on a message, so the receiving server checks that the message comes from the domain it claims:
- SPF
- A
TXTrecord on the sender's domain lists the servers allowed to send its mail. The receiver checks that the message came from one of them. - DKIM
- The sending server signs each message. The receiver checks the signature against a public key in the sender's DNS, which proves that the domain sent the message and that nobody changed it on the way.
- DMARC
- A
TXTrecord at_dmarcon the sender's domain tells the receiver what to do with a message that fails SPF and DKIM: deliver it anyway, treat it as suspicious or refuse it. Receivers also send the domain's owner reports about the mail they saw.
Many receivers put mail that fails these checks in the spam folder, or refuse it. That is why a mail service asks you to publish every record it lists.
If you run your own mail server on an instance, receivers also look up the reverse DNS of the address it sends from (Set reverse DNS for a floating IP).
Reading
Section titled ReadingThe message waits in Sam's mailbox on the receiving server. Sam reads it in a mail app over IMAP, which leaves the mail on the server so that every device shows the same messages and folders, or in webmail in a browser.
Email at Coritan
Section titled Email at Coritan- Mail Hosting gives people mailboxes on your domain. It receives and stores their mail, and sends the mail they write (How Mail Hosting works).
- SMTP Relay sends the mail your software writes, such as receipts and password resets, and receives none (How SMTP Relay works).
- Both list the exact records to publish for each domain, and check them. A domain is verified once its ownership, SPF and DKIM records pass, and for Mail Hosting its MX records too (When a domain is verified).
- When the domain's DNS zone is on Coritan in the same account, Coritan publishes the records for you (Records we publish for you).
- Coritan signs your mail with two DKIM keys and replaces them every 90 days. It starts each domain's DMARC record at
p=noneand moves it towardsp=rejectas reports show that your real mail passes (How the DMARC stage ramp works).
Next steps
Section titled Next steps- Set up email for your domain
- Order Mail Hosting or SMTP Relay
- Mail DNS records
- The Mail Hosting and SMTP Relay product pages on coritan.com