nixos/opensmtpd: run nixfmt as requested by ci
This commit is contained in:
parent
fb4ff06a4b
commit
69a8aba113
@ -113,11 +113,13 @@ in
|
|||||||
source = "${cfg.package}/bin/smtpctl";
|
source = "${cfg.package}/bin/smtpctl";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.mail.sendmailSetuidWrapper = lib.mkIf cfg.setSendmail
|
services.mail.sendmailSetuidWrapper = lib.mkIf cfg.setSendmail (
|
||||||
(security.wrappers.smtpctl // {
|
security.wrappers.smtpctl
|
||||||
|
// {
|
||||||
source = "${sendmail}/bin/sendmail";
|
source = "${sendmail}/bin/sendmail";
|
||||||
program = "sendmail";
|
program = "sendmail";
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d /var/spool/smtpd 711 root - - -"
|
"d /var/spool/smtpd 711 root - - -"
|
||||||
|
@ -16,24 +16,26 @@ import ./make-test-python.nix {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
environment.systemPackages = let
|
environment.systemPackages =
|
||||||
testSendmail = pkgs.writeScriptBin "test-sendmail" ''
|
let
|
||||||
#!/bin/sh
|
testSendmail = pkgs.writeScriptBin "test-sendmail" ''
|
||||||
set -euxo pipefail
|
#!/bin/sh
|
||||||
echo "========= SENDING" >&2
|
set -euxo pipefail
|
||||||
${pkgs.system-sendmail}/bin/sendmail -v -f alice@smtp1 bob@smtp2 >&2 <<EOF
|
echo "========= SENDING" >&2
|
||||||
From: alice@smtp1
|
${pkgs.system-sendmail}/bin/sendmail -v -f alice@smtp1 bob@smtp2 >&2 <<EOF
|
||||||
To: bob@smtp2
|
From: alice@smtp1
|
||||||
Subject: Sendmail Test
|
To: bob@smtp2
|
||||||
|
Subject: Sendmail Test
|
||||||
|
|
||||||
Hello World
|
Hello World
|
||||||
EOF
|
EOF
|
||||||
echo "=========== FINISHED SENDING" >&2
|
echo "=========== FINISHED SENDING" >&2
|
||||||
'';
|
'';
|
||||||
in [
|
in
|
||||||
pkgs.opensmtpd
|
[
|
||||||
testSendmail
|
pkgs.opensmtpd
|
||||||
];
|
testSendmail
|
||||||
|
];
|
||||||
services.opensmtpd = {
|
services.opensmtpd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraServerArgs = [ "-v" ];
|
extraServerArgs = [ "-v" ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user