nixos/postfix: allow dollar parameters in lists (#30612)

This commit is contained in:
Ryan Hendrickson 2017-10-23 11:57:20 -04:00 committed by Joachim Schiele
parent 48d2b58417
commit c522aaafde
2 changed files with 8 additions and 2 deletions

View File

@ -55,7 +55,13 @@ following incompatible changes:</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para></para> <para>
Dollar signs in options under <option>services.postfix</option> 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.
</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>

View File

@ -28,7 +28,7 @@ let
mainCf = let mainCf = let
escape = replaceStrings ["$"] ["$$"]; escape = replaceStrings ["$"] ["$$"];
mkList = items: "\n " + concatMapStringsSep "\n " escape items; mkList = items: "\n " + concatStringsSep "\n " items;
mkVal = value: mkVal = value:
if isList value then mkList value if isList value then mkList value
else " " + (if value == true then "yes" else " " + (if value == true then "yes"