is there a way to stop Zammad from fetching new mails? E.g. when I update my system and make a snapshot before and something goes wrong then I don’t want Zammad to fetch mails that were not already fetched by the time I made the snapshot.
Does the maintenance mode stop Zammad from fetching new mails? Deactivating the mail accounts is possible of course but I’d have to deactivate about 60 accounts every time I update.
Yeeeaaah, that doesn’t really answer my question. Because how can I know the update went well when Zammad is stopped? I’d have to start it to make sure everything is working properly.
In Znuny, for example, I’d stop cron and the Znuny daemon. That would make the system not fetch new mails but I can still browse through the updated system to check if everything is working as expected.
I was thinking there might be something similar to this in Zammad.
You can stop the background worker service then it should not fetch anything. It’s similar to the daemon in the Znuny/OTRS context (also here it could be that some “normal” functionality is not working as expected without the Daemon).
Stopping the background worker just works before upgrading, as our scripts start it directly after updating and thus data is changed. You virtually have no chance do catch errors before.
Setting channels to inactive is the only working way without danger. Consider reducing your single mailboxes to aliases if your MTA supports that.
I came across this post some time ago, the author scripted the disabling and enabling of channels via the API during their backup. You could probably adapt it to something to fit your scenario. Note that I have not tested this myself.
I had a similar “problem”. I simply set up a firewall rule to block imap and smtp connections. This has nothing to do with Zammad, but could also work in your scenario.
We are still using that exact script today, in our full prod environment. It works perfectly.I have updated it slightly as needed, but the core of it still does its thing.
@oSIRus you should be able to use the API to disable the mail channel in zammad. this is exactly what i do, for the reason of i dont want a new email to come in whilst the backup process is underway. Have a look at my script linked in @dvanzuijlekom’s post for the endpoint.