Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-79937

Send Test Mail option is missing after configuring a smtps mail server in confluence.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 7.19.5, 7.20.1, 8.0.0
    • 7.19.1
    • Core - Email
    • None

    Description

      Problem

      When configuring an smtps mail server using port 465 in confluence an issue occurs on the view mail servers page in that there is no option to "send test mail", additionally the "prefix" and "from name" sections are blank. The "Email address" section shows $server.toAddress despite what is configured.

      Steps to Reproduce

      Add an smtps mail server using port 465:

      In the absence of having a mail server that supports smtps you can recreate the issue by creating an smtp server as normal, then updating the bandana table entry for the configured mail server using the sql query below - a restart of confluence will be needed once the database is updated.

      update bandana set bandanavalue = '<linked-hash-map>
        <entry>
          <long>1662638858557</long>
          <com.atlassian.confluence.jmx.JmxSMTPMailServer serialization="custom">
            <com.atlassian.mail.server.AbstractMailServer>
              <default>
                <connectionTimeout>10000</connectionTimeout>
                <debug>false</debug>
                <isAuthenticating>true</isAuthenticating>
                <timeout>10000</timeout>
                <tlsRequired>true</tlsRequired>
                <hostname>smtp.eu.testmail.org</hostname>
                <id>1662638858557</id>
                <mailProtocol>SECURE_SMTP</mailProtocol>
                <name>Test Server</name>
                <password>REMOVED</password>
                <port>465</port>
                <props>
                  <property name="mail.smtps.quitwait" value="false"/>
                  <property name="mail.debug" value="false"/>
                  <property name="mail.smtps.port" value="465"/>
                  <property name="mail.transport.protocol" value="smtps"/>
                  <property name="mail.smtps.auth" value="true"/>
                  <property name="mail.smtps.connectiontimeout" value="10000"/>
                  <property name="mail.smtps.host" value="smtp.eu.testmail.org"/>
                  <property name="mail.smtps.timeout" value="10000"/>
                  <property name="mail.smtps.starttls.enable" value="true"/>
                  <property name="mail.smtp.connectiontimeout" value="10000"/>
                </props>
                <username>postmaster@test_smtps.net</username>
              </default>
            </com.atlassian.mail.server.AbstractMailServer>
            <com.atlassian.mail.server.impl.SMTPMailServerImpl>
              <default>
                <isSessionServer>false</isSessionServer>
                <removePrecedence>false</removePrecedence>
                <tlsHostnameCheckRequired>false</tlsHostnameCheckRequired>
                <defaultFrom>confluence@@test_smtps.net</defaultFrom>
                <prefix>[Confluence]</prefix>
              </default>
            </com.atlassian.mail.server.impl.SMTPMailServerImpl>
            <com.atlassian.confluence.jmx.JmxSMTPMailServer>
              <default>
                <emailsAttempted>
                  <value>0</value>
                </emailsAttempted>
                <emailsSent>
                  <value>0</value>
                </emailsSent>
                <fromName>${fullname} (Confluence)</fromName>
              </default>
            </com.atlassian.confluence.jmx.JmxSMTPMailServer>
          </com.atlassian.confluence.jmx.JmxSMTPMailServer>
        </entry>
      </linked-hash-map>       ' where bandanaid in (select bandanaid from bandana where bandanakey = 'atlassian.confluence.smtp.mail.accounts');
      

      Expected Results

      Actual Results

      Workaround

      1. Make a backup copy of the /opt/atlassian/confluence/confluence/admin/mail/viewmailservers.vm file.
      2. Edit the file and change all instances of
        $protocol == 'smtp'

        to

        $protocol == 'smtp' || $protocol == 'smtps'

        There are four instances that need to be changed in the file.

      3. Save the file.

      Notes

      Attachments

        Issue Links

          Activity

            People

              acarvalho@atlassian.com Adilson Carvalho
              7829eff5df87 Dean Norman
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: