Visual RFC.
ALL RFCs / RFC 5321
Read the RFC ↗
RFC 5321 / SMTP CONVERSATION

Lines & dot transparency

05

SMTP uses CRLF line endings and a single-dot line to mark the end of DATA. Dot-stuffing preserves literal leading dots.

RFC 5321 · § 4.5.2EXAMPLE
4 / 4
04
Terminate DATA separately.

The standalone dot line ends content transfer and is not part of the delivered message.

Lines & dot transparencyA line beginning with a dot is escaped by adding another dot on the wire, then restored at the receiver; a separate single-dot line is the DATA terminator.A dot can be content or framingIllustrative DATA transferOriginal content.helloordinary lineWire content..helloordinary lineunstuffDelivered: .helloone leading dot restored<CRLF> . <CRLF> → end DATAThe terminator is not delivered as message contentA separate single-dot line terminates DATA

Key idea: Escape content so it cannot impersonate the delimiter.

Terms

Look up a term in the glossary ↗

Rules & examples
  • Lines end in CRLF; a line containing only a dot terminates DATA.
  • The sender prepends a dot to each content line that begins with a dot.
  • The receiver removes the extra leading dot from non-terminator lines.

Message framing is distinct from MIME encoding and from optional extensions that provide a different transfer method. A bare LF is not the defined SMTP line terminator.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

The envelope and the letter do different jobs.

Mail transport moves a message between servers. The message format describes its contents. Authentication adds checks; it does not make every message safe.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

All chapters in RFC 5321

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