Documentation for JIRA 5.2. Documentation for other versions of JIRA is available too.

To enable JIRA to send notifications about various events, you need to first configure an SMTP mail server in JIRA .

1. Define or edit the SMTP mail server

  1. JIRA システム管理者」 グローバル権限を持つユーザーとしてログインします
  2. Choose Administration at the top right of your screen. Then choose System > Mail > Outgoing Mail to open the 'SMTP Mail Server' page.
    (tick) Keyboard shortcut: g + g + start typing outgoing mail
    (info) If no SMTP mail server has been defined, then a Configure new SMTP mail server button will be shown on the page. If one has already been defined, then the SMTP mail server's details will be shown on the page, along with a set of operation links at the right.
  3. 新しい SMTP メールサーバーの設定」ボタンをクリックして新しい SMTP メールサーバーを定義するか、編集する場合は既存の SMTP メールサーバー設定の右にある「編集」をクリックすると、「SMTP メールサーバーの追加/更新」ページが開きます。

  4. このページの上のセクションを次のように入力します。

    名前

    この SMTP メールサーバー設定を識別する任意の名前を指定します。

    説明

    (オプション) SMTP メールサーバー設定およびその目的を説明する任意の説明を指定します。この説明は、「SMTP メールサーバー設定」ページの SMTP メールサーバーの名前の下に表示されます。

    送信元アドレス

    Specify the email address used in the 'sender address' (or 'from') field of notification messages sent by JIRA, unless overridden in a project configuration.
    (info) Only specify an email address for this field (e.g. jira@example-company.com). JIRA will use this value to construct the full 'from' header based on the current user ("Joe Bloggs (JIRA) <jira@example-company.com>").
    To change the 'from' header, go to Administration > System > General Configuration and (under Settings), edit the Email from field.

    E メールの接頭語

    このサーバーから送信するメールの件名で使用する文字列を、接頭語として指定します。これにより、ユーザーは、この接頭語に基づいて JIRA からのメール通知をフィルターできるため便利です。

    スクリーンショット : SMTP メールサーバーの追加 (または更新)

On this page:

2. Specify a host name or JNDI location for your SMTP mail server

SMTP メールサーバーの追加/更新ページの 2 つ目の部分では、JIRA がメールを送信する SMTP メールサーバーのサーバーの詳細を指定します。これは 2 つの方法があります。次のいずれかを実行します。

  • specify the SMTP host details of your SMTP mail server;
    or:
  • specify the JNDI location of a javax.mail.Session object  — that is, use JNDI to look up an SMTP mail server that you have preconfigured in your application server. This has the following advantages:
    • セキュリティの向上: JIRA 管理者は JIRA 管理インターフェイスからメールの詳細を確認できず、メールの詳細は JIRA バックアップファイルに保存されません。
    • その他の SMTP オプション: たとえば、mail.smtp.userset プロパティを設定して、NOOP の代わりに RSET に切り替えて接続をテストできます。
    • Centralised management: mail details are configured in the same place as database details and may be configured through your application server administration tools.

SMTP ホストの詳細を指定する

ほとんどの人は、このメールサーバーの SMTP ホストの詳細を JIRA で直接していすることで、JIRA の SMTP メールサーバーを指定します。

  1. In the SMTP host section of the Add/Update SMTP Mail Server page (above), complete the following form fields:

    サービスプロバイダー
    (既存の SMTP メールサーバーを更新する場合は使用できません)

    Choose between using your own SMTP mail server (i.e. Custom), or either Gmail (i.e. Google Apps Mail / Gmail) or Yahoo! (i.e. Yahoo! Mail Plus) as the service provider for your SMTP mail server.
    (info) If you choose either Gmail or Yahoo! options and then switch back to Custom, some of the key fields in this section will automatically be populated with the relevant SMTP mail server settings for these service providers.

    プロトコル

    SMTP メールサーバーが標準 (例: SMTP ) またはセキュア (例: SECURE_SMTP ) のどちらであるかを指定します。

    ホスト名

    SMTP メール サーバーのホスト名または IP アドレスを指定します。例: smtp.yourcompany.com

    SMTP ポート

    (オプション) SMTP ポート番号 (通常、SMTP は 25、SMTPS は 465)。このフィールドを空白にした場合、いずれかが推測されます。

    タイムアウト

    (オプション) タイムアウト時間をミリ秒単位で指定しまス。フィールドが空白のまま残された場合は、これを 10000 として処理します。ここで 0 または負の値を指定すると、JIRA は SMTP サーバーの応答を無限に待機します。

    TLS

    (Optional) Select this check box if your SMTP host uses the Transport Layer Security (TLS) protocol.

    ユーザ名

    (オプション) SMTP ホストで認証が必要な場合、これらの認証資格情報のユーザー名をここで指定します。(ほとんどの会社サーバーは、非ローカルユーザーへメールをリレーするため、認証が必要です。)

    パスワード

    (Optional) Again, if your SMTP host requires authentication, spcify the password associated with the username you specified above.
    (info) When editing an existing SMTP mail server, select the Change Password check box to access and change this field.

    (warning) 注意:

    • If your server's startup script uses the -Dmail system properties (e.g. mail.smtp.host or mail.smtp.port), they will override the settings that you specify in the above form. Additionally, if necessary you can manually specify the host name that JIRA reports itself as to the SMTP server by setting -Dmail.smtp.localhost

  2. (オプション)テスト接続ボタンをクリックし、先ほど設定した SMTP メールサーバーと JIRA が通信できることを確認します。
  3. 追加」(または「更新」) ボタンをクリックして、JIRA の SMTP メールサーバー設定を保存します。

「JNDI の場所」を指定する

