fix: Reload the rspamd service instead of restarting it (#4632)

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
Co-authored-by: Cristian Spiridon <scristian71@gmail.com>
This commit is contained in:
Cristian SPIRIDON 2026-01-11 20:08:59 +00:00 committed by GitHub
parent 0f5763ce48
commit 066d314264
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 10 deletions

View File

@ -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))

View File

@ -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'
}

View File

@ -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
}

View File

@ -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
}