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
|
@ -157,7 +157,7 @@ in
|
|||
machine.succeed("ls -l /run/postfix/*.cf | grep -e '-rw------- 1 root root'")
|
||||
machine.succeed("ls -l /run/dovecot2/dovecot-ldap.conf.ext | grep -e '-rw------- 1 root root'")
|
||||
|
||||
with subtest("Test account/mail address binding"):
|
||||
with subtest("Test account/mail address binding via explicit TLS"):
|
||||
machine.fail(" ".join([
|
||||
"mail-check send-and-read",
|
||||
"--smtp-port 587",
|
||||
|
@ -174,11 +174,11 @@ in
|
|||
]))
|
||||
machine.succeed("journalctl -u postfix | grep -q 'Sender address rejected: not owned by user alice@example.com'")
|
||||
|
||||
with subtest("Test mail delivery"):
|
||||
with subtest("Test mail delivery via implicit TLS"):
|
||||
machine.succeed(" ".join([
|
||||
"mail-check send-and-read",
|
||||
"--smtp-port 587",
|
||||
"--smtp-starttls",
|
||||
"--smtp-port 465",
|
||||
"--smtp-ssl",
|
||||
"--smtp-host localhost",
|
||||
"--smtp-username alice@example.com",
|
||||
"--imap-host localhost",
|
||||
|
@ -190,7 +190,7 @@ in
|
|||
"--ignore-dkim-spf"
|
||||
]))
|
||||
|
||||
with subtest("Test mail forwarding works"):
|
||||
with subtest("Test mail forwarding via explicit TLS works"):
|
||||
machine.succeed(" ".join([
|
||||
"mail-check send-and-read",
|
||||
"--smtp-port 587",
|
||||
|
@ -206,11 +206,11 @@ in
|
|||
"--ignore-dkim-spf"
|
||||
]))
|
||||
|
||||
with subtest("Test cannot send mail from forwarded address"):
|
||||
with subtest("Test cannot send mail via implicit TLS from forwarded address"):
|
||||
machine.fail(" ".join([
|
||||
"mail-check send-and-read",
|
||||
"--smtp-port 587",
|
||||
"--smtp-starttls",
|
||||
"--smtp-port 465",
|
||||
"--smtp-ssl",
|
||||
"--smtp-host localhost",
|
||||
"--smtp-username bob@example.com",
|
||||
"--imap-host localhost",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue