Re: [Imap-protocol] IMAP part numbering corner case
Philip Guenther <[email protected]>
| Newsgroups | gmane.mail.imap.general |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 17 Aug 2012, Timo Sirainen wrote:
> On 17.8.2012, at 8.16, Philip Guenther wrote:
> > On Fri, 17 Aug 2012, Timo Sirainen wrote:
> > ...
> >> Anyway, [1.MIME] isn't a valid request in Joshua's test mail.
> >
> > Chapter and verse, please?
> >
> > (There are specific restrictions on when HEADER and TEXT are valid,
> > but no such restrictions are specified for the MIME part specifier...)
>
> Well, I'm not sure if it's really a BAD-type of invalid, but [x.MIME]
> refers to the part's MIME headers, and if the parent isn't a multipart,
> there are no MIME headers, so the proper result is empty.
Well, RFC 3501 says:
The MIME part specifier refers to the [MIME-IMB] header for
this part.
[MIME-IMB] is a reference to RFC 2045. That RFC doesn't define "header"
itself, but does describe headers on not just body parts but entities:
2.4. Entity
...
<...> Any sort of field may be present in the header of an entity,
but only those fields whose names begin with "content-" actually have
any MIME-related meaning. Note that this does NOT imply thay they
have no meaning at all -- an entity that is also a message has non-
MIME header fields whose meanings are defined by RFC 822.
That implies to me that "header" doesn't necessarily mean "header on body
part".
Also, RFC 3501 refers to [MIME-IMB] header fields in the description of
the BODYSTRUCTURE fetch item, wherein message/rfc822 parts do have their
header parsed to fill in the various fields.
So, I would argue that RFC 3501 does specify that .MIME work on all parts
and, in the particular case of message/rfc822 part, is equivalent to
asking for HEADER one level higher.
Philip Guenther
(In case that last "one level higher" doesn't make sense, here's a longer
example:
------------------------------------------------------
Date: Fri, 01 Jan 2010 12:00 -0500
To: [email protected]
From: [email protected]
Subject: download on demand problem
MIME-Version: 1.0
Content-Type: message/rfc822
Date: Fri, 01 Jan 2012 12:00 -0500
To: [email protected]
From: [email protected]
Subject: Blast from the future
MIME-Version:1.0
Content-Type: multipart/mixed; boundary=foo
--foo
Do you know what to do when you see this message?
--foo
Content-Type: text/html
<HTML><BODY>Blah blah blah</BODY></HTML>
--foo
Content-Type: multipart/digest; boundary=bar
--bar
Subject: blah
Foo: bar
sdlfkj
sdlfkj
sdlfkj
--bar--
--foo--
------------------------------------------------------
In that, [1.3.1] is the digest message, starting at the "Subject: blah"
line and continuing through the three "sdlfkj" lines. [1.3.1.1] is just
the three "sdlfkj" lines. [1.3.1.1.MIME] is the same as [1.3.1.HEADER],
which is the header of the digest message, being "Subject: blah", "Foo:
bar", and the blank line after.)
_______________________________________________
Imap-protocol mailing list
[email protected]
http://mailman2.u.washington.edu/mailman/listinfo/imap-protocol