Drain failed chunks before resetting
04Length framing still matters after an error. The receiver consumes and discards the failed chunk’s declared data before replying, so those bytes are not mistaken for commands.
After pending replies are accounted for, the sender issues RSET and receives 250. The failed transaction’s accumulated segments are cleared; this is recovery, not successful message delivery.
Source for this drawing: RFC 3030 · Read RFC section 2 ↗
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.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
After a failure on a BDAT command, the receiver MUST accept and discard its associated message data before sending the appropriate 4XX or 5XX reply.
- After a failure on a BDAT command, the receiver MUST accept and discard its associated message data before sending the appropriate 4XX or 5XX reply.
- On receiving a 4XX or 5XX reply to BDAT, the sender treats the transaction as failed and MUST NOT send additional BDAT segments. Existing pipelined chunks are a separate case.
- A receiver advertising PIPELINING MUST be prepared to accept and discard additional BDAT chunks already in the pipeline after the failed one. Do not confuse already sent bytes with permission to send new chunks after observing failure.
- The failed state is indeterminate. The sender MUST issue RSET before additional commands. RSET clears the transaction; a new envelope would be needed to send another message. Chunk size is a resource choice, not a fixed RFC constant.
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 ↗