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

"Invite User" function sending out email as the current logged in user

    XMLWordPrintable

Details

    Description

      Summary

      "Invite User" function should send email out as the address set in "Outgoing Mail", instead of using the current logged in user's email address as the "From" address. Some SMTP servers will reject emails because of this.

      Environment

      JIRA 7.1.x

      Steps to Reproduce

      1. Login as any admin user and send out invites by using "Invite User" function.

      Expected Results

      Invite email should be sent out

      Actual Results

      The invite email will not be sent, SMTP server returns errors such as "553 Mail from must equal authorized user" or "554 Message Rejected" depending on what SMTP server is used. This is because the "From" address header does not match the user address set in JIRA's "Outgoing Mail".

      However, this problem does not apply to all SMTP servers, GMail for example, automatically strips & replace the "From" address, and still send out the email. As shown in the example email header below, the original "From" address header is stripped and moved to "X-Google-Original-From".

      Return-Path: <smtpserver@gmail.com>
      Received: from apackl ([111.11.11.111])
              by smtp.gmail.com with ESMTPSA id r21sm12370338pfi.52.2016.07.27.20.29.03
              for <user@gmail.com>
              (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
              Wed, 27 Jul 2016 20:29:04 -0700 (PDT)
      From: "admin (JIRA)" <smtpserver@gmail.com>
      X-Google-Original-From: "admin (JIRA)" <admin@example.com>
      Date: Thu, 28 Jul 2016 11:29:01 +0800 (MYT)
      Reply-To: admin@example.com
      To: user@gmail.com

      To avoid this problem, the "Invite User" function should really use the address set in the outgoing mail server settings as the "From" address (which would be the same as how JIRA notifications are being sent out), instead of using the current logged in user's email.

      Workaround

      The KB article 550 5.7.1 Unable to Relay Mail From Exchange Server - Atlassian Documentation explains that it might be possible to change the configuration of your mail server to then allow for the relaying of messages

      Attachments

        Issue Links

          Activity

            People

              tevans Tim Evans (Inactive)
              tchai Tzu Hau Chai (Inactive)
              Votes:
              38 Vote for this issue
              Watchers:
              37 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: