Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-10825

POP/IMAP service: JIRA loses HTML part of some (multipart/related) emails

      If JIRA is configured to create/comment issues from email, and encounters a mixed HTML/image email with a MIME part:

      Content-Type: multipart/related;
          type="text/html"
      

      Then JIRA will fail to parse the HTML part of the email, and logs this:

      2006-08-10 14:43:50,452 WARN [jira.issue.managers.DefaultAttachmentManager] Creating attachment without a file. Aborting

      Here are the headers from an email:

      X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0^M
      MIME-Version: 1.0^M
      Content-Type: multipart/related;^M
              type="text/html";^M
              boundary="----_=_NextPart_001_01C6BB93.375A48EB"^M
      .....
      
      This is a multi-part message in MIME format.^M
      ^M
      ------_=_NextPart_001_01C6BB93.375A48EB^M
      Content-Type: text/html;^M
              charset="iso-8859-1"^M
      Content-Transfer-Encoding: quoted-printable^M
      ^M
      <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =^M
      ....
      

            [JRASERVER-10825] POP/IMAP service: JIRA loses HTML part of some (multipart/related) emails

            After investigating this issue further, I have identified several distinct issues that have over time stemmed from the original issue - the original issue being: the loss of one or more parts of an email message (content or attachments) when trying to create JIRA issues from emails. The original issue has been resolved in part by Jeff, but under certain situations, JIRA logs may still report the following warning:

            WARN [jira.issue.managers.DefaultAttachmentManager] Cannot create attachment without a filename - inline content? See http://jira.atlassian.com/browse/JRA-10825 (file=tempattach51383dat).

            It should be known that this is largely benign - it simply means that while processing the email message, some parts of it were flagged as being required to be attached to the JIRA issue, but no filename for the attachment could be determined. The most common scenario of this happening is when you have an email message in both plain and rich text format; JIRA attempts attach the rich text part, but it does not have a filename, and so this fails. In this case, the effect is minimal, as the meaning of the message is usually conveyed through the plain text part anyway.

            If however, you are finding that JIRA is still losing important parts of your messages, as what appeared to be the case for Bruno, please feel free to raise a support case at http://support.atlassian.com, providing examples of email messages that will reproduce the issue.

            The following are the known and reproducible issues that stemmed from this issue that are still open:

            • JRA-12525 - Emails containing attachments with non-ASCII names lost
            • JRA-10827 - Capture (HTML) emails in their original format
            • JRA-12534 - JIRA fails to add attachments with long filenames from RFC 2231-compliant mail clients

            The following have been resolved:

            • JRA-12530 - Renamed email attachments lose extension
            • JRA-15133 - "message" type attachments get lost when creating issues from emails

            Cheers,
            Michael Tokar [Atlassian]

            Michael Tokar added a comment - After investigating this issue further, I have identified several distinct issues that have over time stemmed from the original issue - the original issue being: the loss of one or more parts of an email message (content or attachments) when trying to create JIRA issues from emails. The original issue has been resolved in part by Jeff, but under certain situations, JIRA logs may still report the following warning: WARN [jira.issue.managers.DefaultAttachmentManager] Cannot create attachment without a filename - inline content? See http://jira.atlassian.com/browse/JRA-10825 (file=tempattach51383dat). It should be known that this is largely benign - it simply means that while processing the email message, some parts of it were flagged as being required to be attached to the JIRA issue, but no filename for the attachment could be determined. The most common scenario of this happening is when you have an email message in both plain and rich text format; JIRA attempts attach the rich text part, but it does not have a filename, and so this fails. In this case, the effect is minimal, as the meaning of the message is usually conveyed through the plain text part anyway. If however, you are finding that JIRA is still losing important parts of your messages, as what appeared to be the case for Bruno , please feel free to raise a support case at http://support.atlassian.com , providing examples of email messages that will reproduce the issue. The following are the known and reproducible issues that stemmed from this issue that are still open: JRA-12525 - Emails containing attachments with non-ASCII names lost JRA-10827 - Capture (HTML) emails in their original format JRA-12534 - JIRA fails to add attachments with long filenames from RFC 2231-compliant mail clients The following have been resolved: JRA-12530 - Renamed email attachments lose extension JRA-15133 - "message" type attachments get lost when creating issues from emails Cheers, Michael Tokar [Atlassian]

            This issue has a long history, and over time, several issues have been discussed which could be separated out into distinct problems. It also makes it hard to identify what specific problem each of you is having when you do not reference a relevant comment. For this reason, I have split one of the previously discussed issues into a new issue.

            If you are suffering from the problem Andreas describes in this comment, could you please now follow this cloned issue instead: JRA-15133. For clarity, the problem I am referring to is the matter of attaching .eml or .msg files as attachments, which do not get attached to created issues by JIRA.

            Investigations into a fix for JRA-15133 have begun, so please make sure you watch that issue for any updates.

            Thanks for your patience!

            Regards,
            Michael Tokar [Atlassian]

            Michael Tokar added a comment - This issue has a long history, and over time, several issues have been discussed which could be separated out into distinct problems. It also makes it hard to identify what specific problem each of you is having when you do not reference a relevant comment. For this reason, I have split one of the previously discussed issues into a new issue. If you are suffering from the problem Andreas describes in this comment , could you please now follow this cloned issue instead: JRA-15133 . For clarity, the problem I am referring to is the matter of attaching .eml or .msg files as attachments, which do not get attached to created issues by JIRA. Investigations into a fix for JRA-15133 have begun, so please make sure you watch that issue for any updates. Thanks for your patience! Regards, Michael Tokar [Atlassian]

            I have just encountered this and it is going to kill me dead-in-the-water. Being able to process emails is key to our system. What is happening here.

            http://jira.atlassian.com/browse/JRA-10825

            Jordan Dea-Mattson added a comment - I have just encountered this and it is going to kill me dead-in-the-water. Being able to process emails is key to our system. What is happening here. http://jira.atlassian.com/browse/JRA-10825

            Just found this today. A little annoying as people cannot be guaranteed to have their email format settings consistent. Any progress with this in Jira 4?

            Andy Brook (Javahollic Software) added a comment - Just found this today. A little annoying as people cannot be guaranteed to have their email format settings consistent. Any progress with this in Jira 4?

            Hello guys,

            I am also experiencing the problem. We often get mails forwarded from our customers - as attachements. Is there a suitable workaround for that problem like maybe forwarding all mails with email-attachements to a generic address or something?

            Best regards,
            Andy

            Andreas Hermann added a comment - Hello guys, I am also experiencing the problem. We often get mails forwarded from our customers - as attachements. Is there a suitable workaround for that problem like maybe forwarding all mails with email-attachements to a generic address or something? Best regards, Andy

            Matt Read added a comment -

            Is there a work-around for this issue? I cleared about 75,000 copies of the broken attachment this morning. Luckily it's only 23kb in sze.

            Matt Read added a comment - Is there a work-around for this issue? I cleared about 75,000 copies of the broken attachment this morning. Luckily it's only 23kb in sze.

            Example of the emtpy tickets

            Bruno Mattarollo added a comment - Example of the emtpy tickets

            Bruno Mattarollo added a comment - - edited

            We are using 3.9.1 Enterprise and are having the same issues as described above.

            Steps I have taken (from JRA-12525):

            • updated to JavaMail 1.4 and enabled -Dmail.mime.decodeparameters=true on startup
            • sending emails from Mail.app in rich text or plain text

            Our scenario is that emails go first through mailman and then reach Jira (the IMAP account that Jira checks is subscribed to some of those lists).

            Our tickets get to Jira but the body of the email is empty, just has the default Mailman signature that's added at the bottom of the emails (I've added a screenshot).

            Looking at the logs, I see (with the logs enabled, note, I've edited it a bit for presentation, just inserted carriage returns)

            A27 FETCH 2 (BODYSTRUCTURE)
            * 2 FETCH (BODYSTRUCTURE ((("text" "plain" ("charset" "ISO-8859-1" "format" "flowed")
                    NIL NIL "quoted-printable" 235 15 NIL NIL NIL)
                    ("application" "pgp-signature" ("x-mac-type" "70674453" "name" "PGP.sig") 
                    NIL "This is a digitally signed message part" "7bit" 169 NIL ("inline" ("filename" "PGP.sig")) NIL) 
                    "signed" ("protocol" "application/pgp-signature" "micalg" "pgp-sha1" "boundary" 
                     "Apple-Mail-4-120089029") NIL NIL)("text" "plain" ("charset" "us-ascii") NIL NIL 
                     "7bit" 141 4 NIL ("inline" NIL) NIL) "mixed" ("boundary" "===============0103440808==") NIL NIL))
            A27 OK Fetch completed.
            A28 FETCH 2 (BODY[2]<0.141>)
            * 2 FETCH (FLAGS (\Seen \Recent) BODY[2]<0> {141}
            _______________________________________________
            Finance mailing list
            Finance@rsp.com.au
            http://lists.rsp.com.au/mailman/listinfo/finance
            )
            A28 OK Fetch completed.
            A29 FETCH 2 (BODY[2]<0.141>)
            * 2 FETCH (BODY[2]<0> {141}
            _______________________________________________
            Finance mailing list
            Finance@rsp.com.au
            http://lists.rsp.com.au/mailman/listinfo/finance
            )
            A29 OK Fetch completed.
            A30 FETCH 2 (BODY[1.1]<0.235>)
            * 2 FETCH (BODY[1.1]<0> {235}
            Sorry
            
            thanks you
            
            ?B
            
            =E9
            
            --=20
            bruno mattarollo
            chief technology officer | bruno.mattarollo@rsp.com.au
            rising sun pictures - http://www.rsp.com.au/
            
            gpg fingerprint: 65A6 C94A 1978 9B42 6ED2 FBCE 1BD2 756B 3A80 D8FC
            
            )
            A30 OK Fetch completed.
            A31 FETCH 2 (BODY[1.2]<0.169>)
            * 2 FETCH (BODY[1.2]<0> {169}
            -----BEGIN PGP SIGNATURE-----
            
            iEYEARECAAYFAkbc4TAACgkQG9J1azqA2PwIQgCgq4/cZNqS5UgQfmJqYlofwkW+
            agIAn1GIkQlomuwEGXt9CuLIWlgKn965
            =AfAt
            -----END PGP SIGNATURE-----
            )
            A31 OK Fetch completed.
            2007-09-04 14:39:09,883 JiraQuartzScheduler_Worker-1 WARN [jira.issue.managers.DefaultAttachmentManager] 
               Cannot create attachment without a filename - inline content? See http://jira.atlassian.com/browse/JRA-10825 
            (file=tempattach51383dat).
            

            I am a bit at a loss on what to do here ... emails from Mailman are not, AFAIK, illegal in their format ...

            Bruno Mattarollo added a comment - - edited We are using 3.9.1 Enterprise and are having the same issues as described above. Steps I have taken (from JRA-12525 ): updated to JavaMail 1.4 and enabled -Dmail.mime.decodeparameters=true on startup sending emails from Mail.app in rich text or plain text Our scenario is that emails go first through mailman and then reach Jira (the IMAP account that Jira checks is subscribed to some of those lists). Our tickets get to Jira but the body of the email is empty, just has the default Mailman signature that's added at the bottom of the emails (I've added a screenshot). Looking at the logs, I see (with the logs enabled, note, I've edited it a bit for presentation, just inserted carriage returns ) A27 FETCH 2 (BODYSTRUCTURE) * 2 FETCH (BODYSTRUCTURE ((("text" "plain" ("charset" "ISO-8859-1" "format" "flowed") NIL NIL "quoted-printable" 235 15 NIL NIL NIL) ("application" "pgp-signature" ("x-mac-type" "70674453" "name" "PGP.sig") NIL "This is a digitally signed message part" "7bit" 169 NIL ("inline" ("filename" "PGP.sig")) NIL) "signed" ("protocol" "application/pgp-signature" "micalg" "pgp-sha1" "boundary" "Apple-Mail-4-120089029") NIL NIL)("text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 141 4 NIL ("inline" NIL) NIL) "mixed" ("boundary" "===============0103440808==") NIL NIL)) A27 OK Fetch completed. A28 FETCH 2 (BODY[2]<0.141>) * 2 FETCH (FLAGS (\Seen \Recent) BODY[2]<0> {141} _______________________________________________ Finance mailing list Finance@rsp.com.au http://lists.rsp.com.au/mailman/listinfo/finance ) A28 OK Fetch completed. A29 FETCH 2 (BODY[2]<0.141>) * 2 FETCH (BODY[2]<0> {141} _______________________________________________ Finance mailing list Finance@rsp.com.au http://lists.rsp.com.au/mailman/listinfo/finance ) A29 OK Fetch completed. A30 FETCH 2 (BODY[1.1]<0.235>) * 2 FETCH (BODY[1.1]<0> {235} Sorry thanks you ?B =E9 --=20 bruno mattarollo chief technology officer | bruno.mattarollo@rsp.com.au rising sun pictures - http://www.rsp.com.au/ gpg fingerprint: 65A6 C94A 1978 9B42 6ED2 FBCE 1BD2 756B 3A80 D8FC ) A30 OK Fetch completed. A31 FETCH 2 (BODY[1.2]<0.169>) * 2 FETCH (BODY[1.2]<0> {169} -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkbc4TAACgkQG9J1azqA2PwIQgCgq4/cZNqS5UgQfmJqYlofwkW+ agIAn1GIkQlomuwEGXt9CuLIWlgKn965 =AfAt -----END PGP SIGNATURE----- ) A31 OK Fetch completed. 2007-09-04 14:39:09,883 JiraQuartzScheduler_Worker-1 WARN [jira.issue.managers.DefaultAttachmentManager] Cannot create attachment without a filename - inline content? See http://jira.atlassian.com/browse/JRA-10825 (file=tempattach51383dat). I am a bit at a loss on what to do here ... emails from Mailman are not, AFAIK, illegal in their format ...

            Using 3.9.1 Enterprise.
            I also get this message:

            2007-06-22 13:08:37,275 JiraQuartzScheduler_Worker-0 WARN [jira.issue.managers.DefaultAttachmentManager] Cannot create attachment without a filename - inline content? See http://jira.atlassian.com/browse/JRA-10825 (file=tempattach10344dat). 

            for email without attachments.

            Furore Jira Admin added a comment - Using 3.9.1 Enterprise. I also get this message: 2007-06-22 13:08:37,275 JiraQuartzScheduler_Worker-0 WARN [jira.issue.managers.DefaultAttachmentManager] Cannot create attachment without a filename - inline content? See http://jira.atlassian.com/browse/JRA-10825 (file=tempattach10344dat). for email without attachments.

            We want to attack the email bugs as a cluster so this will be scheduled once we can dedicate the resources to get the email bugs we have out of the way.

            Dylan Etkin [Atlassian] added a comment - We want to attack the email bugs as a cluster so this will be scheduled once we can dedicate the resources to get the email bugs we have out of the way.

              Unassigned Unassigned
              7ee5c68a815f Jeff Turner
              Affected customers:
              15 This affects my team
              Watchers:
              30 Start watching this issue

                Created:
                Updated:
                Resolved: