Subject: Re: [ietf-smtp] [Editorial Errata Reported] RFC5322 (3400)

From: Pete Resnick <[email-masked]>
Date: Tue, 27 Nov 2012 17:02:00 -0600

[Bcc'ed to [email-masked]; please discuss over on [email-masked].]

Folks,

The following erratum was posted for 5322. I'm inclined to reject it 
since this discussion actually took place during DRUMS (17-18 March 1998 
in a thread with a subject of "Small Clarification to msg-fmt-04" if you 
are inclined to look) and the consensus outcome as far as I could tell 
(as document editor) was that messages without a final CRLF were SMTP's 
problem. However, 5321 (and 2821) 4.1.1.4 says:

    The mail data are terminated by a line containing only a period, that
    is, the character sequence "<CRLF>.<CRLF>", where the first <CRLF> is
    actually the terminator of the previous line (see Section 4.5.2).
    This is the end of mail data indication.  The first <CRLF> of this
    terminating sequence is also the <CRLF> that ends the final line of
    the data (message text) or, if there was no mail data, ends the DATA
    command itself (the "no mail data" case does not conform to this
    specification since it would require that neither the trace header
    fields required by this specification nor the message header section
    required by RFC 5322 [4] be transmitted).  An extra <CRLF> MUST NOT
    be added, as that would cause an empty line to be added to the
    message.  The only exception to this rule would arise if the message
    body were passed to the originating SMTP-sender with a final "line"
    that did not end in <CRLF>; in that case, the originating SMTP system
    MUST either reject the message as invalid or add <CRLF> in order to
    have the receiving SMTP server recognize the "end of data" condition.

Allowing the originating SMTP system to reject the message as invalid 
seems in conflict with 5322 on this point. So my rejecting this erratum 
will simply end us up with an erratum against 5321.

I'm inclined to hear opinions.

pr

> The following errata report has been submitted for RFC5322,
> "Internet Message Format".
>
> --------------------------------------
> You may review the report below and at:
> http://www.rfc-editor.org/errata_search.php?rfc=5322&eid=3400
>
> --------------------------------------
> Type: Editorial
> Reported by: Christoph Anton Mitterer<[email-masked]>
>
> Section: 3.5.
>
> Original Text
> -------------
>     message         =   (fields / obs-fields)
>                         [CRLF body]
>
>     body            =   (*(*998text CRLF) *998text) / obs-body
>
>
> Corrected Text
> --------------
>     message         =   (fields / obs-fields)
>                         [CRLF body]
>
>     body            =   (*(*998text CRLF) *998text) / obs-body
>
> It is RECOMMENDED that message bodies are terminated by CRLF, though this is in principle not necessary (this does not apply to messages consisting only of a header section, as header fields are always CRLF terminated).
>
> Note however, that when transporting messages via SMTP the last lines of message bodies MUST be terminated by CRLF as specified int RFC 5321, section 4.1.1.4.
>
> Notes
> -----
> Hi folks.
>
> AFAIU, the definition of body allows message bodies (not header sections) that end without CRLF.
>
> RFC5321 section 4.1.1.4. however states: "The mail data are terminated by a line containing only a period, that is, the character sequence "<CRLF>.<CRLF>", where the first<CRLF>  is actually the terminator of the previous line".
>
> So SMTP forbids, what this RFC allows.
> I guess the SMTP RFC can't be changed here and it makes no particular sense to restrict RFC5322 on the other hand.
>
> My suggestion was to add this clarification.
>
> Perhaps a similar one should be added to RFC5321, telling that Internet Messages themselves wouldn't need the last CRLF.
>
> Instructions:
> -------------
> This errata is currently posted as "Reported". If necessary, please
> use "Reply All" to discuss whether it should be verified or
> rejected. When a decision is reached, the verifying party (IESG)
> can log in to change the status and edit the report, if necessary.
>
> --------------------------------------
> RFC5322 (draft-resnick-2822upd-06)
> --------------------------------------
> Title               : Internet Message Format
> Publication Date    : October 2008
> Author(s)           : P. Resnick, Ed.
> Category            : DRAFT STANDARD
> Source              : IETF - NON WORKING GROUP
> Area                : N/A
> Stream              : IETF
> Verifying Party     : IESG
>    

-- 
Pete Resnick<http://www.qualcomm.com/~presnick/>
Qualcomm Technologies, Inc. - +1 (858)651-4478