I had
cause today to verify correct operation of
Jira with Gmail with
JEMH. I had enough fun to want to write it down for future reference.
1. So Gmail needs SSL for POP and SMTPThe problem is that in order for Jira (Java actually) to setup even a single SSL connection, it needs to be able to trust the source.
Following the
Connecting to SSL services page I recalled the nitty gritty of extracting the Gmail security cert, loading into the JRE cacerts file I remembered. Really usefully I was happy to the the old SSLPoke.class file I wrote to do testing ages ago still available, ironically able to use it to test my setup today! With a JRE now able to talk SSL to gmail, time to setup Jira.
2. Setup Jiraa) POP
Adding a popserver entry, with simple details, host as
pop.gmail.com and valid username/password. The SSL bit comes in when setting up the handler
When adding a POP handler, ensure the gmail popserver is selected, the handler has a
Uses SSL option, which needs setting true, and the port should be 995.
b) SMTP
Followed
Configuring JIRA to send SMTP mail , so modified the
config/server.xml file, all seemed fine, but this is where I hit a few snags, the most irritating was "java:comp/env....." not found. Turned out this was due to a
space at the front of the " java:", gah, my kingdom for a trim().
I found
JRA-12180 , so moved the two jars (mail / activation ) from
atlassian-jira/WEB-INF/lib into
common/lib. Q: Why isnt this already done as part of the standalone dist? huh.
And yet, it still didn't work. Hmm. So found an
Atlassian knowledge base article that indicated the "mail.smptp.socketFactoryClass" entry in the
server.xml file that the earlier page instructed to be added.
Alls well that ends well. Gmail now working as SMTP/POP server over SSL,.