JIRA Incoming Email Handler does not create new issue, and replies with existing issue ID.

We found that sometimes incoming email did not actually get created as a new JIRA issue. Instead, JIRA (5.1.3) replies with an email stating that a new issue is created, but the issue id in the reply mail belongs to an existing issue.

In the latest case we saw, the issue id in the reply mail is of an issue created 30 days ago. So, effectively apart from the email, the new issue is lost from JIRA.

How does the email handler find project's latest issue id to create a new issue? What do we need to do to troubleshoot this?

7 answers

Hi Tosak, check this one - https://confluence.atlassian.com/display/JIRA/Creating+Issues+and+Comments+from+Email

check if you can create comment in specific issue with email body.

0 votes

Jira's standard incoming mail handlers look for an issue ID in the subject first. So if you send Jira an email with something like "About that Jira issue ABC-123", then (assuming ABC-123 is an issue) it will attach the mail as a comment.

If it cannot make that association, then it creates a new issue in the project you have configured the handler to put the issues into. The system uses the same code as a human typing a new issue in - it get's a new issue id allocated in the same way all the other "create issue" methods do.

But I thnk you mean you're just getting comments on issues.

Thanks Nic. I'm looking at mail handler creating new issue. I doubt that it gets the latest ID the same way Create issue function does.

Or if it does, then it wouldn't agree with the fact that the (supposedly 'new') issue ID (shown in the automatic reply when issue created) is in fact an ID that was used 30 days ago.

What I'm trying to understand is how could an old ID gets picked up by the mail handler. Is there any reference table that keeps the latest ID?

It gets a new number in exactly the same way create issue via the ui does.

I think the problem is before the create, it's the decision on whether to call "create" or "comment", it's never getting to "create" because it's picking up the email as a comment.

I'm not clear on exactly what you are seeing here though - could you lay out the results of some basic testing and tell us what mail handler you're using and how it's configured?

Ok. Here's the initial email sent to the mail handler. EXTELSUPPORT is the inbox that mail handler has access to.


From: Morozova, Marharyta
Sent: 30 May 2014 09:45:13 (UTC) Dublin, Edinburgh, Lisbon, London
Subject: IBR for firm ID 13461

Hi Chris,

Could you please move start/end date for the below Surveys to the future

  • Research Vote 2014 Survey
  • Execution Vote 2014 Survey

Could you please attach the following sectors to region Global

Equity Research

Global Strategy

UK Small & Mid Caps

Thank you,



And here's what JIRA replies:


From: Marharyta Morozova (JIRA)
Sent: Friday, May 30, 2014 3:47 PM
To: Hellen, Chris
Subject: [JIRA] (EXTEL-1059) IBR for firm ID 13461

Marharyta Morozova created StoryEXTEL-1059

IBR for firm ID 13461

Issue Type:



Chris Hellen




30/May/14 4:45 AM


Hi Chris,

Could you please move start/end date for the below Surveys to the future

· Research Vote 2014 Survey

· Execution Vote 2014 Survey

Could you please attach the following sectors to region Global

Equity Research

Global Strategy

UK Small & Mid Caps

Thank you,







Marharyta Morozova


The id EXTEL-1059 in the email was used on May 2. The latest one at the time of this email was EXTEL-1135, which was supposed to be for this issue.

As for the email, the link EXTEL-1059 actually lead to old EXTEL-1059 on JIRA. So this email from Magarita was never actually created as a new issue.

Hmm. I've got a sneakily horrid idea on what it might be doing, but before I ramble at length, I should check a bit more.

You mention EXTEL-1135, which I'm not sure about. Could you confirm that no new issue has been created at all by this email? In ANY project?

Secondly, does EXTEL-1059 have any comment added to it by this email?

Third, are you using a customised workflow for the issues in the EXTEL project? (Focus on EXTEL-1059 if you are using many workflows)

Finally, have you customised your email templates in any way?

I like horror and suspense so I will continue to indulge this:

1. Absolutely no. Searched using both reporter and parts of email subject on issue summary.

2. EXTEL-1059 has no comment / user name that resembles the email.

3. JIRA default workflow scheme.

4. I think there is because there's the company brand on the email, but I don't know to what degree.

Ok, that's all narrowing it down a lot.

Next question, based on those - is it always EXTEL-1059 you get a mail for?

No, this randomly occurred within EXTEL. Because it seems to be specific to this project, I'd think each project should have stored the 'latest' counting ID somewhere.

I know JIRA has one for the whole instance. We had an incident once where this number was out of sync with the actual maximum issue number, and the result was that no new issue can be created at all.

Of course there's a "latest" counter for a project, but it's nothing to do with email. Neither is the database-id counter.

If the email is going to create an issue, it uses the same process that the UI does. Or REST. Or the listeners and post-functions that create issues as part of the workflow. I'm not sure why you keep coming back to it.

Could you tell us, is it always EXTEL-1059 you get the email for?

Thank you for assuring it was REST / other function that take care of issue creation.

Sorry if my previous response wasn't clear. No, this randomly occured within EXTEL. It is not specific to EXTEL-1059.

Bump. We are encountering this issue on our JIRA instance. On-premise v 6.3.11.

Tickets created through Incoming Email reuse existing ticket numbers. Apart from the email response notifying us that a ticket was created, the issue is lost. In this case:

  • A Ticket mailed in last night was assigned issue number of SYS-9185.
  • SYS-9185 was created 18-Sep-14 and closed 22-Sep-14.

More information:

  • Tickets created through UI are not affected (now up to SYS-9702).
  • This occurred before for different issue numbers. A JIRA restart temporarily resolved the issue.
  • The incoming emails do not contain any numbers in the subject or body so this isn't JIRA trying to parse for existing issues.
  • Nothing in the log file to indicate a problem at the time emails are received.
  • Tickets seem to be created in series using a stale 'next ticket' counter. Tickets 1, 2 and 4 in this screenshot are created through email, and have all existed for several months. Ticket 3 was created on the UI.


I don't understand the question - you can't "reuse" numbers in JIRA, they're unique. What do you mean by "reuse"?

You don't seem to have read my message, or any of the thread. Ignoring your question.

I have read it, and it is totally unclear. Ignoring requests for clarification is not going to get you any help. What does "reuse" mean? What *exactly* is happening here - you send Jira an email, and you get what? I can see you get a response mail, but what does "the ticket gets lost" mean? What mail handler are you using? What does the log say?

This is related to the title of the topic and the original posting, so I did not bother to duplicate existing information. When JIRA collects email through IMAP Incoming Email it tries to create an issue with an issue number that already exists. I get a workflow email which says a ticket has been created, referencing a ticket number that has existed for months prior. Ticket gets lost = No ticket is created by JIRA No error messages in the log file.

So, it's not "reusing" numbers at all. It is responding with an email referring to an old issue, and not creating a new issue (not quite the same as the original post, but close). In other words, "A Ticket mailed in last night was assigned issue number of SYS-9185." is not true, you are getting an "issue created" email that tells you that, but the issue is an old one and a new issue is not being created. However, your screenshot is accompanied by text saying that issues are being created by email - can you just confirm that those are from a time when it was working correctly? I have seen this happen before, when someone messed up permissions in the application - Jira was trying to create a temporary file to build an email from, but couldn't clear the working space, so it picked up an old file and sent that instead. The difference here is that a new issue *was* created by that process, it was just that the email was wrong. Could you check all the file ownership and permissions for the installation? Also, which handler are you using?

Did anyone ever figure this out? I am experiencing this now with my Service Desk project.

Anybody has any clues about this error? I'm facing exactly the same problem and we are stuck because we can not apply the service desk in our clients.



You'll need to work through the same process as above - what *exactly* is the configuration of the email handler. What *exactly* is the subject of the email you think is triggering the mail out, and when is it happening?

Hi Nic, I forgot to detail some things. My problem is exclusively with the Service Desk plugin. In this case I have no handler configured, because i think Service Desk do it automatically under the hood when we had configured the project. The subject of the e-mail does not matter in my case. Sometimes all works fine, then suddenly the error begins. For example: we have a Service Desk project with a project key named SD. Our last issue is SD-18. If i try to open a request by e-mail, JIRA returns an e-mail to me telling that the new request is SD-12. If i send another request, now it tells me that it is the request SD-13. It seems that JIRA is using a different counter for issues opened by e-mail and nothing happened (no issue is created and no comment is added). If I try to open an issue manually via JIRA everything works fine. It's very weird.

I tried to reindex JIRA, but the error persists.

Did you ever figure this out? I am experiencing this now with my Service Desk project.

I am running across this very same issue. Was a resolution ever found?  Sometimes, when my customers email to create an issue, the response they receive provides an issue key that has already been used and also the link provided points to the earlier issue, which may or may not already be closed. It seems that half the time or more, the email creates an issue correctly, but certainly we are experiencing intermittent problems, as described in the initial post/question.

Hi Wade,

We are encountering same exact thing. Did you have any success finding a solution elsewhere than this thread?

We did not find anything, and the problem seems to have gone away.

Glad to hear for you =) Not very helpful for us =P


Thanks for replying Wade!

Same problem here; email created issues in the Service Desk get issue IDs that were already used weeks ago. Anybody already have a clue how to solve this? This is so annoying and makes the JIRA helpdesk tool look really bad in our user's eyes.

Please, check, whether you staging Jira doesn't have same mail handler configured.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

90 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you