remove `existing/*`
These e-mails are mostly trivial in `swaks`, and we do not need extra files here.
This commit is contained in:
parent
0b93d61e10
commit
2125e41a60
|
@ -1,5 +0,0 @@
|
|||
From: Docker Mail Server <dockermailserver@external.tld>
|
||||
To: Existing Local User <added@localhost.localdomain>
|
||||
Date: Sat, 22 May 2010 07:43:25 -0400
|
||||
Subject: Test Message existing-added.txt
|
||||
This is a test mail.
|
|
@ -1,5 +0,0 @@
|
|||
From: Docker Mail Server <dockermailserver@external.tld>
|
||||
To: Existing Local User <alias1@localhost.localdomain>
|
||||
Date: Sat, 22 May 2010 07:43:25 -0400
|
||||
Subject: Test Message existing-alias-external.txt
|
||||
This is a test mail.
|
|
@ -1,5 +0,0 @@
|
|||
From: Docker Mail Server <dockermailserver@external.tld>
|
||||
To: Existing Local Alias <alias2@localhost.localdomain>
|
||||
Date: Sat, 22 May 2010 07:43:25 -0400
|
||||
Subject: Test Message existing-alias-local.txt
|
||||
This is a test mail.
|
|
@ -1,5 +0,0 @@
|
|||
From: Docker Mail Server <dockermailserver@external.tld>
|
||||
To: Existing Local Alias With Delimiter <alias1+test@localhost.localdomain>
|
||||
Date: Sat, 22 May 2010 07:43:25 -0400
|
||||
Subject: Test Message existing-alias-recipient-delimiter.txt
|
||||
This is a test mail.
|
|
@ -1,5 +0,0 @@
|
|||
From: Docker Mail Server <dockermailserver@external.tld>
|
||||
To: Existing Local User <wildcard@localdomain2.com>
|
||||
Date: Sat, 22 May 2010 07:43:25 -0400
|
||||
Subject: Test Message existing-catchall-local.txt
|
||||
This is a test mail.
|
|
@ -1,5 +0,0 @@
|
|||
From: Docker Mail Server <dockermailserver@external.tld>
|
||||
To: Existing Local User <bounce-always@localhost.localdomain>
|
||||
Date: Sat, 22 May 2010 07:43:25 -0400
|
||||
Subject: Test Message existing-regexp-alias-external.txt
|
||||
This is a test mail.
|
|
@ -1,5 +0,0 @@
|
|||
From: Docker Mail Server <dockermailserver@external.tld>
|
||||
To: Existing Local User <test123@localhost.localdomain>
|
||||
Date: Sat, 22 May 2010 07:43:25 -0400
|
||||
Subject: Test Message existing-regexp-alias-local.txt
|
||||
This is a test mail.
|
|
@ -1,6 +0,0 @@
|
|||
From: Docker Mail Server <dockermailserver@external.tld>
|
||||
To: Existing Local User <user1@localhost.localdomain>
|
||||
Cc: Existing Local Alias <alias2@localhost.localdomain>
|
||||
Date: Sat, 22 May 2010 07:43:25 -0400
|
||||
Subject: Test Message existing-user-and-cc-local-alias.txt
|
||||
This is a test mail.
|
|
@ -1,5 +0,0 @@
|
|||
From: Docker Mail Server <dockermailserver@external.tld>
|
||||
To: Existing Local User <user1@localhost.localdomain>
|
||||
Date: Sat, 22 May 2010 07:43:25 -0400
|
||||
Subject: Test Message existing-user1.txt
|
||||
This is a test mail.
|
|
@ -1,5 +0,0 @@
|
|||
From: Docker Mail Server <dockermailserver@external.tld>
|
||||
To: Existing Local User <user1@localhost.localdomain>
|
||||
Date: Sat, 22 May 2010 07:43:25 -0400
|
||||
Subject: Test Message non-existing-user.txt
|
||||
This is a test mail.
|
|
@ -26,7 +26,7 @@ function teardown() { _default_teardown ; }
|
|||
_common_container_setup 'CUSTOM_SETUP_ARGUMENTS'
|
||||
_wait_for_smtp_port_in_container
|
||||
|
||||
_send_email --data 'existing/user1.txt'
|
||||
_send_email
|
||||
_wait_for_empty_mail_queue_in_container
|
||||
|
||||
# Mail received should be stored as `u.1` (one file per message)
|
||||
|
@ -47,7 +47,7 @@ function teardown() { _default_teardown ; }
|
|||
_common_container_setup 'CUSTOM_SETUP_ARGUMENTS'
|
||||
_wait_for_smtp_port_in_container
|
||||
|
||||
_send_email --data 'existing/user1.txt'
|
||||
_send_email
|
||||
_wait_for_empty_mail_queue_in_container
|
||||
|
||||
# Mail received should be stored in `m.1` (1 or more messages)
|
||||
|
|
|
@ -14,7 +14,7 @@ function setup_file() {
|
|||
function teardown_file() { _default_teardown ; }
|
||||
|
||||
@test 'normal delivery works' {
|
||||
_send_email --data 'existing/user1.txt'
|
||||
_send_email
|
||||
_count_files_in_directory_in_container /var/mail/localhost.localdomain/user1/new 1
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ function setup_file() {
|
|||
_common_container_setup 'CUSTOM_SETUP_ARGUMENTS'
|
||||
_wait_for_smtp_port_in_container
|
||||
|
||||
_send_email --data 'existing/user1.txt'
|
||||
_send_email
|
||||
_wait_for_empty_mail_queue_in_container
|
||||
}
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ function _should_have_correct_mail_headers() {
|
|||
# (eg: OVERRIDE_HOSTNAME or `--hostname mail --domainname example.test`)
|
||||
local EXPECTED_HOSTNAME=${3:-${EXPECTED_FQDN}}
|
||||
|
||||
_send_email --from 'user@external.tld' --data 'existing/user1.txt'
|
||||
_send_email --from 'user@external.tld'
|
||||
_wait_for_empty_mail_queue_in_container
|
||||
_count_files_in_directory_in_container '/var/mail/localhost.localdomain/user1/new/' '1'
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ function teardown_file() { _default_teardown ; }
|
|||
|
||||
@test "delivers mail to existing account" {
|
||||
_wait_for_smtp_port_in_container
|
||||
_send_email --data 'existing/user1.txt' # send a test email
|
||||
_send_email
|
||||
|
||||
# Verify delivery was successful, log line should look similar to:
|
||||
# postfix/lmtp[1274]: 0EA424ABE7D9: to=<user1@localhost.localdomain>, relay=127.0.0.1[127.0.0.1]:24, delay=0.13, delays=0.07/0.01/0.01/0.05, dsn=2.0.0, status=sent (250 2.0.0 <user1@localhost.localdomain> ixPpB+Zvv2P7BAAAUi6ngw Saved)
|
||||
|
|
|
@ -66,29 +66,29 @@ function setup_file() {
|
|||
# _send_email --from 'virus@external.tld' --data 'amavis/virus.txt'
|
||||
|
||||
# Required for 'delivers mail to existing alias':
|
||||
_send_email --to alias1@localhost.localdomain --data 'existing/alias-external.txt'
|
||||
_send_email --to alias1@localhost.localdomain --header "Subject: Test Message existing-alias-external"
|
||||
# Required for 'delivers mail to existing alias with recipient delimiter':
|
||||
_send_email --to alias1~test@localhost.localdomain --data 'existing/alias-recipient-delimiter.txt'
|
||||
_send_email --to alias1~test@localhost.localdomain --header 'Subject: Test Message existing-alias-recipient-delimiter'
|
||||
# Required for 'delivers mail to existing catchall':
|
||||
_send_email --to wildcard@localdomain2.com --data 'existing/catchall-local.txt'
|
||||
_send_email --to wildcard@localdomain2.com --header 'Subject: Test Message existing-catchall-local'
|
||||
# Required for 'delivers mail to regexp alias':
|
||||
_send_email --to test123@localhost.localdomain --data 'existing/regexp-alias-local.txt'
|
||||
_send_email --to test123@localhost.localdomain --header 'Subject: Test Message existing-regexp-alias-local'
|
||||
|
||||
# Required for 'rejects mail to unknown user':
|
||||
_send_email_unchecked --to nouser@localhost.localdomain --data 'non-existing-user.txt'
|
||||
_send_email_unchecked --to nouser@localhost.localdomain
|
||||
assert_failure
|
||||
# Required for 'redirects mail to external aliases':
|
||||
_send_email --to bounce-always@localhost.localdomain --data 'existing/regexp-alias-external.txt'
|
||||
_send_email --to alias2@localhost.localdomain --data 'existing/alias-local.txt'
|
||||
_send_email --to bounce-always@localhost.localdomain
|
||||
_send_email --to alias2@localhost.localdomain
|
||||
# Required for 'rejects spam':
|
||||
_send_email --from 'spam@external.tld' --data 'amavis/spam.txt'
|
||||
|
||||
# Required for 'delivers mail to existing account':
|
||||
_send_email --data 'existing/user1.txt'
|
||||
_send_email --header 'Subject: Test Message existing-user1'
|
||||
_send_email --to user2@otherdomain.tld
|
||||
_send_email --to user3@localhost.localdomain
|
||||
_send_email --to added@localhost.localdomain --data 'existing/added.txt'
|
||||
_send_email --to user1@localhost.localdomain --data 'existing/user-and-cc-local-alias.txt'
|
||||
_send_email --to added@localhost.localdomain --header 'Subject: Test Message existing-added'
|
||||
_send_email --to user1@localhost.localdomain --header 'Subject: Test Message existing-user-and-cc-local-alias'
|
||||
_send_email --data 'sieve/spam-folder.txt'
|
||||
_send_email --to user2@otherdomain.tld --data 'sieve/pipe.txt'
|
||||
_run_in_container_bash 'sendmail root < /tmp/docker-mailserver-test/emails/sendmail/root-email.txt'
|
||||
|
|
|
@ -20,7 +20,7 @@ function setup_file() {
|
|||
function teardown_file() { _default_teardown ; }
|
||||
|
||||
@test 'should successfully deliver mail' {
|
||||
_send_email --data 'existing/user1.txt'
|
||||
_send_email --header 'Subject: Test Message existing-user1'
|
||||
_wait_for_empty_mail_queue_in_container
|
||||
|
||||
# Should be successfully sent (received) by Postfix:
|
||||
|
@ -31,7 +31,7 @@ function teardown_file() { _default_teardown ; }
|
|||
|
||||
# Verify successful delivery via Dovecot to `/var/mail` account by searching for the subject:
|
||||
_repeat_in_container_until_success_or_timeout 20 "${CONTAINER_NAME}" grep -R \
|
||||
'Subject: Test Message existing-user1.txt' \
|
||||
'Subject: Test Message existing-user1' \
|
||||
'/var/mail/localhost.localdomain/user1/new/'
|
||||
assert_success
|
||||
_should_output_number_of_lines 1
|
||||
|
|
Loading…
Reference in New Issue