Problems with IMAP
Problem
You occasionally have messages that won't process, and are using an IMAP mail server.
Folder Closed / Repeat Processing
IMAP is touted as a more advanced protocol than POP, which is true in some regards, but in some scenarios it can be problematic (see link below). If you experience FolderClosedException, which are due to your mailserver closing the connection on the mail being retrieved. Causes of FolderClosed include too many concurrent logins via multiple inbound mail server configurations for the same mailbox and mail that is too large for the default IMAP data batching data sizes used for retrieval. See the link below for some anecdotal performance results, and further details of what you can do to change your environment to work better with large mails over IMAP.
JEMH operates with a limited interface to Jira, we have raised this with Atlassian to improve their API, please watch/vote:
Message Removed
If you have concurrent access to a common mailbox its possible that a message may be 'removed' by another handler process, the error is likely to be harmless, unless the configuration caused the message to be dropped.
Performance Issues
We have found that there can be significant performance problems with IMAP when it is dealing with large messages. Take a look at our POP vs IMAP performance page, where we also give advice on what you can do to resolve the problem:
Solution
Check your mailbox for large messages. It is possible they are not able to be downloaded in time, possibly being timed-out by a mail server or JIRA.
Consider trying POP. It is better suited for JIRA usage as mail handlers require reliable transmission of the entire email, rather than partial transmission which is what IMAP is useful for.