I need to disable emails in a newly setup Staging instance.
What I have understood there is no setting for this in the startup parameters (like it is for JIRA) so I guess it must be done on db-level (as for Confluence)
Would it be enough just to clear the "mail.host" property key in the app_property table in the Stash database?
UPDATE app_property SET prop_value = '' WHERE prop_key = 'mail.host'
I tried this and it seems to work out as expected! A re-start was needed though.
Any comments about this approach?
Thnx in advance!
Hi Andrew, I have tried this on both 2.11+ and the newest 3.4 and it seems to work the same. I know about the Mail Configuration section in the admin UI and that this is the place to turn off any outgoing emails. But I want to ensure this to be disabled prior to start-up of the new instance. My process for creating a Staging instance is (so far) 1. Backup my production instance using the Backup Client 2. Install the same Stash version on the Staging server 3. Restore this backup onto a Staging server using a new database 4. Update a bunch of files to not interfere with the original instance At this point I can now fire up the staging instance, but ... This could potentially still interfere with my production environment so I ... 5. Disable ALL post-function hooks in the database (typically Jenkins-stuff, web-hooks, REST-hooks) 6. Disable outgoing email. If this instance sends out emails it would be very confusing for the users. Now it should be safe(r) to start-up the staging environment. Maybe I make too much fuzz about this. I could just start-up the instance and as my first task just go into the Email Configuration in the admin UI and turn it off. But I like to make sure nothing is forgotten when creating a staging environment. At some point I will get disturbed in the process and forget to turn it off. This cannot happen and therefore I want to have it as a toll-gate prior to start-up. Makes sense? Cheers, // Svante
Stash does not have a startup parameter that you can use, but you could use the REST api to quickly clear out the mail configuration after startup. Just send a DELETE to /rest/api/latest/admin/mail-server. You'll need to be SYS_ADMIN to do it though.
See https://developer.atlassian.com/static/rest/stash/3.4.0/stash-rest.html#idp3190336 for the full documentation.
Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot