How Email Delivery Works
From the send button to the inbox: the servers, protocols and DNS records that deliver a message.
Sending an email feels instant, but a message normally crosses several systems. Understanding the journey explains what shows up in the headers and why.
1. Composition and submission
A mail client or app hands the message to the sender's outgoing mail server using SMTP submission, usually after logging in. This is where protocols such as ESMTPSA appear in the first Received header. The server adds headers such as Message-ID and Date if the client did not.
2. Finding the destination: MX records
The sending server looks at the recipient's domain and asks DNS for its MX records, which list the servers that accept mail, in priority order. It then opens an SMTP connection to the first reachable one.
3. SMTP between servers
EHLO mail.example.com
MAIL FROM:<[email protected]>
RCPT TO:<[email protected]>
DATA
...headers and body...
.MAIL FROM becomes the Return-Path and is the identity SPF checks. The receiving server records the connection in a Received header and may start TLS with STARTTLS, which is why ESMTPS shows up.
4. Checks and filtering
The receiving side evaluates SPF, verifies DKIM signatures, applies DMARC policy and runs spam and malware filters. It records results in headers such as Authentication-Results. A gateway may forward the message internally to a mailbox server, adding more Received lines.
5. Delivery to the mailbox
A final system, often over LMTP, stores the message. Your mail app then reads it using IMAP or a similar protocol. That final step does not add to the route, since it is a mailbox read rather than another hop.
What each step leaves behind
| Step | Header evidence |
|---|---|
| Client submission | Message-ID, Date, User-Agent or X-Mailer, first Received |
| Server to server | Received, Return-Path |
| Checks | Authentication-Results, Received-SPF, DKIM-Signature, ARC-* |
| Filtering | X-Spam-* and other provider headers |
The Email Header Analyzer reconstructs this route from the Received headers so you can see each hop. For troubleshooting a message that never arrived, the sender's mail server logs are the other half of the story, and the Log Sanitizer helps you share those logs without exposing addresses and IPs.
Frequently asked questions
- What is an MX record?
- A DNS record that names the mail servers accepting email for a domain, with priorities. Sending servers look it up to find where to deliver.
- What is the difference between SMTP, IMAP and POP3?
- SMTP sends and relays mail between servers. IMAP and POP3 are how a mail client reads mail from a mailbox.
- Why can a message take several minutes to arrive?
- Greylisting, queues after a temporary failure, content scanning and busy servers can all hold a message. Received timestamps show where the time went.
Try it yourself
The tool that pairs with this guide.
Email Header Analyzer
Analyze email headers to understand authentication, delivery paths, mail servers, timestamps, and potential security issues.
Log Sanitizer
Mask secrets, tokens, and PII in logs before you share them.
Redirect Chain Analyzer
Analyze URL redirects, detect redirect chains and loops, and inspect HTTP status behavior.
Did this make subnetting easier?
If these free developer tools save you time, consider buying me a byte. Your support helps keep DevCraftKit free and growing.
Related articles
What Is CIDR? A Complete Guide to Classless Inter-Domain Routing
CIDR notation packs an IP address and its network size into one compact string. Here's exactly what it means and how to read it.
Updated
Understanding IPv4 Subnetting: A Practical Guide
Subnetting is how one IP range gets divided into smaller, purpose-built networks. Here's a practical walkthrough with real examples.
Updated
CIDR vs. Subnet Mask: What's the Difference?
A /24 and 255.255.255.0 mean the same thing. Here's how CIDR notation and subnet masks map to each other.
Published