diff --git a/tests/basic.nix b/tests/basic.nix index 70bd13f..cdee2ad 100644 --- a/tests/basic.nix +++ b/tests/basic.nix @@ -82,6 +82,19 @@ in I'm pretending to be someotheraddress@example.com and the mailserver should reject this attempt. ''}") + with subtest("send succeeds for system user"): + client.succeed("${sendMail "system" "" accounts."normal".address '' + Subject: Testmail2 + + Hello User1, + this is some text! + ''}") + # give the mail server some time to process the mail + server.wait_until_fails('${pendingPostqueue}') + + with subtest("mail can be retrieved via imap"): + client.succeed("${recvMail "normal"} >&2") + with subtest("mail sent to system-account is rejected"): client.fail("${sendMail "normal" "someotheraddress@example.com" accounts."system".address '' Subject: Mail to system-account