Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Newbie Question

10 views
Skip to first unread message

Glenn Tesla

unread,
Dec 23, 2009, 7:37:37 AM12/23/09
to
Hello,
I am trying to build an IMAP server. Currently teething a little bit in
understanding the RFC. My major problem is trying to understand things
like "body-fld-param", "body-fld-dsp", for instance.

What is "body-fld-dsp"? dsp = disposition?
what is "body-fld-param"? What parameters in this context?

So, is there any other source/literature that can help me to understand
the grammar?

thanks
Glenn

Mark Crispin

unread,
Dec 23, 2009, 12:32:25 PM12/23/09
to
On Wed, 23 Dec 2009, Glenn Tesla posted:

> What is "body-fld-dsp"? dsp = disposition?
> what is "body-fld-param"? What parameters in this context?

Refer to pages 75-77 of RFC 3501.

To understand RFC 3501, you must use both the textual description and the
formal syntax. At least you aren't making the mistake of disregarding the
formal syntax and programming from the examples; too (including Microsoft)
many have done that and inflicted broken implementations on the world.

> So, is there any other source/literature that can help me to understand
> the grammar?

Kevin Johnson's "Internet Email Protocols: A Developer's Guide", is a good
pedagogical text, but you may already be beyond that if you're into the
nitty-gritty of the formal syntax.

-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.

Glenn Tesla

unread,
Dec 23, 2009, 5:55:58 PM12/23/09
to

Thank you mark, I will check Kevin Johnson's.
The issue I currently have is not about understanding the grammar rather
the semantic of some of the tokens in the grammar.

For instance, what is body field parameter? How does it appear in the
real life? In my investigation, I did a fetch (bodystructure) command to
Dovecot on an "mixed" email where the second part contains a jpg image.
Dovecot returns me with "NIL NIL NIL NIL" for the body-parameter,
body-disposition, body-language and body-location. Then I started to
scratch my head.

Sam

unread,
Dec 23, 2009, 6:28:28 PM12/23/09
to
Glenn Tesla writes:

> Thank you mark, I will check Kevin Johnson's.
> The issue I currently have is not about understanding the grammar rather
> the semantic of some of the tokens in the grammar.
>
> For instance, what is body field parameter? How does it appear in the
> real life? In my investigation, I did a fetch (bodystructure) command to
> Dovecot on an "mixed" email where the second part contains a jpg image.
> Dovecot returns me with "NIL NIL NIL NIL" for the body-parameter,
> body-disposition, body-language and body-location. Then I started to
> scratch my head.

You are missing some key information.

Before you start deciphering IMAP, you need to understand MIME, first. "body
field" parameter, and other entities, are direct references to MIME
nomenclature.

Read RFC 2045 through RFC 2049, and acquire a thorough understanding of how
MIME-formatted messages are structured. Once you have a solid understanding
of MIME, this will become all crystal clear.


Mark Crispin

unread,
Dec 23, 2009, 6:28:38 PM12/23/09
to
On Thu, 24 Dec 2009, Glenn Tesla posted:
> Mark Crispin wrote:
>>> What is "body-fld-dsp"? dsp = disposition?
>>> what is "body-fld-param"? What parameters in this context?
>> Refer to pages 75-77 of RFC 3501.

Note that I said this.

> For instance, what is body field parameter?

It is a field, within the body, called "parameter". There is no such
thing as a "body field parameter", except as a hierarchical naming in the
syntax (body part -> fields -> parameter). If you look at the body-fields
rule, you'll see that they're all body-fld-<mumble>.

On both page 75 (for multipart) and page 76 (for non-multipart) you will
find, at the appropriate place in the order of the body fields, the
following:

body parameter parenthesized list
A parenthesized list of attribute/value pairs [e.g., ("foo"
"bar" "baz" "rag") where "bar" is the value of "foo" and
"rag" is the value of "baz"] as defined in [MIME-IMB].

Thus, this is a list of something called "attribute/value pairs", and the
definition of these is to be found in the document referred to a
[MIME-IMB].

> How does it appear in the real
> life? In my investigation, I did a fetch (bodystructure) command to Dovecot
> on an "mixed" email where the second part contains a jpg image.
> Dovecot returns me with "NIL NIL NIL NIL" for the body-parameter,
> body-disposition, body-language and body-location.

That simply means that for that particular body part in that particular
message, there isn't a parameter, disposition, language, or location.
That isn't particularly surprising with an IMAGE/JPEG attachment.

If you looked at a TEXT/PLAIN part, there is probably (at a minimum) a
parameter with value CHARSET.

0 new messages