Rspamd: update history key in Redis configuration (#3927)
This commit is contained in:
parent
b5b193ca4c
commit
e21e5e0490
|
@ -52,7 +52,7 @@ The most noteworthy change of this release is the update of the container's base
|
||||||
- `smtp_sasl_security_options = noanonymous` (_credentials are mandatory for outbound mail delivery_)
|
- `smtp_sasl_security_options = noanonymous` (_credentials are mandatory for outbound mail delivery_)
|
||||||
- `smtp_tls_security_level = encrypt` (_the outbound MTA connection must always be secure due to credentials sent_)
|
- `smtp_tls_security_level = encrypt` (_the outbound MTA connection must always be secure due to credentials sent_)
|
||||||
- **Environment Variables**:
|
- **Environment Variables**:
|
||||||
- `SA_SPAM_SUBJECT` has been renamed into `SPAM_SUBJECT` to become anti-spam service agnostic. ([3820](https://github.com/docker-mailserver/docker-mailserver/pull/3820))
|
- `SA_SPAM_SUBJECT` has been renamed into `SPAM_SUBJECT` to become anti-spam service agnostic. ([#3820](https://github.com/docker-mailserver/docker-mailserver/pull/3820))
|
||||||
- As this functionality is now handled in Dovecot via a Sieve script instead of the respective anti-spam service during Postfix processing, this feature will only apply to mail stored in Dovecot. If you have relied on this feature in a different context, it will no longer be available.
|
- As this functionality is now handled in Dovecot via a Sieve script instead of the respective anti-spam service during Postfix processing, this feature will only apply to mail stored in Dovecot. If you have relied on this feature in a different context, it will no longer be available.
|
||||||
- Rspamd previously handled this functionality via the `rewrite_subject` action which as now been disabled by default in favor of the new approach with `SPAM_SUBJECT`.
|
- Rspamd previously handled this functionality via the `rewrite_subject` action which as now been disabled by default in favor of the new approach with `SPAM_SUBJECT`.
|
||||||
- `SA_SPAM_SUBJECT` is now deprecated and will log a warning if used. The value is copied as a fallback to `SPAM_SUBJECT`.
|
- `SA_SPAM_SUBJECT` is now deprecated and will log a warning if used. The value is copied as a fallback to `SPAM_SUBJECT`.
|
||||||
|
@ -61,6 +61,8 @@ The most noteworthy change of this release is the update of the container's base
|
||||||
- The feature to include [`_SCORE_` tag](https://spamassassin.apache.org/full/4.0.x/doc/Mail_SpamAssassin_Conf.html#rewrite_header-subject-from-to-STRING) in your value to be replaced by the associated spam score is no longer available.
|
- The feature to include [`_SCORE_` tag](https://spamassassin.apache.org/full/4.0.x/doc/Mail_SpamAssassin_Conf.html#rewrite_header-subject-from-to-STRING) in your value to be replaced by the associated spam score is no longer available.
|
||||||
- **Supervisord**:
|
- **Supervisord**:
|
||||||
- `supervisor-app.conf` renamed to `dms-services.conf`
|
- `supervisor-app.conf` renamed to `dms-services.conf`
|
||||||
|
- **Rspamd**:
|
||||||
|
- the Redis history key has been changed in order to not incorporate the hostname of the container (which is desirable in Kubernetes environments) ([#3927](https://github.com/docker-mailserver/docker-mailserver/pull/3927))
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
|
|
@ -126,6 +126,15 @@ function __rspamd__setup_redis() {
|
||||||
servers = "127.0.0.1:6379";
|
servers = "127.0.0.1:6379";
|
||||||
expand_keys = true;
|
expand_keys = true;
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# We do not use `{{HOSTNAME}}` but only `{{COMPRES}}` to better support
|
||||||
|
# Kubernetes, see https://github.com/orgs/docker-mailserver/discussions/3922
|
||||||
|
cat >"${RSPAMD_LOCAL_D}/history_redis.conf" << "EOF"
|
||||||
|
# documentation: https://rspamd.com/doc/modules/history_redis.html
|
||||||
|
|
||||||
|
key_prefix = "rs_history{{COMPRESS}}";
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Here we adjust the Redis default configuration that we supply to Redis when starting it.
|
# Here we adjust the Redis default configuration that we supply to Redis when starting it.
|
||||||
|
|
|
@ -86,6 +86,18 @@ function teardown_file() { _default_teardown ; }
|
||||||
refute_line --regexp 'rewrite_subject = [0-9]+;'
|
refute_line --regexp 'rewrite_subject = [0-9]+;'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test 'Rspamd Redis configuration is correct' {
|
||||||
|
_run_in_container rspamadm configdump redis
|
||||||
|
assert_success
|
||||||
|
assert_line 'expand_keys = true;'
|
||||||
|
assert_line 'servers = "127.0.0.1:6379";'
|
||||||
|
|
||||||
|
_run_in_container rspamadm configdump history_redis
|
||||||
|
assert_success
|
||||||
|
assert_line 'compress = true;'
|
||||||
|
assert_line 'key_prefix = "rs_history{{COMPRESS}}";'
|
||||||
|
}
|
||||||
|
|
||||||
@test "contents of '/etc/rspamd/override.d/' are copied" {
|
@test "contents of '/etc/rspamd/override.d/' are copied" {
|
||||||
local OVERRIDE_D='/etc/rspamd/override.d'
|
local OVERRIDE_D='/etc/rspamd/override.d'
|
||||||
_file_exists_in_container "${OVERRIDE_D}/testmodule_complicated.conf"
|
_file_exists_in_container "${OVERRIDE_D}/testmodule_complicated.conf"
|
||||||
|
|
Loading…
Reference in New Issue