From ea20d60ec13dea82f29269f7227a6241a4baa08d Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Thu, 22 Feb 2018 23:12:39 +0100 Subject: [PATCH 1/3] possible fix for #86 --- mail-server/users.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mail-server/users.nix b/mail-server/users.nix index ef7d137..f335330 100644 --- a/mail-server/users.nix +++ b/mail-server/users.nix @@ -47,13 +47,13 @@ let if lib.isString sieveScript then '' if (! test -d "/var/sieve/${name}"); then mkdir -p "/var/sieve/${name}" - chown "${name}:${vmailGroupName}" "/var/sieve/${name}" + chown "${vmailUserName}:${vmailGroupName}" "/var/sieve/${name}" chmod 770 "/var/sieve/${name}" fi cat << 'EOF' > "/var/sieve/${name}/default.sieve" ${sieveScript} EOF - chown "${name}:${vmailGroupName}" "/var/sieve/${name}/default.sieve" + chown "${vmailUserName}:${vmailGroupName}" "/var/sieve/${name}/default.sieve" '' else '' if (test -f "/var/sieve/${name}/default.sieve"); then rm "/var/sieve/${name}/default.sieve" From a3043b224226f5fd1694c2fdd76379ffbbf13363 Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Fri, 23 Feb 2018 14:52:11 +0100 Subject: [PATCH 2/3] fixes #87 --- mail-server/postfix.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail-server/postfix.nix b/mail-server/postfix.nix index 6a6395a..c859a49 100644 --- a/mail-server/postfix.nix +++ b/mail-server/postfix.nix @@ -125,7 +125,7 @@ in smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination # quota - smtpd_recipient_restrictions = check_policy_service inet:mailstore.example.com:12340 + smtpd_recipient_restrictions = check_policy_service inet:localhost:12340 # TLS settings, inspired by https://github.com/jeaye/nix-files # Submission by mail clients is handled in submissionOptions From 5d169c3ef29fcff2951b107a9fd2bd9e7b16c2fe Mon Sep 17 00:00:00 2001 From: Robin Raymond Date: Fri, 23 Feb 2018 14:56:28 +0100 Subject: [PATCH 3/3] fixes #88 --- mail-server/systemd.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mail-server/systemd.nix b/mail-server/systemd.nix index a59e8ce..e009f44 100644 --- a/mail-server/systemd.nix +++ b/mail-server/systemd.nix @@ -41,9 +41,13 @@ let createDhParameterFile = '' # Create a dh parameter file - ${pkgs.openssl}/bin/openssl \ - dhparam ${builtins.toString cfg.dhParamBitLength} \ - > "${cfg.certificateDirectory}/dh.pem" + if [ ! -f "''${cfg.certificateDirectory}/dh.pem" ] + then + mkdir -p "${cfg.certificateDirectory}" + ${pkgs.openssl}/bin/openssl \ + dhparam ${builtins.toString cfg.dhParamBitLength} \ + > "${cfg.certificateDirectory}/dh.pem" + fi ''; createDomainDkimCert = dom: