ietf-822
[Top] [All Lists]

Re: Possible error in RFC 2822

2003-03-18 23:28:52

Christopher Yorke wrote:
I have a question about a couple of the productions in section 4.4 of RFC
2822 entitled "Obsolete Addressing." Based on my reading of RFC (2)822,
every message is required to have a "From:" address.
[...]
The confusion on my
part arises when I consult the obs-mbox-list production:

obs-mbox-list = 1*([mailbox] [CFWS] "," [CFWS]) [mailbox]

Again, if my reading of RFC 2234 is correct, this means that obs-mbox-list
must consist of at least one comma, but that's it. It doesn't seem to
require any addresses at all.

The obs- syntax in 2822 is intended to allow parsing of old messages,
while the regular (non-obs-) syntax is for generation of new messages.
If you go back to RFC 724, you'll see that a From header field body
could in fact be completely empty:

         <any-from-field>  ::=   "From"        ":" <address-list>
...
         <address-list>    ::=   <null>
                               | <address-item>
                               | <address-item> "," <address-list>

In order to be able to handle old messages, a parser should be able
to handle lists with empty elements.  The degenerate case, as you
point out, has no mailboxes at all.  A robust parser would not fail
even on an empty field body, such as was legal under RFC 724 (i.e. not
even a comma).

Of course, generating an RFC 2822-compliant From header field requires
at least one mailbox, and no null list elements (including at the
start or end of the list).


<Prev in Thread] Current Thread [Next in Thread>