We couldn't load all Actvitity tabs. Refresh the page to try again.
If the problem persists, contact your Jira admin.
IMPORTANT: JAC is a Public system and anyone on the internet will be able to view the data in the created JAC tickets. Please don’t include Customer or Sensitive data in the JAC ticket.
Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-74878

The "Connection Test" on the Outgoing Mail Server page fails with an authentication error code when no username or password is specified

    • 9.02
    • 43
    • Severity 2 - Major
    • 118
    • Hide
      Atlassian Update – 06 September 2024

      Thank you for reporting this issue. Few weeks ago we became aware that this issue still persists.

      Our investigation uncovered that, despite having similar symptoms, the cause of the problem is different.

      Please visit JRASERVER-78051 and vote/watch that issue for further updates.

      Best regards,

      Artur Falborski
      Jira DC Software Engineer

      Show
      Atlassian Update – 06 September 2024 Thank you for reporting this issue. Few weeks ago we became aware that this issue still persists. Our investigation uncovered that, despite having similar symptoms, the cause of the problem is different. Please visit JRASERVER-78051 and vote/watch that issue for further updates. Best regards, Artur Falborski Jira DC Software Engineer

      Issue Summary

      The connection test of the outgoing mail server configuration fails with an authentication error when using an SMTP mail server that does not require a username/password.

      Steps to replicate

      1. Install Jira Server on any version from 9.2.0
      2. Log into Jira as a Jira System Admin user
      3. Go to ⚙ > System > Outgoing Mail
      4. Configure a the SMTP Mail Server without specifying the combo username/password
      5. Click on the button Test Connection

      Actual behavior

      The connection test fails with an authentication error, even though the SMTP mail server does not need a username/password to be accessed, and no username/password was specified in the outgoing mail form.

      Depending on the type of SMTP mail server in use, a different error might be thrown:

      • Example of error 1
        AuthenticationFailedException: 334 VXNlcm5hbWU6
        

      • Example of error 2
        AuthenticationFailedException: 535 5.7.0 authentication failed
        

      If we enable DEBUG for Outgoing Mail and check the Jira Outgoing Mail Logs, we can see that the connection test incorrectly sets useAuth to true, and also it seems to be passing a non null password while no password and no username had been filled in the form:

      2023-02-14 15:39:06,130+0000 DEBUG [Test] http-nio-8080-exec-1 admin 939x204x1 10hxxdl 172.29.212.154,172.50.0.2 /secure/admin/VerifySmtpServerConnection!update.jspa [c.atlassian.mail.outgoing] DEBUG SMTP: useEhlo true, useAuth true
      
      ...
      
      2023-02-14 15:39:06,132+0000 DEBUG [Test] http-nio-8080-exec-1 admin 939x204x1 10hxxdl 172.29.212.154,172.50.0.2 /secure/admin/VerifySmtpServerConnection!update.jspa [c.atlassian.mail.outgoing] DEBUG SMTP: protocolConnect login, host=smtp, user=, password=<non-null>
      

      Expected behavior

      The connection test should be successful.

      If we enable DEBUG for Outgoing Mail and check the Jira Outgoing Mail Logs, we can see that the connection test correctly sets useAuth to false, and also no username and no password are being passed:

      2023-02-20 15:40:29,776+0000 DEBUG [Test] http-nio-8080-exec-16 admin 940x844x1 hotrqz 172.29.210.143,172.50.0.2 /secure/admin/VerifySmtpServerConnection!update.jspa [c.atlassian.mail.outgoing] DEBUG SMTP: useEhlo true, useAuth false
      

      Workaround

      1. From the Outgoing Mail Server form, right click on the username field and select Inspect. The browser dev tools should be opened and should show the element corresponding to this field
      2. Right click on the element in the browser tool, and select Delete Node (or Delete Element, depending on which browser you are using)
      3. You should see that the box next to the username field is gone. Click on Test Connection.
      4. Verify that the connection test is successful

      Note about this workaround. Normally, it should be enough to delete the Username element from the page. If this workaround does not work for you, please try to also delete the Password element.

      Alternative Workaround

      Add the following JVM parameters to your setenv.sh file and then proceed with a restart of Jira (you can find detailed instructions here):

      -Dmail.smtp.ehlo=false -Dmail.smtp.auth=false
      

      mail.smtp.ehlo=false will prevent java from trying to connect and issue a EHLO command to connect to the mail system
      mail.smpt.auth=false will reinforce no authentication to your smtp system.

        1. Error_Example1.png
          Error_Example1.png
          53 kB
        2. Error_Example2.png
          Error_Example2.png
          85 kB
        3. screenshot-1.png
          screenshot-1.png
          526 kB
        4. Workaround1.png
          Workaround1.png
          215 kB
        5. Workaround2.png
          Workaround2.png
          70 kB
        6. Workaround3.png
          Workaround3.png
          114 kB
        7. Workaround4.png
          Workaround4.png
          133 kB

            Loading...
            IMPORTANT: JAC is a Public system and anyone on the internet will be able to view the data in the created JAC tickets. Please don’t include Customer or Sensitive data in the JAC ticket.
            Uploaded image for project: 'Jira Data Center'
            1. Jira Data Center
            2. JRASERVER-74878

            The "Connection Test" on the Outgoing Mail Server page fails with an authentication error code when no username or password is specified

              • Icon: Bug Bug
              • Resolution: Tracked Elsewhere
              • Icon: Highest Highest
              • 9.11.0, 9.10.1
              • 9.2.0, 9.3.0, 9.4.0, 9.5.0, 9.4.1, 9.4.2, 9.4.3, 9.4.6, 9.12.6, 9.12.7, 9.12.8, 9.17.1
              • Mail Server
              • 9.02
              • 43
              • Severity 2 - Major
              • 118
              • Hide
                Atlassian Update – 06 September 2024

                Thank you for reporting this issue. Few weeks ago we became aware that this issue still persists.

                Our investigation uncovered that, despite having similar symptoms, the cause of the problem is different.

                Please visit JRASERVER-78051 and vote/watch that issue for further updates.

                Best regards,

                Artur Falborski
                Jira DC Software Engineer

                Show
                Atlassian Update – 06 September 2024 Thank you for reporting this issue. Few weeks ago we became aware that this issue still persists. Our investigation uncovered that, despite having similar symptoms, the cause of the problem is different. Please visit JRASERVER-78051 and vote/watch that issue for further updates. Best regards, Artur Falborski Jira DC Software Engineer

                Issue Summary

                The connection test of the outgoing mail server configuration fails with an authentication error when using an SMTP mail server that does not require a username/password.

                Steps to replicate

                1. Install Jira Server on any version from 9.2.0
                2. Log into Jira as a Jira System Admin user
                3. Go to ⚙ > System > Outgoing Mail
                4. Configure a the SMTP Mail Server without specifying the combo username/password
                5. Click on the button Test Connection

                Actual behavior

                The connection test fails with an authentication error, even though the SMTP mail server does not need a username/password to be accessed, and no username/password was specified in the outgoing mail form.

                Depending on the type of SMTP mail server in use, a different error might be thrown:

                • Example of error 1
                  AuthenticationFailedException: 334 VXNlcm5hbWU6
                  

                • Example of error 2
                  AuthenticationFailedException: 535 5.7.0 authentication failed
                  

                If we enable DEBUG for Outgoing Mail and check the Jira Outgoing Mail Logs, we can see that the connection test incorrectly sets useAuth to true, and also it seems to be passing a non null password while no password and no username had been filled in the form:

                2023-02-14 15:39:06,130+0000 DEBUG [Test] http-nio-8080-exec-1 admin 939x204x1 10hxxdl 172.29.212.154,172.50.0.2 /secure/admin/VerifySmtpServerConnection!update.jspa [c.atlassian.mail.outgoing] DEBUG SMTP: useEhlo true, useAuth true
                
                ...
                
                2023-02-14 15:39:06,132+0000 DEBUG [Test] http-nio-8080-exec-1 admin 939x204x1 10hxxdl 172.29.212.154,172.50.0.2 /secure/admin/VerifySmtpServerConnection!update.jspa [c.atlassian.mail.outgoing] DEBUG SMTP: protocolConnect login, host=smtp, user=, password=<non-null>
                

                Expected behavior

                The connection test should be successful.

                If we enable DEBUG for Outgoing Mail and check the Jira Outgoing Mail Logs, we can see that the connection test correctly sets useAuth to false, and also no username and no password are being passed:

                2023-02-20 15:40:29,776+0000 DEBUG [Test] http-nio-8080-exec-16 admin 940x844x1 hotrqz 172.29.210.143,172.50.0.2 /secure/admin/VerifySmtpServerConnection!update.jspa [c.atlassian.mail.outgoing] DEBUG SMTP: useEhlo true, useAuth false
                

                Workaround

                1. From the Outgoing Mail Server form, right click on the username field and select Inspect. The browser dev tools should be opened and should show the element corresponding to this field
                2. Right click on the element in the browser tool, and select Delete Node (or Delete Element, depending on which browser you are using)
                3. You should see that the box next to the username field is gone. Click on Test Connection.
                4. Verify that the connection test is successful

                Note about this workaround. Normally, it should be enough to delete the Username element from the page. If this workaround does not work for you, please try to also delete the Password element.

                Alternative Workaround

                Add the following JVM parameters to your setenv.sh file and then proceed with a restart of Jira (you can find detailed instructions here):

                -Dmail.smtp.ehlo=false -Dmail.smtp.auth=false
                

                mail.smtp.ehlo=false will prevent java from trying to connect and issue a EHLO command to connect to the mail system
                mail.smpt.auth=false will reinforce no authentication to your smtp system.

                  1. Error_Example1.png
                    Error_Example1.png
                    53 kB
                  2. Error_Example2.png
                    Error_Example2.png
                    85 kB
                  3. screenshot-1.png
                    screenshot-1.png
                    526 kB
                  4. Workaround1.png
                    Workaround1.png
                    215 kB
                  5. Workaround2.png
                    Workaround2.png
                    70 kB
                  6. Workaround3.png
                    Workaround3.png
                    114 kB
                  7. Workaround4.png
                    Workaround4.png
                    133 kB

                        d996197e70d9 Artur Falborski
                        jrey Julien Rey
                        Votes:
                        12 Vote for this issue
                        Watchers:
                        29 Start watching this issue

                          Created:
                          Updated:
                          Resolved:

                            Estimated:
                            Original Estimate - Not Specified
                            Not Specified
                            Remaining:
                            Remaining Estimate - 0h
                            0h
                            Logged:
                            Time Spent - 1h
                            1h

                              d996197e70d9 Artur Falborski
                              jrey Julien Rey
                              Affected customers:
                              12 This affects my team
                              Watchers:
                              29 Start watching this issue

                                Created:
                                Updated:
                                Resolved:

                                  Estimated:
                                  Original Estimate - Not Specified
                                  Not Specified
                                  Remaining:
                                  Remaining Estimate - 0h
                                  0h
                                  Logged:
                                  Time Spent - 1h
                                  1h