dovecot: added timeout option when sa-rules cannot be downloaded #6025
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution Guidelines
What does this PR include?
Improvement of SA-Rules Download upon Dovecot Start/Restart
Short Description
Issue #6018 described a circumstance when dovecot is restarted, that the sa-rules are not downloaded (definitely a bug on the host machine, as it should work flawlessly) and therefore dovecot is not started. As the sa-rules are not necessary for mailcow to operate, we can exclude this after 10 failed tries...
Affected Containers
Did you run tests?
What did you tested?
If tested the build of Dovecot (worked) and the normal startup (worked too)
I also tested the exclusion of the script by modifing the timeout times and modifiying the wrong url (simulating a network failure), after X tries he's skipping the sa-rule download like wanted.
What were the final results? (Awaited, got)
I've had to set the exit code to 0 instead of 1 as the dovecot process wouldn't started afterwards if not exited 0. That changed it worked!