RFC 5321 / START HERE
SMTP, before the details
SMTP: Simple Mail Transfer Protocol
SMTP moves email from a sending system toward a receiving mail server. It handles the delivery conversation, rather than how your inbox displays the message.
The idea in one picture
A sender submits mail
Mail servers relay it
The receiving server accepts it
A simplified picture of the idea; the chapters explain the actual mechanisms.
Why it exists
Mail systems run by different organizations need a common way to accept, relay, and report problems delivering messages.
A familiar example
An email sent to a colleague travels from your mail provider to the server responsible for the colleague's address.
Helpful background
You can start here without reading another RFC. If these ideas are unfamiliar, these short introductions may help.
What you’ll learn next
Begin with chapter one, or choose a topic.
- Envelope vs messageSMTP transports an envelope and message content. Visible To and From headers do not define the transport envelope.→
- DNS & the next hopA recipient domain leads to DNS mail exchangers, then usable host addresses for a delivery attempt.→
- Greeting & extensionsThe server greets the client. EHLO establishes the client identity and discovers optional capabilities.→
- MAIL, RCPT, DATAA transaction sets one reverse-path, one or more recipients, then transfers the message content.→
- Lines & dot transparencySMTP uses CRLF line endings and a single-dot line to mark the end of DATA. Dot-stuffing preserves literal leading dots.→
- Replies & later changesReply classes tell the client whether to proceed, send more information, retry later, or treat an attempt as permanently rejected.→
- Relays, aliases & tracesMail can pass through relays, gateways, aliases, and mailing lists before final delivery.→
- Queues, retries & timeoutsA sender keeps undelivered mail with its envelope, delays retries, and uses stage-specific timeouts.→
- Acceptance & failure reportsA positive completion after DATA means the receiver accepts responsibility to deliver, relay, or report a later failure.→
- Security & scopeBase SMTP does not prove the author named in a header. Transport protections, relay policy, and message authentication solve different problems.→
This introduction explains RFC 5321 (2008). Read the original RFC ↗