apply feedback from @polarathene

ref: https://github.com/docker-mailserver/docker-mailserver/pull/3403#discussion_r1453332402
This commit is contained in:
georglauterbach 2024-01-16 15:13:03 +01:00
parent e1fd02c1f7
commit 68a67c95e2
No known key found for this signature in database
GPG key ID: F367F7C43C118578

View file

@ -60,10 +60,6 @@ function teardown_file() { _default_teardown ; }
'action=greylist' \ 'action=greylist' \
'reason=new' \ 'reason=new' \
'client_address=127.0.0.1/32, sender=user@external.tld, recipient=user1@localhost.localdomain' 'client_address=127.0.0.1/32, sender=user@external.tld, recipient=user1@localhost.localdomain'
_repeat_until_success_or_timeout 10 _run_in_container grep \
'Recipient address rejected: Delayed by Postgrey' \
/var/log/mail/mail.log
} }
# NOTE: This test case depends on the previous one # NOTE: This test case depends on the previous one
@ -77,7 +73,7 @@ function teardown_file() { _default_teardown ; }
_should_have_log_entry \ _should_have_log_entry \
'action=pass' \ 'action=pass' \
'reason=triplet found' \ 'reason=triplet found' \
'client_address=127.0.0.1, sender=user@external.tld, recipient=user1@localhost.localdomain' 'client_address=127.0.0.1/32, sender=user@external.tld, recipient=user1@localhost.localdomain'
} }
# NOTE: These two whitelist tests use `files/nc/` instead of `files/emails`. # NOTE: These two whitelist tests use `files/nc/` instead of `files/emails`.
@ -95,7 +91,7 @@ function teardown_file() { _default_teardown ; }
_should_have_log_entry \ _should_have_log_entry \
'action=pass' \ 'action=pass' \
'reason=client whitelist' \ 'reason=client whitelist' \
'client_address=127.0.0.1, sender=test@whitelist.tld, recipient=user1@localhost.localdomain' 'client_address=127.0.0.1/32, sender=test@whitelist.tld, recipient=user1@localhost.localdomain'
} }
@test "should whitelist recipient 'user2@otherdomain.tld'" { @test "should whitelist recipient 'user2@otherdomain.tld'" {
@ -104,7 +100,7 @@ function teardown_file() { _default_teardown ; }
_should_have_log_entry \ _should_have_log_entry \
'action=pass' \ 'action=pass' \
'reason=recipient whitelist' \ 'reason=recipient whitelist' \
'client_address=127.0.0.1, sender=test@nonwhitelist.tld, recipient=user2@otherdomain.tld' 'client_address=127.0.0.1/32, sender=test@nonwhitelist.tld, recipient=user2@otherdomain.tld'
} }
function _should_have_log_entry() { function _should_have_log_entry() {