RFC 3676 Proposed Standard Message format

The Text/Plain Format and DelSp Parameters

This specification establishes two parameters (Format and DelSP) to be used with the Text/Plain media type. In the presence of these parameters, trailing whitespace is used to indicate flowed lines and a canonical quote indicator is used to indicate quoted lines. This results in an encoding which appears as normal Text/Plain in older implementations, since it is in fact normal Text/Plain, yet provides for superior wrapping/flowing, and quoting. This document supersedes the one specified in RFC 2646, "The Text/Plain

Status
Proposed Standard. On the standards track and stable enough to implement against. Most of the email stack stays at this level permanently.
Published
February 2004
Authors
R. Gellens
Read it
rfc-editor.org · DOI

Replaces RFC 2646: The Text/Plain Format Parameter.

Normative requirements

Every sentence in this RFC carrying an RFC 2119 keyword, with the section it came from. 9 must, 15 should, 7 may.

4 The Format and DelSp Parameters

  • MAYA Format value of Flowed indicates that the definition of flowed text (as specified in this memo) was used on generation, and MAY be used on reception.
  • SHOULD NOTWhen creating messages, DelSp SHOULD NOT be specified in Text content types other than Text/Plain with Format = Flowed.
  • SHOULDWhen receiving messages, DelSp SHOULD be ignored if used in a Text content type other than Text/Plain with Format = Flowed.

4.1 Interpreting Format=Flowed

  • MAYA series of one or more flowed lines followed by one fixed line is considered a paragraph, and MAY be flowed (wrapped and unwrapped) as appropriate on display and in the construction of new messages (see Section 4.5).
  • SHOULDAn interpreting agent SHOULD allow for three exceptions to the rule that paragraphs end with a fixed line.
  • SHOULDThese exceptions are improperly constructed messages: a flowed line SHOULD be considered to end the paragraph if it is followed by a line of a different quote depth (see 4.5) or by a signature separator (see 4.3); the end of the body also ends the paragraph.

4.2 Generating Format=Flowed

  • SHOULDWhen generating Format=Flowed text, lines SHOULD be 78 characters or shorter, including any trailing white space and also including any space added as part of stuffing (see Section 4.4).
  • SHOULDWhen this technique is used, the DelSp parameter SHOULD be used; if used it MUST be set to "no".
  • MUSTWhen this technique is used, the DelSp parameter MUST be used and MUST be set to "yes".
  • RECOMMENDEDIt is RECOMMENDED that agents avoid this by inserting the SP CRLF sequence following the existing SP.
  • MAYGenerating agents MAY use either method within each Text/Plain body part.
  • SHOULD NOTRegardless of which technique is used, a generating agent SHOULD NOT insert a space in an unnatural location, such as into a word (a sequence of printable characters, not containing spaces, in a language/coded character set in which spaces are common).
  • SHOULDIf faced with such a word which exceeds 78 characters (but less than 998 characters, the [SMTP] limit on line length), the agent SHOULD send the word as is and exceed the 78-character limit on line length.
  • SHOULDA generating agent SHOULD:
  • MAYIn order to create messages which do not require space-stuffing, and are thus more aesthetically pleasing when viewed as Format=Fixed, a generating agent MAY avoid wrapping immediately before ">", "From ", or space.
  • MUST NOTWhen placing soft line breaks in a paragraph, generating agents MUST NOT place them in a way that causes any line of the paragraph to be a signature separator line, because paragraphs cannot contain signature separator lines (see Sections 4.3 and 6).
  • SHOULD NOT[Quoted-Printable] encoding SHOULD NOT be used with Format=Flowed unless absolutely necessary (for example, non-US-ASCII (8-bit) characters over a strictly 7-bit transport such as unextended [SMTP]).
  • SHOULD NOTIn particular, a message SHOULD NOT be encoded in Quoted- Printable for the sole purpose of protecting the trailing space on flowed lines unless the body part is cryptographically signed or encrypted (see Section 4.6).

4.3 Usenet Signature Convention

  • MUST NOTGenerating agents MUST NOT end a paragraph with such a signature line.

4.4 Space-Stuffing

  • MUSTOn generation, any unquoted lines which start with ">", and any lines which start with a space or "From " MUST be space-stuffed.
  • MAYOther lines MAY be space-stuffed as desired.

4.5 Quoting

  • MUSTAll lines of a paragraph MUST be unquoted, or else they MUST all be quoted and have the same quote depth.
  • MUST NOTTherefore, whenever there is a change in quote depth, or a change from quoted to unquoted, or change from unquoted to quoted, the line immediately preceding the change MUST NOT be a flowed line.
  • SHOULDIf a receiving agent wishes to reformat flowed quoted lines (joining and/or wrapping them) on display or when generating new messages, the lines SHOULD be de-quoted, reformatted, and then re-quoted.
  • SHOULDThe receiver SHOULD handle this error by using the 'quote-depth-wins' rule, which is to consider the paragraph to end with the flowed line immediately preceding the change in quote depth.
  • MUSTIn other words, whenever two adjacent lines have different quote depths, senders MUST ensure that the earlier line is not flowed (does not end in a space), and receivers finding a flowed line there SHOULD treat it as the last line of a paragraph.
  • MUST NOTA generating agent MUST NOT create this situation; a receiving agent SHOULD handle it by giving preference to the quote depth.

5 Interoperability

  • MAYIf some lines begin with one or more spaces, the generating agent MAY space-stuff all lines, to maintain the relative indentation of the lines when viewed by clients which are not aware of Format=Flowed.
  • MAYThus, when generating text in languages/coded character sets in which spaces are common, the generating agent MAY always use the DelSp=no method.
  • SHOULDHand-aligned text, such as ASCII tables or art, source code, etc., SHOULD be sent as fixed, not flowed lines.

6 ABNF

  • MUSTflowed-body = *( paragraph / fixed-line / sig-sep ) paragraph = 1*flowed-line fixed-line ; all lines in paragraph MUST be unquoted or ; have same quote depth flowed-line = ( flowed-line-qt / flowed-line-unqt ) flow CRLF flowed-line-qt = quote ( ( stuffing stuffed-flowed ) / unstuffed-flowed ) flowed-line-unqt = ( stuffing stuffed-flowed ) / unstuffed-flowed stuffed-flowed = *text-char unstuffed-flowed = non-sp-quote *text-char fixed-line = fixed-line-qt / fixed-line-unqt fixed-line-qt = quote ( ( stuffing stuffed-fixed ) /

Every current email RFC