Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-4352

IMAP provider: accessing parts of a multipart/mixed message causes invalid command

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • mail
    • Security Level: public (Regular issues)
    • None

    Description

      When accessing the content of the second part of a multipart/mixed message (see attachment), the following IMAP command is sent:

      FETCH 1 (BODY.PEEK[2.TEXT])

      This results in an error (FETCH failed). IMAP server is GreenMail: http://www.icegreen.com/greenmail/

      RFC3501 says about the TEXT part specifier:

      The HEADER, HEADER.FIELDS, HEADER.FIELDS.NOT, and TEXT part
      specifiers can be the sole part specifier or can be prefixed by
      one or more numeric part specifiers, provided that the numeric
      part specifier refers to a part of type MESSAGE/RFC822. The
      MIME part specifier MUST be prefixed by one or more numeric
      part specifiers.

      Since the second part is not message/rfc822, the command issued is incorrect. I believe that the correct command in this case should be:

      FETCH 1 (BODY.PEEK[2])

      Attachments

        1. 03-javamail.log
          0.9 kB
          Andreas Veithen
        2. GERONIMO-4352.diff
          2 kB
          Richard McGuire
        3. GERONIMO-4352-test.patch.txt
          5 kB
          Andreas Veithen

        Issue Links

          Activity

            People

              gawor@mcs.anl.gov Jarek Gawor
              veithen Andreas Veithen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: