This commit is contained in:
Shelvacu
2025-02-01 14:35:50 -08:00
committed by Shelvacu on fw
parent 3645c84c83
commit b07213cee5
2 changed files with 8 additions and 6 deletions

View File

@@ -89,7 +89,7 @@ in
# mapFiles.sender_transport = pkgs.writeText "sender-transport" "@shelvacu.com relayservice";
mapFiles.sender_transport = pkgs.writeText "sender-transport" (mapLines (d: "@${d} relayservice") relayable_domains);
mapFiles.sender_relay = pkgs.writeText "sender-relay" ("@shelvacu.com ${relayhosts.allDomains} ${relayhosts.shelvacuAlt} \n" + (mapLines (d: "@${d} ${relayhosts.allDomains}") relayable_domains));
mapFiles.extra_login_maps = pkgs.writeText "extra-login-maps" "robot@vacu.store vacustore";
mapFiles.extra_login_maps = pkgs.writeText "extra-login-maps" ("robot@vacu.store vacustore\n" + config.services.postfix.virtual);
# verbatim appended to main.cf
extraConfig = ''
@@ -172,7 +172,7 @@ in
smtpd_sasl_type = "dovecot";
smtpd_sasl_path = "private/dovecot-auth";
message_size_limit = "100000000";
smtpd_sender_login_maps = "hash:/etc/postfix/extra_login_maps\\ hash:/etc/postfix/virtual";
smtpd_sender_login_maps = "hash:/etc/postfix/extra_login_maps";
smtpd_sender_restrictions = "reject_authenticated_sender_login_mismatch";
header_checks = "";

View File

@@ -220,6 +220,7 @@ in
liam.copy_from_host("${pkgs.writeText "acme-test" "test"}", "${
nodes.liam.security.acme.defaults.webroot + "/.well-known/acme-challenge/test"
}")
checker.wait_for_unit("network-online.target")
checker.succeed("wget http://liam.dis8.net/.well-known/acme-challenge/test")
liam.succeed("doveadm mailbox create -u shelvacu testFolder")
@@ -227,7 +228,12 @@ in
liam.wait_for_unit("dovecot2.service")
relay.wait_for_unit("mailpit.service")
# The order of these shouldn't matter, other than what fails first. Whatever is at the top is probably whatever I was working on most recently.
checks = """
--submission --mailfrom robot@vacu.store --rcptto someone@example.com --username vacustore --expect-mailpit-received --mailpit-url http://${nodes.relay.networking.primaryIPAddress}:8025
--submission --mailfrom foobar@vacu.store --rcptto someone@example.com --username vacustore --expect-refused
--submission --mailfrom abc@shelvacu.com --rcptto someone@example.com --username vacustore --expect-refused
# test refilter
--mailfrom whoeve2@example.com --rcptto sieve2est@shelvacu.com --username shelvacu --imap-move-to MagicRefilter --imap-dir com.shelvacu
# refilter doesnt activate on other folders
@@ -257,10 +263,6 @@ in
--rcptto superwow@shop.theviolincase.com --username julie
--rcptto roboman@vacu.store --username shelvacu
--submission --mailfrom robot@vacu.store --username vacustore --expect-mailpit-received --mailpit-url http://${nodes.relay.networking.primaryIPAddress}:8025
--submission --mailfrom foobar@vacu.store --username vacustore --expect-refused
--submission --mailfrom abc@shelvacu.com --username vacustore --expect-refused
--mailfrom bob@vacu.store --expect-refused
--mailfrom shelvacu@shelvacu.com --expect-refused
--mailfrom julie@shelvacu.com --expect-refused