Count quotes before removing one stuffing space
03A leading SPACE can protect literal text. Quote marks must be counted before that one protective SPACE is removed.
Wire SPACE From garden un-stuffs to From garden. Separate indentation example: two leading SPACEs become one content SPACE, not zero.
Source for this drawing: RFC 3676 · Read RFC section 4.4 ↗
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.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
Stuffing protects content; it does not add quote depth.
- On generation, unquoted lines beginning with >, and lines beginning with SPACE or From followed by SPACE, MUST be space-stuffed. Other lines MAY be stuffed.
- Quote depth is the count of initial > marks. On reception, first count those leading quote marks. Then remove one leading stuffing SPACE from the remaining content, before testing for flowed text. Do not strip every leading space.
- Each quoted flowed line starts with its quote indicator. >> Exit and >>Exit both have depth2 and content Exit; > > Exit has depth1 and content > Exit.
SPACE is the ordinary space character, not a tab or every Unicode whitespace character. Quoted-line stuffing comes after its quote indicator. The From example explains protection from historical From-munging, not authentication of a sender or SMTP dot-stuffing. The displayed strings are fictional decoded body lines with hard CRLF endings.
Read the RFC section ↗