Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Disable email notification from Stash

Svante Gustafsson Björkegren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 27, 2014

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

4 answers

0 votes
Stefano Coletta July 2, 2020

2020 and still no flag.

Please, vote here https://jira.atlassian.com/browse/BSERV-8620

0 votes
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 5, 2014

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

0 votes
Svante Gustafsson Björkegren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 28, 2014

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

0 votes
Andrew Wolpers [BlackPearl PDM]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 28, 2014

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?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events