Prepare a Jira development server's mail configuration


アトラシアン コミュニティをご利用ください。


What is the problem?

When you bring up a development instance of Jira, it is important to test your mail settings. However, if you bring up an identical copy of your running instance, you can have a recipe for disaster as it could result in incoming emails being parsed by your development instance, or erroneous notifications going out to users that do not understand what is going on. Extreme cases have resulted in system outages.

If you have multiple Jira instances using the same mailbox, the dev instance can end up processing mails that should be going to production. This means issues and comments can be added to the development server instead of production and also dev can send out notifications.

Jira Service Management versions that are 2.4.3 or lower will still continue to poll mail due to JSD-1860 - Getting issue details... STATUS . Please keep this in mind when going through these steps.

How do we prevent it?

Follow these steps to get a dev instance up and running with no rogue email issues: 

  1. Backup your existing instance as in our Backing Up docs.
  2. Before restoring the XML data into your staging Jira instance, please disable the mail handlers, as in our disabling emailing documentation.
    (info) This will require a restart of Jira. If you've used one of the bundled installers, it will automatically start Jira up without these settings. Please ensure to restart Jira after making these changes.
  3. After restarting Jira and disabling email, import your production Jira data.
  4. Delete all of the existing mail handlers. 
  5. Delete all existing SMTP and IMAP / POP servers.
  6. Shut down the instance.
  7. Remove all the filter subscriptions with the following SQL:

    delete from filtersubscription; 

    (info) skip this if you need to test filter subscriptions. Just make sure to do step 11 to ensure that your users do not get spammed.

  8. Remove the following entries:

    delete from notificationinstance; 
  9. As all references to the production mail servers have been removed, you can now revert the changes in step 2 and restart Jira.
  10. Add the necessary development mail server configuration for testing.
  11. To ensure that no emails go out to regular users during your testing, we recommend creating a dummy email address which you can use to verify that notifications are going to the right place. Then update all user emails to point to the same place using this query:

    update cwd_user set email_address='', lower_email_address=''; 
  12. Replace all property entries which contain emails with one of your choice:

    update propertystring set propertyvalue ='' where id in (select from propertyentry pe where pe.property_key='');
最終更新日 2020 年 11 月 23 日


Powered by Confluence and Scroll Viewport.