tests: also test client submission over smtps://
instead of just smtp:// with STARTTLS. Opted to call the flag --ssl and not --tls to keep it consistent with the module option (mailserver.enableSubmissionSsl), dovecot internals and smtplib in mail-check.py.
This commit is contained in:
parent
958c112fba
commit
63b8e1615f
4 changed files with 33 additions and 21 deletions
|
@ -116,7 +116,7 @@ in
|
|||
|
||||
# Regression test for https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/issues/205
|
||||
with subtest("mail forwarded can are locally kept"):
|
||||
# A mail sent to user2@example.com is in the user1@example.com mailbox
|
||||
# A mail sent to user2@example.com via explicit TLS is in the user1@example.com mailbox
|
||||
machine.succeed(
|
||||
" ".join(
|
||||
[
|
||||
|
@ -134,13 +134,13 @@ in
|
|||
]
|
||||
)
|
||||
)
|
||||
# A mail sent to user2@example.com is in the user2@example.com mailbox
|
||||
# A mail sent to user2@example.com via implicit TLS is in the user2@example.com mailbox
|
||||
machine.succeed(
|
||||
" ".join(
|
||||
[
|
||||
"mail-check send-and-read",
|
||||
"--smtp-port 587",
|
||||
"--smtp-starttls",
|
||||
"--smtp-port 465",
|
||||
"--smtp-ssl",
|
||||
"--smtp-host localhost",
|
||||
"--imap-host localhost",
|
||||
"--imap-username user2@example.com",
|
||||
|
@ -154,7 +154,7 @@ in
|
|||
)
|
||||
|
||||
with subtest("regex email alias are received"):
|
||||
# A mail sent to user2-regex-alias@domain.com is in the user2@example.com mailbox
|
||||
# A mail sent to user2-regex-alias@domain.com via explicit TLS is in the user2@example.com mailbox
|
||||
machine.succeed(
|
||||
" ".join(
|
||||
[
|
||||
|
@ -174,13 +174,14 @@ in
|
|||
)
|
||||
|
||||
with subtest("user can send from regex email alias"):
|
||||
# A mail sent from user2-regex-alias@domain.com, using user2@example.com credentials is received
|
||||
# A mail sent to user1@example.com from user2-regex-alias@domain.com by
|
||||
# user2@example.com via implicit TLS is in the user1@example.com mailbox
|
||||
machine.succeed(
|
||||
" ".join(
|
||||
[
|
||||
"mail-check send-and-read",
|
||||
"--smtp-port 587",
|
||||
"--smtp-starttls",
|
||||
"--smtp-port 465",
|
||||
"--smtp-ssl",
|
||||
"--smtp-host localhost",
|
||||
"--imap-host localhost",
|
||||
"--smtp-username user2@example.com",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue