mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 11:45:45 +03:00
nixos/opensmtpd: fix opensmtpd-rspamd test
This commit is contained in:
parent
42c2634653
commit
c340fd898c
1 changed files with 3 additions and 7 deletions
|
@ -29,12 +29,8 @@ import ./make-test-python.nix {
|
||||||
"${pkgs.dovecot}/libexec/dovecot/deliver -d %{user.username}"
|
"${pkgs.dovecot}/libexec/dovecot/deliver -d %{user.username}"
|
||||||
match from any for local action dovecot_deliver
|
match from any for local action dovecot_deliver
|
||||||
|
|
||||||
action do_relay relay
|
action relay_smtp2 relay host "smtp://192.168.1.2"
|
||||||
# DO NOT DO THIS IN PRODUCTION!
|
match from any for any action relay_smtp2
|
||||||
# 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
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
services.dovecot2 = {
|
services.dovecot2 = {
|
||||||
|
@ -107,7 +103,7 @@ import ./make-test-python.nix {
|
||||||
import smtplib, sys
|
import smtplib, sys
|
||||||
|
|
||||||
with smtplib.SMTP('192.168.1.1') as smtp:
|
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
|
From: alice@smtp1
|
||||||
To: bob@smtp2
|
To: bob@smtp2
|
||||||
Subject: Test
|
Subject: Test
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue