Incoming Email Handler converts .msg attachments to .eml with no extension.

Walter Stabosz July 21, 2013

I have set up inbound email handlers to create issues forwarded to a mailbox.

We like to have to original client email attached to the ticket, so we "Forward as Attachement" in Outlook. This generates a .msg file from the original email that we are forwarding, and attaches it to a new email.

When the new email arrives in our jira inbox, the attachment is a binary .msg file. (Filename: "subject xyz.msg")

When JIRA processes the message, the file attached to the new Issue is a text .eml file, but the .eml extension is missing from the filename (Filename: "subject xyz"). I can tell it's an .eml by downloading it and opening it in a text editor.

As a result, if we want to view the original email, we have to download the file, then rename it to a .eml, and then open it with Outlook.

Does anyone know how we can fix this? I'd either like for the attachments to be the original .msg, or the .eml is ok as long as the filename is correct.

4 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Nicholas Tan June 29, 2014

Thanks Walter. I'm using JIRA OnDemand so I'll have to raise the issue with Atlassian. I'm surprised that not many users have raised this issue. I found Carsten's (one of the responders to this thread) bug report and I've promoted it.

Not sure if Atlassian will fix it any time soon seeing that Carsten has raised the issue way back in 2013 and it hasn't been progressed at all.

Regards,

Nicholas

0 votes
Walter Stabosz August 9, 2013

This is the "work around" that I've come up with. Basically, I go into the JIRA database and rename the files to add the extension. It's probably not wise to muck about too much in the database, but I feel this is a safe-enough hack. It of course has to be performed periodically, unless you put in a trigger (I wouldn't).

UPDATE dbo.fileattachment
  SET [FILENAME] = [FILENAME] + '.eml'
  WHERE MIMETYPE = 'message/rfc822'
  AND [FILENAME] NOT LIKE '%.eml'

0 votes
Carsten Beck-Astrup August 6, 2013

Our users also complain about this issue since they have the same need for full trace of the message and also attachments inside the first email. All other filetypes gets their extension set correctly so some kind of bug inside the messagehandler it seems. An answer from Atlassian is most welcome. btw we use the Regex Comment Handler supplied by Atlassian.

I have created the following bug at Atlassian: https://jira.atlassian.com/i#browse/JRA-34220

0 votes
Andrew Culver
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 23, 2013

Walter,

Instead of forwarding as attachment to the Jira email handler address, could you try doing "Edit as new" on the message, then send it to the handler? This allows you to send the message as if you were composing it as a new message. This is a process change for your users, but will get the subject and body of the message directly in the Jira summary/description.

Andrew

Walter Stabosz July 23, 2013

Hi Andrew,

Thanks for the suggestion, however, we want to preserve the email as close to the original as possible. JIRA will strip out any formatting that may be in the email. Plus, we like to keep the JIRA descriptions technical and turse. We attach the user emails to the issues to provide context, but the users are not technical at all.

Walter,

Nicholas Tan June 26, 2014

Hi Walter,

I'm having an identical issue. JIRA deletes the file extension everytime my users forward emails as attachment from Outlook (i.e. Outlook attaches the email as a *.msg file). So if the email to JIRA contained an attachment "TITLE.msg", it will appear in the Issues attachment as "TITLE" with no file extension.

Have you managed to sort out the issue yet? I've been looking at the solution that you recommended but I have no idea how to hack the database..

With Thanks,

Nicholas

Walter Stabosz June 26, 2014

Hi Nicholas,

Sorry, I have not found a solution for this issue. If you have the hosted JIRA OnDemand, you won't be able to modify the database. If you have an installed JIRA instance, you just have to run the database query that I mentioned. But, it sounds like you're not familiar with connecting to a database server. I would suggest you ask your local DBA to run the query on your behalf.

Thanks,

Walter

Ajo Paul September 6, 2016

Checking again, any update or workaround for this issue? Apart from renaming ?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question