james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin.Bergljung" <Martin.Berglj...@opsera.com>
Subject IMAP FETCH BODYSTRUCTURE problem
Date Sun, 17 May 2009 15:18:17 GMT
Hi,

 

I started to test the new IMAP Protocol with Lotus Notes 

(wants MIME parsing on the server side compared to Outlook and
Thunderbird 

that downloads the complete MIME and does it on the client side)

and got into some problems with FETCH BODYSTRUCTURE. 

 

If I for example have a plain text message and execute a command like
"A9 FETCH 3 (RFC822.HEADER BODYSTRUCTURE)" then 

the bodystructure response looks something like this:

 

* 1 FETCH (BODYSTRUCTURE ("TEXT" "PLAIN" ("charset" "utf-8") NIL NIL
"7BIT" 1257 37 NIL NIL ("en-us") NIL) RFC822.HEADER {868} 

...

 

This does not work with Lotus Notes, it things this response is
incorrect.

The old IMAP implementation that I am using will respond as follows:

 

* 1 FETCH (BODYSTRUCTURE ("TEXT" "PLAIN" ("charset" "utf-8") NIL NIL
"7BIT" 1257 1) RFC822.HEADER {868} 

...

 

And Lotus Notes is fine with this response. 

Looks like there is some extra stuff in the response for the new
implementation: ... NIL NIL ("en-us") NIL ...

 

Note. It returns 1 for the number of lines in message but it works
anyway.

 

If I am using a multipart email with an attachment the response from the
new IMAP implementation would be something like:

 

* 2 FETCH (BODYSTRUCTURE 

(

( ("TEXT" "PLAIN" ("charset" "us-ascii") NIL NIL "7BIT" 1120 30 NIL NIL
NIL NIL)

                                   ("TEXT" "HTML" ("charset" "us-ascii")
NIL NIL "QUOTED-PRINTABLE" 3874 124 NIL NIL NIL NIL) 

        "ALTERNATIVE"  ("boundary"
"----=_NextPart_001_0009_01C9D707.766D0950") NIL NIL NIL)

("APPLICATION" "MSWORD" ("name" "XXXXXX Functional Specification.doc")
NIL NIL "BASE64" 737068 NIL 

("attachment" ("filename" "XXXXXX Functional Specification.doc")) NIL
NIL) 

   "MIXED" ("boundary" "----=_NextPart_000_0008_01C9D707.766D0950") NIL
("en-us") NIL) RFC822.HEADER {636}

 

And from the old implementation:

 

* 2 FETCH (BODYSTRUCTURE 

(

(("TEXT" "PLAIN" ("charset" "us-ascii") NIL NIL "7BIT" 1120 1)

  ("TEXT" "HTML" ("charset" "us-ascii") NIL NIL "QUOTED-PRINTABLE" 3874
1) 

      "ALTERNATIVE" ("boundary"
"----=_NextPart_001_0011_01C9D707.87F7B2B0") NIL NIL)

("APPLICATION" "MSWORD" ("name" "XXXXXX Functional Specification.doc")
NIL NIL "BASE64" 737068 NIL 

("attachment" ("filename" "XXXXXX Functional Specification.doc")) NIL) 

                                   "MIXED" ("boundary"
"----=_NextPart_000_0010_01C9D707.87F7B2B0") NIL NIL) RFC822.HEADER
{636}

 

Looks like there is some extra stuff here too in the response for the
new implementation: ... NIL NIL NIL NIL... etc

 

 

Don't know which implementation is correct but the old one seems to
work...

 

Cheers,

Martin Bergljung


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message