mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-03 17:44:49 +02:00
tests: Use swaks
instead of nc
for sending mail (#3732)
See associated `CHANGELOG.md` entry for details. --------- Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
This commit is contained in:
parent
0889b0ff06
commit
9e81517fe3
119 changed files with 355 additions and 455 deletions
|
@ -225,9 +225,12 @@ function teardown_file() { _default_teardown ; }
|
|||
sleep 10
|
||||
|
||||
# send some big emails
|
||||
_send_email 'email-templates/quota-exceeded' '0.0.0.0 25'
|
||||
_send_email 'email-templates/quota-exceeded' '0.0.0.0 25'
|
||||
_send_email 'email-templates/quota-exceeded' '0.0.0.0 25'
|
||||
_send_email --to 'quotauser@otherdomain.tld' --data 'quota-exceeded'
|
||||
assert_success
|
||||
_send_email --to 'quotauser@otherdomain.tld' --data 'quota-exceeded'
|
||||
assert_success
|
||||
_send_email --to 'quotauser@otherdomain.tld' --data 'quota-exceeded'
|
||||
assert_success
|
||||
# check for quota warn message existence
|
||||
run _repeat_until_success_or_timeout 20 _exec_in_container grep -R 'Subject: quota warning' /var/mail/otherdomain.tld/quotauser/new/
|
||||
assert_success
|
||||
|
|
|
@ -26,9 +26,11 @@ function setup_file() {
|
|||
_wait_for_smtp_port_in_container
|
||||
|
||||
# Single mail sent from 'spam@spam.com' that is handled by User (relocate) and Global (copy) sieves for user1:
|
||||
_send_email 'email-templates/sieve-spam-folder'
|
||||
_send_email --data 'sieve/spam-folder'
|
||||
assert_success
|
||||
# Mail for user2 triggers the sieve-pipe:
|
||||
_send_email 'email-templates/sieve-pipe'
|
||||
_send_email --to 'user2@otherdomain.tld' --data 'sieve/pipe'
|
||||
assert_success
|
||||
|
||||
_wait_for_empty_mail_queue_in_container
|
||||
}
|
||||
|
|
|
@ -26,7 +26,8 @@ function teardown() { _default_teardown ; }
|
|||
_common_container_setup 'CUSTOM_SETUP_ARGUMENTS'
|
||||
_wait_for_smtp_port_in_container
|
||||
|
||||
_send_email 'email-templates/existing-user1'
|
||||
_send_email --data 'existing/user1'
|
||||
assert_success
|
||||
_wait_for_empty_mail_queue_in_container
|
||||
|
||||
# Mail received should be stored as `u.1` (one file per message)
|
||||
|
@ -47,7 +48,8 @@ function teardown() { _default_teardown ; }
|
|||
_common_container_setup 'CUSTOM_SETUP_ARGUMENTS'
|
||||
_wait_for_smtp_port_in_container
|
||||
|
||||
_send_email 'email-templates/existing-user1'
|
||||
_send_email --data 'existing/user1'
|
||||
assert_success
|
||||
_wait_for_empty_mail_queue_in_container
|
||||
|
||||
# Mail received should be stored in `m.1` (1 or more messages)
|
||||
|
|
|
@ -14,7 +14,8 @@ function setup_file() {
|
|||
function teardown_file() { _default_teardown ; }
|
||||
|
||||
@test 'normal delivery works' {
|
||||
_send_email 'email-templates/existing-user1'
|
||||
_send_email --data 'existing/user1'
|
||||
assert_success
|
||||
_count_files_in_directory_in_container /var/mail/localhost.localdomain/user1/new 1
|
||||
}
|
||||
|
||||
|
@ -26,7 +27,7 @@ function teardown_file() { _default_teardown ; }
|
|||
}
|
||||
|
||||
@test "(IMAP) special-use folders should be created when necessary" {
|
||||
_send_email 'nc_templates/imap_special_use_folders' '-w 8 0.0.0.0 143'
|
||||
_nc_wrapper 'nc/imap_special_use_folders' '-w 8 0.0.0.0 143'
|
||||
assert_output --partial 'Drafts'
|
||||
assert_output --partial 'Junk'
|
||||
assert_output --partial 'Trash'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue