Incoming Mail Handler shows "Folder not found" error


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

   

Summary

The following error appears in atlassian-jira-incoming-mail.log after configuring a new incoming mail handler and specifying a folder name to read from:

2021-12-08 12:20:01,762+0100 ERROR [Gmail SMTP server] Caesium-1-1 anonymous Gmail IMAP Gmail IMAP[10000]: Messaging Exception in service 'com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl' when getting mail: Folder1 not found
javax.mail.FolderNotFoundException: Folder1 not found
at com.sun.mail.imap.IMAPFolder.checkExists(IMAPFolder.java:431) [jakarta.mail-1.6.5-atlassian-2.jar:1.6.5-atlassian-2]
at com.sun.mail.imap.IMAPFolder.open(IMAPFolder.java:1044) [jakarta.mail-1.6.5-atlassian-2.jar:1.6.5-atlassian-2]
at com.sun.mail.imap.IMAPFolder.open(IMAPFolder.java:977) [jakarta.mail-1.6.5-atlassian-2.jar:1.6.5-atlassian-2]
at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:160) [jira-api-8.20.0.jar:?]
at com.atlassian.jira.service.services.mail.MailFetcherService.processMessages(MailFetcherService.java:388) [jira-api-8.20.0.jar:?]

When testing the mail handler, the same error appears in the test result:

Environment

Jira Service Management 4.8.0 / Jira 8.8.0 and higher, integrated with Office 365, Microsoft Exchange or Gmail

Cause

The specified folder is a subfolder of Inbox and the full path was not provided in the mail handler setup.

Solution


Add the full path to the folder in the mail handler configuration (eg: Inbox/Folder1), save and re-test.

Note: If doing INBOX/Folder1 does not work, try with INBOX.Folder1 instead.


Last modified on Apr 19, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.