SMTP ホストの詳細を JIRA に直接指定する代わりに、アプリケーションサーバー内でそれらを設定し、JNDI 経由で事前設定されたメールセッションを参照できます。

In the JNDI Location section of the Add/Update SMTP Mail Server page (above), specify the location of a javax.mail.Session object to use when sending email, in the JNDI Location field. This will begin with the prefix java:comp/env/

JNDI の場所の設定

<Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false">
 ...
   <Resource name="mail/JiraMailServer"
     auth="Container"
     type="javax.mail.Session"
     mail.smtp.host="mail.yourcompany.com"
     mail.smtp.port="25"
     mail.transport.protocol="smtp"
     mail.smtp.auth="true"
     mail.smtp.user="jirauser"
     password="mypassword"
   />
 ...
</Context>

または、認証が不要な場合 (例: localhost 経由や、会社内でのみ送信している場合):

<Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false">
 ...
   <Resource name="mail/JiraMailServer"
     auth="Container"
     type="javax.mail.Session"
     mail.smtp.host="localhost"
     mail.smtp.port="25"
     mail.transport.protocol="smtp"
   />
 ...
</Context>

If you happen to be running JIRA on an application server other than Apache Tomcat (which is not a supported JIRA configuration), a similar methodology for configuring a JNDI location to your SMTP mail server should apply to that application server. For details, please see the Transaction Factory documentation.

接続で問題が発生する場合は、mail.debug="true" パラメーターを <Resource/> 要素 (上記) に追加します。これにより、接続をテストする際にSMTP レベルの "デバッグ" の詳細が表示されます。

JavaMail クラスの移動

また、JavaMail クラス (一般的には JAR ライブラリファイル) がアプリケーションサーバーの classpath 内に存在し、JIRA の JAR ライブラリファイルと競合しないことを確認する必要があります。これは、アプリケーションサーバー自体 (JIRA ではない) が SMTP 接続を確立し、アプリケーションサーバーは JIRA のクラスローダーで JIRA ライブラリを確認できないために必要です。

Some operating systems may bundle the JavaMail classes with application servers (eg. Tomcat in Red Hat Enterprise Linux). This may conflict with JIRA's copy of the JavaMail classes, resulting in errors like:

java.lang.NoClassDefFoundError: javax/mail/Authenticator

または

java.lang.IllegalArgumentException: 場所 [java:comp/env/mail/JiraMailServer] にあるメールサーバーが、
必要なタイプ javax.mail.Session ではありません。

Apache Tomcat などの軽量のアプリケーションサーバー (JIRA の「推奨」配布版に組み込まれているものなど) には、JavaMail は付属しません。

競合を防ぐため、アプリケーションサーバーの lib/ ディレクトリを確認します。

  • If the application server already contains mail-1.4.1.jar and activation-1.1.1.jar, then just remove mail-1.4.1.jar and activation-1.1.1.jar from the <jira-application-dir>/WEB-INF/lib/ subdirectory of the JIRA Installation Directory.
  • If the application server does not contain mail-1.4.1.jar and activation-1.1.1.jar, then move the mail-1.4.1.jar and activation-1.1.1.jar from the <jira-application-dir>/WEB-INF/lib/ subdirectory of the JIRA Installation Directory into the the lib/ subdirectory of the JIRA Installation Directory (for 'recommended' distributions of JIRA) or the lib/ subdirectory of the application server running JIRA.

SMTP over SSL

メールサーバーが SSL をサポートしている場合、JIRA とメールサーバーの間の電子メール通信を、SSL 経由で暗号化できます。 

Firstly, you will need to import the SMTP server certificate into a Java keystore. The process is described on the Connecting to SSL Services page.

(warning) Important Note: Without importing the certificate, JIRA will not be able to communicate with your mail server.

次に、メール サーバーの接続プロパティを編集し、starttls および SSLSocketFactory を指定します。{$JIRA_INSTALL}/conf/server.xml (この例では Gmail のサーバーを使用) の例:

<Resource name="mail/GmailSmtpServer"
 auth="Container"
 type="javax.mail.Session"
 mail.smtp.host="smtp.gmail.com"
 mail.smtp.port="465"
 mail.smtp.auth="true"
 mail.smtp.user="myusername@gmail.com"
 password="mypassword"
 mail.smtp.starttls.enable="true"
 mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
/>

トラブルシューティング

A useful tip for debugging mail-related problems in JIRA is to set the -Dmail.debug=true property on startup. This will cause protocol-level details of JIRA's email interactions to be logged. Additionally, turning up JIRA's log level will show when the service is running and how mails are processed.

一般的な問題

  • If JIRA does not appear to be creating or sending emails or creating issues and comments from email, your JIRA installation could be experiencing OutOfMemory errors. Please check your log files for OutOfMemory errors. If there are OutOfMemory errors, please restart JIRA and investigate the errors.
  • If you find some incoming emails simply disappear, check that you have not accidentally started a second copy of JIRA (eg. in a staging environment) which is downloading and deleting email messages. See the Restoring Data page for flags you should set to prevent mail being processed.
  • 「メールリレー」エラーを受け取った場合は、JIRA のSMTP メールサーバーの設定ページで、SMTP ホストユーザー名パスワードが指定されていることを確認してください。

ヘルプの活用

If you cannot resolve a problem yourself, please create a support case in the 'JIRA' project and we will assist.

 

Unknown macro: {htmlcomment}

Regular Expression: (([C,c]onfigur).([J,j][I,i][R,r][A,a]))|([S,s][M,m][T,t][P,p])|(([M,m][A,a][I,i][L,l]).([S,s][E,e][R,r][V,v][E,e][R,r]))|(([S,s]end).*([N,n]otification))

1 Comment

  1. Omar Shehab

    Can I grant a JIRA Administrator, not a JIRA System Administrator, the privilege for managing this feature?