Visual RFC.
ALL RFCs / RFC 2920
Read the RFC ↗
RFC 2920 / SMTP COMMAND PIPELINING

Preserve input and flush replies at the right time

04

The server may combine some replies in a buffer, while preserving both command order and unread input. Buffering must not turn into deadlock.

RFC 2920 · § 3.2EXAMPLE
4 / 4
Preserve input and flush replies at the right timeSMTP command pipelining. Separate group containing only MAIL and RCPT: once the local TCP input buffer is empty, all pending replies must go out immediately, even without DATA.Preserve input; bound reply bufferingSeparate group: MAIL and RCPT onlyLocal TCP input buffer is now emptyPending replies: 250 / 250Flush all pending replies immediatelyNo DATA or future group is requiredUnrecognized-command replies cannot be bufferedRFC 2920 · chapter 4 · state 4 · fictional example
04
Flush when local input becomes empty

Separate group containing only MAIL and RCPT: once the local TCP input buffer is empty, all pending replies must go out immediately, even without DATA.

Source for this drawing: RFC 2920 · Read RFC section 3.2 ↗

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

A message needs an address.

Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.

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.

KEY POINT

A server offering PIPELINING MUST reply in received command order, MUST NOT assume commands not yet received, and MUST NOT flush or lose TCP input-buffer contents even when a command fails.

  • A server offering PIPELINING MUST reply in received command order, MUST NOT assume commands not yet received, and MUST NOT flush or lose TCP input-buffer contents even when a command fails.
  • The server SHOULD buffer replies to grouped envelope commands such as MAIL and RCPT, but MUST NOT buffer replies to EHLO, DATA, VRFY, EXPN, TURN, QUIT or NOOP, nor replies to unrecognized commands.
  • Whenever the local TCP input buffer is emptied, the server MUST send all pending replies immediately. It cannot wait indefinitely for a guessed next command or the remainder of an imagined group.
  • Buffering is an implementation choice within these rules, not a requirement for one TCP packet. A server SHOULD include explanatory text identifying the command, but clients still MUST correlate by count/order, not that text.
DETAILS

Fictional ASCII SMTP examples. PIPELINING batches commands, not delivery guarantees or security. Packet boundaries and wall-clock timing are schematic.

Read the RFC section ↗

All chapters in RFC 2920

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 ↗