This page describes how to use a Gmail account as either an SMTP mail server to send notifications from JIRA or a POP3 mail server to receive email messages that create JIRA issues or comments, or both.
Configuring JIRA to use Gmail as an SMTP mail server
- Shut down JIRA.
Move (not copy) the 'activation' and 'mail' JAR files from the from the
<jira-application-dir>/WEB-INF/lib/subdirectory of the JIRA Installation Directory to the
/common/lib(Tomcat 5.5) or
/lib(Tomcat 6) subdirectory of the JIRA Installation Directory (for 'recommended' distributions of JIRA) or the
lib/subdirectory of the application server running JIRA.
For example, on a *nix-based system, at a shell prompt, change directory into the JIRA Installation Directory (of a 'recommended' distribution of JIRA) and enter the following:
Add Gmail as a JNDI resource within the within the
<Context/>elements of the
/conf/server.xmlfile. Change your username and password to those required to authenticate against your Gmail account:
If you are not using the built in cacerts file, you will need to add Gmail as a secure server. (Most default configurations can skip this step).Click here to expand...
- Download OpenSSL:
Import the SSL certificate from Gmail:
For Windows: double-click the openssl file from the directory that gets installed. Run
For Linux: run:
From the output, you want only the alphanumeric string between the lines which say 'BEGIN CERTIFICATE' and 'END CERTIFICATE' (inclusive). Copy the results into a file called gmail.cert using your favorite text editor.
Exit the openssl prompt and return to your Java installation's
bindirectory. Import the cert into your keystore:
"A keystore is created whenever you use a -genkey, -import, or -identitydb command to add data to a keystore that doesn't yet exist. More specifically, if you specify, in the -keystore option, a keystore that doesn't yet exist, that keystore will be created. If you don't specify a -keystore option, the default keystore is a file named .keystore in your home directory. If that file does not yet exist, it will be created."
From Sun´s Documentation on Keytool
Tip: The default keystore password is
Restart JIRA so that JIRA will acknowledge the JNDI location you defined above.
Follow the instructions in Configuring JIRA's SMTP Mail Server to Send Notifications to configure JIRA's SMTP mail server and at the second part of the configuration, specify in the JNDI Location field (if using the default example above):
Configuring Gmail for Incoming Mail (POP)
To use Gmail, for example, as a create and comment mail handler:
If you did not import the SSL certificate from Gmail during configuration of Gmail as an SMTP mail server, refer to the instructions above.
Enable POP access in your Gmail account's settings.
Add a POP3 mail account in JIRA.