Ability to add connection timeout to SMTP server in the Administration

XMLWordPrintable

    • 2
    • 7

      Problem Definition

      Not possible to add connection timeout to SMTP mail configuration in the Administration

      Suggested Solution

      Add a new connection timeout setting for SMTP mail configuration in the Administration

      Why this is important

      • There is no need to restart Bamboo (when using the workaround) if mail configuration need to be changed
      • No need to add JNDI in the new server.xml file when upgrading Bamboo

      Workaround

      For Bamboo versions prior to 6
      1. Shutdown Bamboo
      2. Copy the file <bamboo-install>\atlassian-bamboo\WEB-INF\lib\javax.mail-*.jar into <bamboo-install>\lib
      3. Delete <bamboo-install>\atlassian-bamboo\WEB-INF\lib\javax.mail-*.jar
      4. Edit the file <bamboo-install>\conf\server.xml to add the following SMTP settings (Resource tag only):
                        <Context path="" docBase="${catalina.home}/atlassian-bamboo" reloadable="false" useHttpOnly="true">
                        	
                        	<Resource name="mail/SmtpServer"
                    			auth="Container"
                    			type="javax.mail.Session"
                    			mail.smtp.host="smpt.host.name"
                    			mail.smtp.port="25"
                    			mail.smtp.auth="true"
                    			mail.smtp.user="username"
                    			password="password"
                    			mail.transport.protocol="smtp"
                    			mail.smtp.connectiontimeout="20000"
                  			/>
        
                            <!--<Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"-->
                                      <!--factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>-->
                            <Manager pathname=""/>
                        </Context>
        
      5. Start Bamboo
      6. Edit the mail setting at Administration >> Communication >> Mail server
      7. Select the option “JNDI” in “Email settings”
      8. Fill in the value “java:comp/env/mail/SmtpServer” in “JNDI location”
      9. Save the settings
      For Bamboo 6 onwards:

      The workaround process is the same, but for steps 2 and 3, 2 libraries must be moved instead of one:

      • javax.mail-api-x.x.x.jar
      • javax.mail-X.X.X.jar

            Assignee:
            Unassigned
            Reporter:
            Foong (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: