Fixes #496 enabling all domains to get spam headers and spam checks (#563)

* Fixes #496 enabling all domains to get spam headers and spam checks (integration tests included)
This commit is contained in:
Thomas VIAL 2017-04-18 14:18:42 +02:00 committed by GitHub
parent 4e842c75f8
commit 62f6fbbaae
7 changed files with 38 additions and 9 deletions

View file

@ -271,7 +271,7 @@ load 'test_helper/bats-assert/load'
@test "checking smtp: delivers mail to existing account" {
run docker exec mail /bin/sh -c "grep 'postfix/lmtp' /var/log/mail/mail.log | grep 'status=sent' | grep ' Saved)' | wc -l"
assert_success
assert_output 7
assert_output 8
}
@test "checking smtp: delivers mail to existing alias" {
@ -414,7 +414,7 @@ load 'test_helper/bats-assert/load'
}
@test "checking spamassassin: docker env variables are set correctly (custom)" {
run docker exec mail /bin/sh -c "grep '\$sa_tag_level_deflt' /etc/amavis/conf.d/20-debian_defaults | grep '= 1.0'"
run docker exec mail /bin/sh -c "grep '\$sa_tag_level_deflt' /etc/amavis/conf.d/20-debian_defaults | grep '= -5.0'"
assert_success
run docker exec mail /bin/sh -c "grep '\$sa_tag2_level_deflt' /etc/amavis/conf.d/20-debian_defaults | grep '= 2.0'"
assert_success
@ -422,6 +422,14 @@ load 'test_helper/bats-assert/load'
assert_success
}
@test "checking spamassassin: all registered domains should see spam headers" {
run docker exec mail /bin/sh -c "grep -ir 'X-Spam-' /var/mail/localhost.localdomain/user1/new"
assert_success
run docker exec mail /bin/sh -c "grep -ir 'X-Spam-' /var/mail/otherdomain.tld/user2/new"
assert_success
}
#
# clamav
#