MBOX-Line: From ayluen at i-freelancer.net  Tue Jun 11 02:50:56 2013
To: imap-protocol@u.washington.edu
From: =?big5?B?p/Wm463b?= <ayluen@i-freelancer.net>
Date: Fri Jun  8 12:34:51 2018
Subject: [Imap-protocol] Question on BODYSTRUCTURE
Message-ID: <004101ce6689$2b6b0630$82411290$@i-freelancer.net>


I'm working on parsing email to construct BODYSTRUCTURE response back to
client.

I put together a simple email with some text, image and an attachment on
gmail, so I can have a guideline by comparing its response back to RFC.
Here's the response :

 

* 35 FETCH (BODYSTRUCTURE (((("TEXT" "PLAIN" ("CHARSET" "big5") NIL NIL
"7BIT" 860 14 NIL NIL NIL)("TEXT" "HTML" ("CHARSET" "big5") NIL NIL
"QUOTED-PRINTABLE" 4347 63 NIL NIL NIL) "ALTERNATIVE" ("BOUNDARY"
"----=_NextPart_002_0025_01CE5E06.E9940610") NIL NIL)("IMAGE" "PNG" ("NAME"
"image001.png") "<image001.png@01CE5E06.E9517ED0>" NIL "BASE64" 231788 NIL
NIL NIL) "RELATED" ("BOUNDARY" "----=_NextPart_001_0024_01CE5E06.E9940610")
NIL NIL)("IMAGE" "PNG" ("NAME" "DNS_MX_RECORD.png") NIL NIL "BASE64" 73572
NIL ("ATTACHMENT" ("FILENAME" "DNS_MX_RECORD.png")) NIL) "MIXED" ("BOUNDARY"
"----=_NextPart

_000_0023_01CE5E06.E9940610") NIL NIL))

 

However, when I tried to match up the fields with RFC, it seemed to be
missing an extension data item or am I misinterpreting the RFC?

For the non-multipart body part, I thought the format should be :

 

body-type body-subtype (parenthesized list of parameter) body-id body-desc
body-encoding body-size

 

if body-type = "text" then follow by <number of lines in body>

if body-type = "message" and body-subtype = "rfc822" then follow by
envelope, body structure, number of lines in message

 

lastly, follow by 4 extension data items : MD5, body disposition, body
language, body location

 

so, shouldn?t the first part look like this instead?

 

("TEXT" "PLAIN" ("CHARSET" "big5") NIL NIL "7BIT" 860 14 NIL NIL NIL NIL)
<--- I added body location data item

 

Also, I couldn't figure out what are the remaining fields for the multipart.
In my example above, what do the last 2 NIL represent after "MIXED"
("BOUNDARY" "----=_NextPart

_000_0023_01CE5E06.E9940610")?  I thought for multipart, it also follows by
4 extension data?

 

 

Thank you for your help~~

 

Helen

 


======================================
Powered by Rainbow Mail Server 6.0

?????????????????????????????????????????????????????????????????????????????????????
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. Please consider the environment before printing this email.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20130611/2ed1d2fc/attachment.html>
