mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-02 09:05:14 +02:00
rspamd: disable checks for authenticated users (#3440)
Co-authored-by: Casper <casperklein@users.noreply.github.com> Co-authored-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
parent
b001f5a140
commit
f28fce9cc4
8 changed files with 77 additions and 8 deletions
|
@ -25,6 +25,7 @@ function setup_file() {
|
|||
--env LOG_LEVEL=trace
|
||||
--env MOVE_SPAM_TO_JUNK=1
|
||||
--env RSPAMD_LEARN=1
|
||||
--env RSPAMD_CHECK_AUTHENTICATED=0
|
||||
--env RSPAMD_GREYLISTING=1
|
||||
--env RSPAMD_HFILTER=1
|
||||
--env RSPAMD_HFILTER_HOSTNAME_UNKNOWN_SCORE=7
|
||||
|
@ -292,10 +293,22 @@ function teardown_file() { _default_teardown ; }
|
|||
}
|
||||
|
||||
@test 'hfilter group module is configured correctly' {
|
||||
_run_in_container_bash '[[ -f /etc/rspamd/local.d/hfilter_group.conf ]]'
|
||||
local MODULE_FILE='/etc/rspamd/local.d/hfilter_group.conf'
|
||||
_run_in_container_bash "[[ -f ${MODULE_FILE} ]]"
|
||||
assert_success
|
||||
|
||||
_run_in_container grep '__TAG__HFILTER_HOSTNAME_UNKNOWN' /etc/rspamd/local.d/hfilter_group.conf
|
||||
_run_in_container grep '__TAG__HFILTER_HOSTNAME_UNKNOWN' "${MODULE_FILE}"
|
||||
assert_success
|
||||
assert_output --partial 'score = 7;'
|
||||
}
|
||||
|
||||
@test 'checks on authenticated users are disabled' {
|
||||
local MODULE_FILE='/etc/rspamd/local.d/settings.conf'
|
||||
_run_in_container_bash "[[ -f ${MODULE_FILE} ]]"
|
||||
assert_success
|
||||
|
||||
_run_in_container grep -E -A 6 'authenticated \{' "${MODULE_FILE}"
|
||||
assert_success
|
||||
assert_output --partial 'authenticated = yes;'
|
||||
assert_output --partial 'groups_enabled = [];'
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ function setup_file() {
|
|||
--env LOG_LEVEL=trace
|
||||
--env MOVE_SPAM_TO_JUNK=0
|
||||
--env RSPAMD_LEARN=0
|
||||
--env RSPAMD_CHECK_AUTHENTICATED=1
|
||||
--env RSPAMD_GREYLISTING=0
|
||||
--env RSPAMD_HFILTER=0
|
||||
)
|
||||
|
@ -85,3 +86,12 @@ function teardown_file() { _default_teardown ; }
|
|||
_run_in_container_bash '[[ -f /etc/rspamd/local.d/hfilter_group.conf ]]'
|
||||
assert_failure
|
||||
}
|
||||
|
||||
@test 'checks on authenticated users are enabled' {
|
||||
local MODULE_FILE='/etc/rspamd/local.d/settings.conf'
|
||||
_run_in_container_bash "[[ -f ${MODULE_FILE} ]]"
|
||||
assert_success
|
||||
|
||||
_run_in_container grep -E 'authenticated \{' "${MODULE_FILE}"
|
||||
assert_failure
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue