How to configure a JSM Mail Handler with a shared mailbox using Basic Auth and what are the most common issues?
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
要約
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
環境
The solution was tested in Jira Service Management (JS) Server/Data Center 4.13.x, but it should apply to higher versions as well.
ソリューション
ここでは、次のように仮定します。
- 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
Note that IMAP cannot be used when configuring a mail handler with basic authentication (please refer to Issue 3 for more information).
既知の問題
Issue 1: the configuration of the Mail Handler was successful, but no email is read from the shared mailbox
考えられる根本原因:
- 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. 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:
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 - Provide ability to authenticate to shared IMAP mailboxes
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