Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-15400

Email messages fail to be processed when attached messages with long subjects are present

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 10.0.0, 5.12.12
    • 5.10.2, 5.13.1, 5.12.10
    • Email - Incoming
    • None

      Issue Summary

      Under very specific circumstances, attached mail messages can cause the email to fail being processed.

      • Jira needs to be run in Windows;
      • JSM 5.10 or later;
      • The message needs to be sent using a mail client that gets the attached message in this format below. The "Content-Type" is "message/rfc822", there is no filename specified and the subject is long enough to have a line break (generally over 70 characters)
        --_004_SCYPR80MB6872B547C6348842D486780AC6CF2SCYPR80MB6872lamp_
        Content-Type: message/rfc822
        Content-Disposition: attachment;
        	creation-date="Wed, 19 Jun 2024 23:40:58 GMT";
        	modification-date="Wed, 19 Jun 2024 23:41:25 GMT"
        
        (trimmed)
        Subject: Text with a very long subject I don't care about the text, just want
         a very long subject to test
        

      Steps to Reproduce

      1. Install JSM 5.10.2 in Windows (we tested with SQL Server DB)
      2. Configure the email channel in a JSM project (we tested with Microsoft outlook.com email, but it also happens at least with Office365 as well)
      3. Use the Outlook web client
      4. Send any message with a long subject to yourself. In our example, we used
        Text with a very long subject I don't care about the text, just want a very long subject to test
        
      5. Attach this message to another one and send it to the mailbox configured in the Email requests setting

      Expected Results

      The message gets processed successfully. In the worst case, the attachment should not be added, but the message is processed and creates an issue or adds a comment.

      Actual Results

      The below exception is thrown in the atlassian-jira.log file and the message is not processed:

      2024-06-20 21:10:36,764+0000 Caesium-2-1 WARN agandelman     [c.a.j.issue.managers.DefaultAttachmentManager] Got exception while saving attachment in attachment store. Exception: Illegal char <
          > at index 74: 10000_Text_with_a_very_long_subject_I_don_t_care_about_the_text,_just_want
          _a_very_long_subject_to_test.eml
      2024-06-20 21:10:36,775+0000 Caesium-2-1 WARN agandelman     [c.a.j.issue.fields.AttachmentSystemField] There were errors while converting temporary attachments: AttachmentError{logMessage='Got exception while saving attachment in attachment store. Exception: Illegal char <
          > at index 74: 10000_Text_with_a_very_long_subject_I_don_t_care_about_the_text,_just_want
          _a_very_long_subject_to_test.eml', localizedMessage='Could not save attachment to storage: Illegal char <
          > at index 74: 10000_Text_with_a_very_long_subject_I_don_t_care_about_the_text,_just_want
          _a_very_long_subject_to_test.eml', filename='Text_with_a_very_long_subject_I_don_t_care_about_the_text,_just_want
          _a_very_long_subject_to_test.eml', reason=SERVER_ERROR, exception=some(java.nio.file.InvalidPathException: Illegal char <
          > at index 74: 10000_Text_with_a_very_long_subject_I_don_t_care_about_the_text,_just_want
          _a_very_long_subject_to_test.eml)}
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

          Form Name

            [JSDSERVER-15400] Email messages fail to be processed when attached messages with long subjects are present

            There are no comments yet on this issue.

              jxu2@atlassian.com Sam Xu
              5fb7769fcbc7 Allan Gandelman
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: