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?