From 1b5a1c697da8269ea49249461ced87662d120924 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 1 Aug 2020 23:20:32 +0200 Subject: [PATCH 1/2] nixos/tests/postfix: migrate test to use tlsTrustedAuthorities Fixes: 632104e ("postfix: deprecated `sslCACert` in favour of `tlsTrustedAuthorities`") --- nixos/tests/postfix.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/postfix.nix b/nixos/tests/postfix.nix index 37ae76afec1..29e263cd7e7 100644 --- a/nixos/tests/postfix.nix +++ b/nixos/tests/postfix.nix @@ -11,7 +11,7 @@ import ./make-test-python.nix { enable = true; enableSubmission = true; enableSubmissions = true; - sslCACert = certs.ca.cert; + tlsTrustedAuthorities = certs.ca.cert; sslCert = certs.${domain}.cert; sslKey = certs.${domain}.key; submissionsOptions = { From 9309563332a0a8a03447b8a5f1602ffb88b2f7ac Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 2 Aug 2020 03:46:09 +0200 Subject: [PATCH 2/2] postfix: add passthru tests --- nixos/tests/postfix.nix | 6 +++--- pkgs/servers/mail/postfix/default.nix | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nixos/tests/postfix.nix b/nixos/tests/postfix.nix index 29e263cd7e7..6d22b4edba0 100644 --- a/nixos/tests/postfix.nix +++ b/nixos/tests/postfix.nix @@ -11,9 +11,9 @@ import ./make-test-python.nix { enable = true; enableSubmission = true; enableSubmissions = true; - tlsTrustedAuthorities = certs.ca.cert; - sslCert = certs.${domain}.cert; - sslKey = certs.${domain}.key; + tlsTrustedAuthorities = "${certs.ca.cert}"; + sslCert = "${certs.${domain}.cert}"; + sslKey = "${certs.${domain}.key}"; submissionsOptions = { smtpd_sasl_auth_enable = "yes"; smtpd_client_restrictions = "permit"; diff --git a/pkgs/servers/mail/postfix/default.nix b/pkgs/servers/mail/postfix/default.nix index 9aee89db9b7..a4346bdbd2b 100644 --- a/pkgs/servers/mail/postfix/default.nix +++ b/pkgs/servers/mail/postfix/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchurl, makeWrapper, gnused, db, openssl, cyrus_sasl, libnsl , coreutils, findutils, gnugrep, gawk, icu, pcre, m4 -, buildPackages +, buildPackages, nixosTests , withLDAP ? true, openldap , withPgSQL ? false, postgresql , withMySQL ? false, libmysqlclient @@ -96,6 +96,8 @@ in stdenv.mkDerivation rec { --prefix PATH ":" ${lib.makeBinPath [ coreutils findutils gnugrep gawk gnused ]} ''; + passthru.tests = { inherit (nixosTests) postfix postfix-raise-smtpd-tls-security-level; }; + meta = with lib; { homepage = "http://www.postfix.org/"; description = "A fast, easy to administer, and secure mail server";