Here is the notes from work to setup SMTP for Jira on Windows:
- Download openssl
- Run: openssl s_client -connect smtp.gmail.com:465> gmail.pem
- Edit gmail.pem with notepad
- Remove everything exception of "-----BEGIN CERTIFICATE-----" to "-----END CERTIFICATE-----" (the BEGIN and END portion must be retained)
- Save it
- Run: keytool -import -file gmail.pem -alias smtp.gmail.com -keystore "C:\Program Files\Java\jre1.6.0_05\lib\security\cacerts"
- keytool comes with Java in the bin dir
- lib\security\cacerts is within the Java install dir
- Edit C:\Program Files\JIRA-Enterprise-3.13.4\conf\server.xml
- Obviously file is relative to your install
- Add the below node to Context element but change relevant settings:
- <resource name="mail/GmailSmtpServer" class="Apple-tab-span" style="white-space:pre"> auth="Container"
type="javax.mail.Session"
mail.smtp.host="smtp.gmail.com"
mail.smtp.port="465"
mail.smtp.auth="true"
mail.smtp.user="MyGmailAccount@gmail.com"
password="MyPassword"
mail.smtp.starttls.enable="true
mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
/> - Save file
- Move
- Files:
- javamail-1.3.3.jar
- activation-1.0.2.jar
- From: c:\Program Files\JIRA-Enterprise-3.13.4\atlassian-jira\WEB-INF\lib\
- To: c:\Program Files\JIRA-Enterprise-3.13.4\common\lib
- Restart Atlassian JIRA service
- Go to Adminstration in JIRA web
- Go to Mail Servers
- Configure the SMTP
- Use JNDI setting: java:comp/env/mail/GmailSmtpServer
- Pray to God it works!
References:
2 comments:
At step 6, password is "changeit".
JIRA is almost like an API. JIRA can service PHP and JAVA for SMTP.
anti spam service
Post a Comment