From c522aaafde483a7c0127eab008b1274de8fd4fda Mon Sep 17 00:00:00 2001 From: Ryan Hendrickson Date: Mon, 23 Oct 2017 11:57:20 -0400 Subject: [PATCH] nixos/postfix: allow dollar parameters in lists (#30612) --- nixos/doc/manual/release-notes/rl-1803.xml | 8 +++++++- nixos/modules/services/mail/postfix.nix | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-1803.xml b/nixos/doc/manual/release-notes/rl-1803.xml index 47522fe3cc9..6fa14b55386 100644 --- a/nixos/doc/manual/release-notes/rl-1803.xml +++ b/nixos/doc/manual/release-notes/rl-1803.xml @@ -55,7 +55,13 @@ following incompatible changes: - + + Dollar signs in options under are + passed verbatim to Postfix, which will interpret them as the beginning of + a parameter expression. This was already true for string-valued options + in the previous release, but not for list-valued options. If you need to + pass literal dollar signs through Postfix, double them. + diff --git a/nixos/modules/services/mail/postfix.nix b/nixos/modules/services/mail/postfix.nix index ad4e5814984..2185484827d 100644 --- a/nixos/modules/services/mail/postfix.nix +++ b/nixos/modules/services/mail/postfix.nix @@ -28,7 +28,7 @@ let mainCf = let escape = replaceStrings ["$"] ["$$"]; - mkList = items: "\n " + concatMapStringsSep "\n " escape items; + mkList = items: "\n " + concatStringsSep "\n " items; mkVal = value: if isList value then mkList value else " " + (if value == true then "yes"