How to configure a JSM Mail Handler with a shared mailbox using Basic Auth and what are the most common issues?

Still need help?

The Atlassian Community is here for you.

Ask the community

    

Summary

Configuring a Jira Service Management (JSM) Mail Handler (via the page Project Settings > Email Requests) with a Shared Mailbox and using the Basic Authentication can be a tricky task. Using the right mailbox, username, protocol or port is crucial for the configuration to be successful.

The purpose of this knowledge base article is to:

  • Show how to configure such integration this when using a Shared Mailbox with MS Office 365
  • List the most common issues you might run into

Environment

The solution was tested in Jira Service Management (JS) Server/Data Center 4.13.x, but it should apply to higher versions as well.

Solution

Let's assume that:

  • you have a shared mailbox with the email address testsharedmailbox@test.com
  • one of the user who has access to the inbox folder of this shared mailbox is userwithmailboxaccess@test.com

To configure this shared mailbox using this user to access it, you will need to use the following settings in Project Settings > Email Requests > Other and click on the Update button:

  • email address: testsharedmailbox@test.com
  • username: userwithmailboxaccess@test.com\testsharedmailbox
  • password: password of the username who has access to the mailbox
  • email protocol: SECURE POP
  • mail server: outlook.office365.com
  • port number: 995
  • timeout: 50000 (default value)
  • request type: request type of your choice

(warning) Note that IMAP cannot be used when configuring a mail handler with basic authentication (please refer to Issue 3 for more information).

Known Issues

Issue 1: the configuration of the Mail Handler was successful, but no email is read from the shared mailbox

Possible root causes:

  • The emails are not located in the Inbox folder of the shared mailbox (the mail handler only pulls emails located in the Inbox folder)
  • The emails were sent to the shared mailbox box before the mail handler was configured (the mail handler only pulls emails sent to the shared mailbox after it was configured)
  • The emails sent to the shared mailbox were already marked as READ before the mail handler tried to pull them (the mail handler only pulls emails marked as UNREAD)
  • The user does not have access the Inbox  folder of the shared mailbox
  • The user name was configured in Email Requests  without "\testsharedmailbox" at the end

Issue 2: the configuration of the Mail Handler keeps being overwritten in the UI

If you switch between the Outlook  and the Other  tab in Project Settings > Email Requests, the username will be automatically overwritten by the value from the email address field, due to the known bug below. (warning) Note that it is only a UI bug, and that it does not impact the actual configuration of the mail handler which is stored in the database:

JSDSERVER-8497 - Getting issue details... STATUS

Issue 3: the configuration of the Mail Handler was not successful, and the error "IMAP fails with A3 BAD User is authenticated but not connected error" is thrown

This error usually occurs when configuring a Mail Handler with a shared mailbox, and using the IMAP protocol and the basic authentication:

This configuration is unfortunately not supported as per the feature request  JRASERVER-30688 - Getting issue details... STATUS

There are options available to make the configuration with the shared mailbox:

  • keep using the basic authentication method, along with the POP protocol (instead of IMAP)
  • or change the basic authentication method to the Oauth 2.0 authentication method, which was introduced in Jira Service Management 4.10.0, and which supports the combination shared mailbox + IMAP



Last modified on Sep 16, 2024

Was this helpful?

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