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 .
「新しい SMTP メールサーバーの設定」ボタンをクリックして新しい SMTP メールサーバーを定義するか、編集する場合は既存の SMTP メールサーバー設定の右にある「編集」をクリックすると、「SMTP メールサーバーの追加/更新」ページが開きます。
このページの上のセクションを次のように入力します。
名前 | この 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. |
E メールの接頭語 | このサーバーから送信するメールの件名で使用する文字列を、接頭語として指定します。これにより、ユーザーは、この接頭語に基づいて JIRA からのメール通知をフィルターできるため便利です。 |
スクリーンショット : SMTP メールサーバーの追加 (または更新)
On this page:
SMTP メールサーバーの追加/更新ページの 2 つ目の部分では、JIRA がメールを送信する SMTP メールサーバーのサーバーの詳細を指定します。これは 2 つの方法があります。次のいずれかを実行します。
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:mail.smtp.userset
プロパティを設定して、NOOP の代わりに RSET に切り替えて接続をテストできます。ほとんどの人は、このメールサーバーの SMTP ホストの詳細を JIRA で直接していすることで、JIRA の SMTP メールサーバーを指定します。
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. |
プロトコル | SMTP メールサーバーが標準 (例: SMTP ) またはセキュア (例: SECURE_SMTP ) のどちらであるかを指定します。 |
ホスト名 | SMTP メール サーバーのホスト名または IP アドレスを指定します。例: |
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. |
注意:
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
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/
JIRA で指定する JNDI の場所は、JIRA のアプリケーションサーバーと設定によって異なります。JNDI の場所は一般的に、JIRA を実行するアプリケーションサーバーないで設定されます。 そのため、JIRA の場所を設定した後、JIRA を再起動し、その設定を JIRA でできるようにする必要があります。
For example, in Tomcat 6 (the application server bundled with 'recommended' distributions of JIRA), your JNDI Location would be java:comp/env/mail/JiraMailServer
and you would add the following section to the conf/server.xml
of your JIRA Installation Directory, inside the <Context/>
node:
<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 クラス (一般的には 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/
ディレクトリを確認します。
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.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.メールサーバーが 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.
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 you cannot resolve a problem yourself, please create a support case in the 'JIRA' project and we will assist.
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
Omar Shehab
Jun 20, 2013Can I grant a JIRA Administrator, not a JIRA System Administrator, the privilege for managing this feature?