How to add JNDI Resources like JiraMailServer to server.xml for kubernetes deployed Jira

Dai Zhang March 27, 2023

the official guide says it could add smtp servers by Configuring a JNDI location, e.g. the jira one 's documentation is located at here, https://confluence.atlassian.com/adminjiraserver0904/configuring-an-smtp-mail-server-to-send-notifications-1188768602.html#ConfiguringanSMTPmailservertosendnotifications-ConfiguringaJNDIlocation

However, I found it hard to code it into the server.xml.
I found another solution that may add a new xml file, e.g. 'jira.xml', to the path of '/opt/atlassian/jira/conf/Catalina/localhost', which contain Context and Resources.

```

<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>

```

 

But I still cannot make it succeed. the frontend UI still pops me out with NameNotFoundException: Name [mail/JiraMailServer] is not bound in this Context. Unable to find [mail].

What should I do to add some JNDI resources to jira deployed in kubernetes

thanks.

0 answers

Suggest an answer

Log in or Sign up to answer