Re: [yam] Syntax of MIME documents (RFC 822 or 5322?)
Ned Freed <ned.freed@mrochek.com> Sun, 10 January 2010 19:46 UTC
Return-Path: <ned.freed@mrochek.com>
X-Original-To: yam@core3.amsl.com
Delivered-To: yam@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 310743A68C7 for <yam@core3.amsl.com>; Sun, 10 Jan 2010 11:46:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.299
X-Spam-Level:
X-Spam-Status: No, score=-2.299 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, MIME_8BIT_HEADER=0.3]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zhKONzUFoP9X for <yam@core3.amsl.com>; Sun, 10 Jan 2010 11:46:04 -0800 (PST)
Received: from mauve.mrochek.com (mauve.mrochek.com [66.59.230.40]) by core3.amsl.com (Postfix) with ESMTP id 3C0673A6817 for <yam@ietf.org>; Sun, 10 Jan 2010 11:46:04 -0800 (PST)
Received: from dkim-sign.mauve.mrochek.com by mauve.mrochek.com (PMDF V6.1-1 #35243) id <01NIAKQ20W6O00AR8J@mauve.mrochek.com> for yam@ietf.org; Sun, 10 Jan 2010 11:45:56 -0800 (PST)
Received: from mauve.mrochek.com by mauve.mrochek.com (PMDF V6.1-1 #35243) id <01NI822VUMFK004042@mauve.mrochek.com>; Sun, 10 Jan 2010 11:45:54 -0800 (PST)
Message-id: <01NIAKQ0AP5Q004042@mauve.mrochek.com>
Date: Sun, 10 Jan 2010 11:37:05 -0800
From: Ned Freed <ned.freed@mrochek.com>
In-reply-to: "Your message dated Sun, 10 Jan 2010 15:59:09 +0100" <B7A4317EB74542058E6657F472CC5396@Iulius>
MIME-version: 1.0
Content-type: TEXT/PLAIN; charset="iso-8859-15"; Format="flowed"
References: <B7A4317EB74542058E6657F472CC5396@Iulius>
To: Julien ÉLIE <julien@trigofacile.com>
Cc: yam@ietf.org
Subject: Re: [yam] Syntax of MIME documents (RFC 822 or 5322?)
X-BeenThere: yam@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Yet Another Mail working group discussion list <yam.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/yam>, <mailto:yam-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/yam>
List-Post: <mailto:yam@ietf.org>
List-Help: <mailto:yam-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yam>, <mailto:yam-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 10 Jan 2010 19:46:05 -0000
> Hi, > Following a discussion on the USEFOR mailing-list: > http://www.imc.org/ietf-usefor/mail-archive/msg04765.html > http://www.imc.org/ietf-usefor/mail-archive/msg04766.html > we wonder why RFC 5322 mentions that the MIME document > series extends the syntax provided by RFC 5322 (Section 1.1): > This document specifies a syntax only for text messages. In > particular, it makes no provision for the transmission of images, > audio, or other sorts of structured data in electronic mail messages. > There are several extensions published, such as the MIME document > series ([RFC2045], [RFC2046], [RFC2049]), which describe mechanisms > for the transmission of such data through electronic mail, either by > extending the syntax provided here or by structuring such messages to > conform to this syntax. Those mechanisms are outside of the scope of > this specification. > For instance, RFC 2045, which is based upon RFC 822, defines > (Section 5.1): > parameter := attribute "=" value > attribute := token > ; Matching of attributes > ; is ALWAYS case-insensitive. > value := token / quoted-string > and RFC 822 has the following rule (Section 3.4.2): > Note: In structured field bodies, multiple linear space ASCII > characters (namely HTABs and SPACEs) are treated as > single spaces and may freely surround any symbol. In > all header fields, the only place in which at least one > LWSP-char is REQUIRED is at the beginning of continua- > tion lines in a folded field. > which is explicitly obsoleted by RFC 5322 (Section 4): > Though these syntactic > forms MUST NOT be generated according to the grammar in section 3, > they MUST be accepted and parsed by a conformant receiver. > One important difference between the obsolete (interpreting) and the > current (generating) syntax is that in structured header field bodies > (i.e., between the colon and the CRLF of any structured header > field), white space characters, including folding white space, and > comments could be freely inserted between any syntactic tokens. This > allowed many complex forms that have proven difficult for some > implementations to parse. > Does it mean that a message that conforms to the syntax of RFC 5322 > must not use a parameter like: > posting-host = "posting.example.com:192.0.2.1" > and must use: > posting-host="posting.example.com:192.0.2.1" > ? Of course it doesn't. RFCs 2045 and 2046 were written before DRUMS and RFCs 2821/2822/5321/5322 and therefore used the syntactic convensions of RFC 822, where LWSP is implicitly allowed between tokens. The fact that DRUMS opted to make the places where LWSP is allowed explicit rather than implicit doesn't change the syntax rules for 2045 and 2046 in any way. shape or form. I also note that had RFC 5322 had any effect on MIME syntax, the header of the document would show that it updates RFCs 2045 and 2046. The document header says no such thing. Ned P.S. When revised MIME specifications come out they will probably switch to the explicit LWSP approach since it seems that's the preferred way to do it now.