From f209fa3bf3425405b945cc3b336d204d6fbcbf02 Mon Sep 17 00:00:00 2001 From: Brian Olsen Date: Sat, 12 May 2018 18:00:14 +0200 Subject: [PATCH] postfix: use masterConfig option instead of extraMasterConf extraMasterConf is just a string while masterConfig is a nix module so the options are more explicit and has help text. --- mail-server/postfix.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/mail-server/postfix.nix b/mail-server/postfix.nix index aad87bb..30f92ec 100644 --- a/mail-server/postfix.nix +++ b/mail-server/postfix.nix @@ -183,11 +183,16 @@ in smtpd_recipient_restrictions = "reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject"; cleanup_service_name = "submission-header-cleanup"; }; - - extraMasterConf = '' - submission-header-cleanup unix n - n - 0 cleanup - -o header_checks=pcre:${submissionHeaderCleanupRules} - ''; + masterConfig = { + "submission-header-cleanup" = { + type = "unix"; + private = false; + chroot = false; + maxproc = 0; + command = "cleanup"; + args = ["-o" "header_checks=pcre:${submissionHeaderCleanupRules}"]; + }; + }; }; }; }