From c340fd898c78d96ff69781af4388318c44537cf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Gaspard?= Date: Wed, 25 Dec 2024 19:29:34 +0100 Subject: [PATCH] nixos/opensmtpd: fix opensmtpd-rspamd test --- nixos/tests/opensmtpd-rspamd.nix | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/nixos/tests/opensmtpd-rspamd.nix b/nixos/tests/opensmtpd-rspamd.nix index 58b0e3b3414d..20f530f99b94 100644 --- a/nixos/tests/opensmtpd-rspamd.nix +++ b/nixos/tests/opensmtpd-rspamd.nix @@ -29,12 +29,8 @@ import ./make-test-python.nix { "${pkgs.dovecot}/libexec/dovecot/deliver -d %{user.username}" match from any for local action dovecot_deliver - action do_relay relay - # DO NOT DO THIS IN PRODUCTION! - # Setting up authentication requires a certificate which is painful in - # a test environment, but THIS WOULD BE DANGEROUS OUTSIDE OF A - # WELL-CONTROLLED ENVIRONMENT! - match from any for any action do_relay + action relay_smtp2 relay host "smtp://192.168.1.2" + match from any for any action relay_smtp2 ''; }; services.dovecot2 = { @@ -107,7 +103,7 @@ import ./make-test-python.nix { import smtplib, sys with smtplib.SMTP('192.168.1.1') as smtp: - smtp.sendmail('alice@[192.168.1.1]', 'bob@[192.168.1.2]', """ + smtp.sendmail('alice@smtp1', 'bob@smtp2', """ From: alice@smtp1 To: bob@smtp2 Subject: Test