Hey,
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!
// Svante
Hi 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.
Cheers,
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the newer versions of Stash there's actually a jira-like panel to setup/modify mail handlers. Are you on an older version, or is there a reason you're doing it differently? Something with how your import process may be working?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.