diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f63380e..766c7e25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file. The format ### Fixed +- **Rspamd:** + - Configuration changes now trigger a service reload instead of a restart ([#4632](https://github.com/docker-mailserver/docker-mailserver/pull/4632)) - **Internal:** - `ENABLE_QUOTAS=1` - When an alias has multiple addresses, the first local mailbox address found will be used for the Dovecot dummy account workaround ([#4581](https://github.com/docker-mailserver/docker-mailserver/pull/4581)) - Change Detection service - Added support for responding to updated DMS config (_Rspamd and TLS certificates_) to `ACCOUNT_PROVISIONER=LDAP` ([#4627](https://github.com/docker-mailserver/docker-mailserver/pull/4627)) diff --git a/target/bin/rspamd-dkim b/target/bin/rspamd-dkim index a99bae5c..802fb663 100755 --- a/target/bin/rspamd-dkim +++ b/target/bin/rspamd-dkim @@ -255,9 +255,6 @@ EOF # since it would have been copied already. cp "${DEFAULT_CONFIG_FILE}" "${RSPAMD_OVERRIDE_D}/dkim_signing.conf" chown _rspamd:_rspamd "${DEFAULT_CONFIG_FILE}" "${RSPAMD_OVERRIDE_D}/dkim_signing.conf" - - _log 'debug' 'Restarting Rspamd as initial DKIM configuration was supplied' - supervisorctl restart rspamd fi } @@ -275,11 +272,8 @@ function _transform_public_key_file_to_dns_record_contents() { } function _final_steps() { - # We need to restart Rspamd so the changes take effect immediately. - if ! supervisorctl restart rspamd; then - _log 'warn' 'Could not restart Rspamd via Supervisord' - fi - + # Request Rspamd to reload it's config immediately (instead of waiting on change detection): + _reload_rspamd _log 'trace' 'Finished DKIM key creation' } diff --git a/target/scripts/check-for-changes.sh b/target/scripts/check-for-changes.sh index 8dbac251..281714fc 100755 --- a/target/scripts/check-for-changes.sh +++ b/target/scripts/check-for-changes.sh @@ -206,8 +206,7 @@ function _rspamd_changes() { _log 'trace' 'Rspamd - DKIM files updated' fi - _log 'debug' 'Rspamd configuration has changed - restarting service' - supervisorctl restart rspamd + _reload_rspamd fi } diff --git a/target/scripts/helpers/utils.sh b/target/scripts/helpers/utils.sh index 468a4e74..d11c1522 100644 --- a/target/scripts/helpers/utils.sh +++ b/target/scripts/helpers/utils.sh @@ -188,3 +188,8 @@ function _env_var_expect_integer() { _log 'warn' "The value of '${ENV_VAR_NAME}' is not an integer ('${!ENV_VAR_NAME}'), but was expected to be" return 1 } + +function _reload_rspamd() { + _log 'debug' "Reloading configuration for Rspamd via sending 'SIGHUP'" + supervisorctl signal SIGHUP rspamd +}