1
0
mirror of https://github.com/docker-mailserver/docker-mailserver.git synced 2025-08-07 23:03:10 +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:
Georg Lauterbach
2024-01-03 01:17:54 +01:00
committed by GitHub
parent 0889b0ff06
commit 9e81517fe3
119 changed files with 355 additions and 455 deletions

View File

@ -21,7 +21,8 @@ function setup_file() {
function teardown_file() { _default_teardown ; }
@test '(Dovecot) LDAP RIMAP connection and authentication works' {
_send_email 'auth/imap-auth' '-w 1 0.0.0.0 143'
_nc_wrapper 'auth/imap-auth' '-w 1 0.0.0.0 143'
assert_success
}
@test '(SASLauthd) SASL RIMAP authentication works' {
@ -30,13 +31,30 @@ function teardown_file() { _default_teardown ; }
}
@test '(SASLauthd) RIMAP SMTP authentication works' {
_send_email 'auth/smtp-auth-login' '-w 5 0.0.0.0 25'
assert_output --partial 'Error: authentication not enabled'
_send_email \
--auth LOGIN \
--auth-user user1@localhost.localdomain \
--auth-password mypassword \
--quit-after AUTH
assert_failure
assert_output --partial 'Host did not advertise authentication'
_send_email 'auth/smtp-auth-login' '-w 5 0.0.0.0 465'
_send_email \
--port 465 \
--auth LOGIN \
--auth-user user1@localhost.localdomain \
--auth-password mypassword \
--quit-after AUTH
assert_success
assert_output --partial 'Authentication successful'
_send_email 'auth/smtp-auth-login' '-w 5 0.0.0.0 587'
_send_email \
--port 587 \
--auth LOGIN \
--auth-user user1@localhost.localdomain \
--auth-password mypassword \
--quit-after AUTH
assert_success
assert_output --partial 'Authentication successful'
}