Visual RFC.
ALL RFCs / RFC 3030
Read the RFC ↗
RFC 3030 / SMTP CHUNKS AND BINARY MIME

Count transmitted octets, not local file characters

02

An octet is eight bits. BDAT counts only the following data segment: the command line and its CRLF are outside the declared count. A chunk can split a message at any octet boundary.

RFC 3030 · § 2EXAMPLE
5 / 5
Count transmitted octets, not local file charactersSeparate undersized-count error leaves LF and B as command input.A body excerpt; whole MIME structure omittedACRLF.CRLFBRemaining LF B is interpreted as command inputThe original chunk is now misframedAll cells equal one octet; excerpt only; no dot-stuffing
05
Compare an undersized count

Separate malformed example: declaring 5 consumes only A CR LF dot CR. The remaining LF B is treated as command input, not as the tail of a valid chunk. Correct counting is essential.

Source for this drawing: RFC 3030 · Read RFC section 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

After BDAT <count> and its CRLF, send exactly count data octets immediately. There is no DATA-style 354 readiness reply and no dot-terminated data block.

  • After BDAT <count> and its CRLF, send exactly count data octets immediately. There is no DATA-style 354 readiness reply and no dot-terminated data block.
  • Text sent with BDAT MUST use canonical MIME format, including CRLF line endings. Count after canonicalization, since a local LF convention can change the number of transmitted octets.
  • A CRLF-dot-CRLF sequence inside a counted chunk is data. Do not add DATA dot-stuffing or a DATA end marker to BDAT framing.
  • A count too large waits for more data or consumes subsequent command bytes. A count too small leaves data to be parsed as commands; parsers MUST handle and reject arbitrary-octet command lines. These are separate malformed examples, not valid fallback mechanisms.
DETAILS

Fictional example.com mail peers. Counts and byte excerpts are illustrative, not a full MIME message or a deployment configuration. Separate comparisons reset state. This companion is not an SMTP parser or implementation.

Read the RFC section ↗

All chapters in RFC 3030

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 ↗