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

Updating incoming mail server password does not work

    XMLWordPrintable

Details

    Description

      Issue Summary

      When custom POP3/IMAP servers are being used to handle the incoming mail, trying to change the password through Jira UI will result in the error message:

      Unfortunately no connection was possible. Review the errors below and rectify:AuthenticationFailedException: LOGIN failed. Invalid login/password for user id <username> 

      If debugging the connection from the mail server side, it can be seen that Jira submits the original password and not the new one. This makes it impossible to update the mail server password should there be a need for it.

      Steps to Reproduce

      1. Setup Greenmail as a test mail server and set a user with a password:
        java -Dgreenmail.setup.test.all -Dgreenmail.users=catchall:abc -Dgreenmail.verbose -jar greenmail-standalone-1.6.0.jar
      2. Configure POP3 or IMAP server in Jira pointing to Greenmail (host=localhost, port=3110 for POP3)
      3. Test connection, make sure it works, save.
      4. Try editing the connection, enable "Change password", and provide whatever password. When testing, the connection will be successful all the time.
      5. Restart Greenmail with a new password:
        java -Dgreenmail.setup.test.all -Dgreenmail.users=catchall:123 -Dgreenmail.verbose -jar greenmail-standalone-1.6.0.jar
      6. Edit the mail server, try providing the new password, it will never work.
      7. Observe Greenmail output and see that Jira is supplying the original password when testing the connection.

      Expected Results

      New password is successfully set.

      Actual Results

      New password is completely ignored and never set.

      Workaround

      The easiest workaround is to never rotate passwords for the mail server. If that is not possible, you can do one of the following:

      • Delete this mail server, and create it a new. You will need to repoint all mail handlers to the new mail server.
      • Update the password directly in the database, encoding it with a base64 encoding:
        UPDATE mailserver SET mailpassword='<base64-encoded password>' WHERE name = '<mail server name in Jira>';

      Attachments

        Issue Links

          Activity

            People

              pprzytarski Pawel Przytarski
              apatyuchenko Andrey Patyuchenko
              Votes:
              5 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: