ソースを参照

Set postfix mailname to node_id if not specified otherwise in node pillar

  nodes:<node_id>:mailname might be used to overwrite the mailname.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Maximilian Wilhelm 7 年 前
コミット
ffac73c2cc
1 ファイル変更3 行追加2 行削除
  1. 3 2
      postfix/init.sls

+ 3 - 2
postfix/init.sls

@@ -42,7 +42,8 @@ newaliases:
       - file: /etc/aliases
 
 
-# Set mailname for xxx.paderborn.freifunk.net (FIXME)
+# Set mailname to node_id if not specified otherwise in node pillar.
+{% set mailname = salt['pillar.get']('nodes:' ~ grains['id'] ~ ':mailname', grains['id']) %}
 /etc/mailname:
   file.managed:
-    - contents: "{{ grains.nodename }}.paderborn.freifunk.net"
+    - contents: "{{ mailname }}"