mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-01 16:45:15 +02:00
feat: Configurable poll rate for check-for-changes.sh
(#4450)
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com> Co-authored-by: Casper <casperklein@users.noreply.github.com>
This commit is contained in:
parent
b653d9a586
commit
f2e5891b16
4 changed files with 24 additions and 1 deletions
|
@ -6,6 +6,11 @@ All notable changes to this project will be documented in this file. The format
|
|||
|
||||
> **Note**: Changes and additions listed here are contained in the `:edge` image tag. These changes may not be as stable as released changes.
|
||||
|
||||
### Added
|
||||
|
||||
- **Internal:**
|
||||
- [`DMS_CONFIG_POLL`](https://docker-mailserver.github.io/docker-mailserver/v15.0/config/environment/#dms_config_poll) supports adjusting the polling rate (seconds) for the change detection service `check-for-changes.sh` ([#4450](https://github.com/docker-mailserver/docker-mailserver/pull/4450))
|
||||
|
||||
### Updates
|
||||
|
||||
- **Documentation:**
|
||||
|
|
|
@ -360,6 +360,23 @@ Default: empty (no prefix will be added to e-mails)
|
|||
|
||||
Add trailing white-space by quote wrapping the value: `SPAM_SUBJECT='[SPAM] '`
|
||||
|
||||
##### DMS_CONFIG_POLL
|
||||
|
||||
Defines how often DMS polls [monitored config files][gh::monitored-configs] for changes in the DMS Config Volume. This also includes TLS certificates and is often relied on for applying changes managed via `setup` CLI commands.
|
||||
|
||||
- **`2`** => How often (in seconds) [change detection][gh::check-for-changes] is performed.
|
||||
|
||||
!!! note "Decreasing the frequency of polling for changes"
|
||||
|
||||
Raising the value will delay how soon a change is detected which may impact UX expectations for responsiveness, but reduces resource usage when changes are rare.
|
||||
|
||||
!!! info
|
||||
|
||||
When using `ACCOUNT_PROVISIONER=LDAP`, the change detection feature is presently disabled.
|
||||
|
||||
[gh::check-for-changes]: https://github.com/docker-mailserver/docker-mailserver/blob/v15.0.0/target/scripts/check-for-changes.sh#L37
|
||||
[gh::monitored-configs]: https://github.com/docker-mailserver/docker-mailserver/blob/v15.0.0/target/scripts/helpers/change-detection.sh#L30-L42
|
||||
|
||||
#### Rspamd
|
||||
|
||||
##### ENABLE_RSPAMD
|
||||
|
|
|
@ -211,7 +211,7 @@ function _rspamd_changes() {
|
|||
|
||||
while true; do
|
||||
_check_for_changes
|
||||
sleep 2
|
||||
sleep "${DMS_CONFIG_POLL:-2}"
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -149,6 +149,7 @@ function __environment_variables_general_setup() {
|
|||
_log 'trace' 'Setting miscellaneous environment variables'
|
||||
|
||||
VARS[ACCOUNT_PROVISIONER]="${ACCOUNT_PROVISIONER:=FILE}"
|
||||
VARS[DMS_CONFIG_POLL]="${DMS_CONFIG_POLL:=2}"
|
||||
VARS[FETCHMAIL_PARALLEL]="${FETCHMAIL_PARALLEL:=0}"
|
||||
VARS[FETCHMAIL_POLL]="${FETCHMAIL_POLL:=300}"
|
||||
VARS[GETMAIL_POLL]="${GETMAIL_POLL:=5}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue