Incoming Mail Handler shows "Folder not found" error

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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:

1 2 3 4 5 6 7 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:

(Auto-migrated image: description temporarily unavailable)

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.

(Auto-migrated image: description temporarily unavailable)

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

Updated on April 11, 2025

Still need help?

The Atlassian Community is here for you.