Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-63285

JIRA does not create issue by email for non-JIRA users

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for JIRA Cloud. Using JIRA Server? See the corresponding bug report.

      Summary

      Using this configuration to allow non-JIRA users to create or comment on issues by email, JIRA only accepts the user to add comment on existing issues by adding the Issue Key in the subject of the message. When trying to raise a new ticket by email, the message is rejected with the following entries in atlassian-jira-incoming-mail.log:

      Cannot create issue due to invalid license: [Sorry, you can't create any issues right now, as you need to have access to a JIRA application to be able to create issues. To gain application access you need to be a member of a group assigned to an application.]

      Steps to Reproduce

      1. Allow anonymous access to your project per this KB
      2. Configure your mail handler as this
      3. Send an email out to JIRA's mail handler

      Expected Behavior

      The issue is created with the default reporter according to the mail handler configurations

      Actual Behavior

      No issue is created and the following entries appear in atlassian-jira-incoming-mail.log:

      Cannot create issue due to invalid license: [Sorry, you can't create any issues right now, as you need to have access to a JIRA application to be able to create issues. To gain application access you need to be a member of a group assigned to an application.]

      Notes

      This issue is not reproducible when the user is adding a new comment to an issue by specifying the Issue Key in the message's subject. That is, the message is added as a comment on the issue.

      Workaround

      After some tests, I've noticed that this won't affect mail handlers that use the instance's default mail server.

      So, as a workaround, you can create mail handlers that use the instance's default mail server, with a catch email address set when you need to use multiple mail handlers (to different projects).

      But in some cases, it is not feasible to force all external users to send the e-mails to the Jira instance's e-mail address, and to the e-mail set as Catch email address CCed.

      I've made this workaround to apply this without forcing the need of sending the e-mails meant to create issues to the instance's e-mail address. Instead, you will be able to use the desired mailbox as the source of the new issues, and have the e-mail routing automated by setting a forwarding rule in the mailbox that is meant to receive the e-mails that will create new issues.
      In this example, I've used a Gmail mailbox as my source:

      1. Create a mail handler that uses the instance's default mail server:

      • Jira home -> Jira settings -> System -> Incoming Mail;
      • Click on Add incoming mail handler;
      • Select the Default Cloud Mail Server as the Server -> select Create a new issue or add a comment to an existing issue as the Handler -> Next:
      • Select the target project -> the default issue type -> the mailbox where you receive the e-mails as the Catch e-mail address -> select a Default reporter (a user with permission to create issues in the target project) -> Add:

      2. In Gmail, a confirmation code is sent to the e-mail address that you want to set as the forwarding target. So in this case, we will need to create a mail handler that is able to catch the e-mail with the confirmation code, and create that as an issue:

      • Jira home -> Jira settings -> System -> Incoming Mail;
      • Click on Add incoming mail handler;
      • Select the Default Cloud Mail Server as the Server -> select Create a new issue or add a comment to an existing issue as the Handler -> Next;
      • Select the target project -> the default issue type -> select a Default reporter (a user with permission to create issues in the target project) -> Add:

      3. Configuring the forwarding in Gmail:

      • Click on the cog icon -> Settings:
      • Click on the Forwarding and POP/IMAP tab -> Add a forwarding address:
      • Type your instance's default mail server -> Next:
      • Confirm the forwarding e-mail address -> Proceed:
      • The confirmation code notification will be displayed -> OK:
      • The mail handler created in the step 2 should process the e-mail sent by Gmail, and create an issue in the target project. Here's an example of the issue created, where you can see the confirmation code:
      • Type the confirmation code in Gmail -> Verify:
      • Check Forward a copy of incoming mail to... -> Save Changes:

      At this point, you can delete the mail handler created in the step 2.

      With that setup, Jira will match the Catch email address with the source of the forwarded e-mail (it will be present in the header of the forwarded e-mail). Jira will then process that e-mail, creating an issue with the default reporter.

      Attachments

        1. apply.png
          apply.png
          171 kB
        2. confirmation code.png
          confirmation code.png
          62 kB
        3. confirmation code mail handler.png
          confirmation code mail handler.png
          92 kB
        4. confirmation code sent.png
          confirmation code sent.png
          45 kB
        5. confirm forwarding address.png
          confirm forwarding address.png
          52 kB
        6. forwarding address.png
          forwarding address.png
          45 kB
        7. Forwarding tab.png
          Forwarding tab.png
          82 kB
        8. Gmail settings.png
          Gmail settings.png
          66 kB
        9. Screen Shot 2019-01-11 at 10.54.58.png
          Screen Shot 2019-01-11 at 10.54.58.png
          40 kB
        10. Screen Shot 2019-01-11 at 10.59.06.png
          Screen Shot 2019-01-11 at 10.59.06.png
          99 kB
        11. verify.png
          verify.png
          81 kB

        Issue Links

          Activity

            People

              gmutreja@atlassian.com Gaurav Mutreja
              pahennig Paulo Hennig (Inactive)
              Votes:
              24 Vote for this issue
              Watchers:
              43 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: