Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-77676

Unable to change unauthenticated outgoing mail (smtp) configuration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 9.4.0, 9.4.5, 9.4.9, 9.12.8
    • Mail Server

    Description

      Issue Summary

      As of Jira 9.x in some cases it's not possible to update outgoing mail configuration via the UI.

      This is an 'edge' case steaming from seemingly no option to configure outgoing smtp server without authentication in Jira 9.4 and above.
      In Jira versions before 9.4 it is possible to create smtp configuration without authentication, as of Jira 9.4 the only options for setting credentials are 'select method' and 'password'; If customer has smtp server that doesn't require authentication - then they might be affected by this bug
       
      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Configure outgoing mail server without user authentication credentials - leave the username blank; Verify it works - i.e. send a test email
      2. Try to change server name or from name i.e. navigate to 'Outgoing Mail', select Edit on the outgoing mail server, then change 'From' name. Notice that 'Test connection' button is available

      Expected Results

      In the initial dialog box, after changing from or server name or both while leaving the user credentials as blank and authentication method as 'password (basic)', hitting on 'Test Connection' should return 'Test successful' and and then 'Save an authorise' button should become active, allowing to save the new configuration

      Actual Results

      In the initial Edit screen, clicking on 'Test connection' returns the following exception:

      Unfortunately no connection was possible. Review the errors below and rectify:
      
      AuthenticationFailedException: failed to connect, no password specified?
      

      Then assuming that since there is no password (i.e. we're configuring unauthenticated SMTP) changing the 'authentication method' to 'select method' changes the authentication credentials section on the screen to only 'username' - which is optional, here, none of the buttons, i.e. Authorize, Test Connection or Save are accessible and they won't get active no matter if changes are performed on the smtp server configuration or not

      Workaround

      1. Preferred. Re-create the SMTP configuration from scratch
      2. last resort. It's possible to update some of the SMTP configuration by updating the database directly (Jira restart is required) as follows:
      3. Stop Jira (on all nodes if there's more than one)
      4. Take a backup of the Jira database by means of native db tools (such as pg_dump for PostgreSQL)
      5. Identify the mail server ID in the database, by running the following query against JIRA's database:
        select id from mailserver where server_type = 'smtp';
        

        Make a note of the ID returned.

      6. update the required configuration parameter directly in the database using the ID gathered from the first step, for example, if updating 'Mail from', run the following SQL query:
        update mailserver set mailfrom = 'yourupdatedemail@yourdomain.com' where ID=<id>;
        

        Make sure to replace the <id> in the update statement, with the ID returned from step 1.

      7. Start Jira and verify the change is now reflected.

      For other parameters that should be possible to update via direct DB update, please reference the list below:
      name
      description
      mailfrom
      prefix
      smtp_port
      servername
      mailusername
      Notice, while there are other fields in the mailserver table, for example, protocol, server type etc, we don't recommend updating those parameters via DB update as they require more than just a direct DB update
       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              soslopov Sergey
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: