Browse Source

postfix: Use globals:ops_mail as root mail address.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Maximilian Wilhelm 5 years ago
parent
commit
f9f29f50dc
2 changed files with 5 additions and 2 deletions
  1. 1 1
      postfix/aliases
  2. 4 1
      postfix/init.sls

+ 1 - 1
postfix/aliases

@@ -12,4 +12,4 @@ abuse: root
 noc: root
 security: root
 
-root: ops@ffho.net
+root: {{ root_mail_address }}

+ 4 - 1
postfix/init.sls

@@ -38,12 +38,15 @@ postfix:
       - service: postfix
 
 #
-# Send root mail to ops@ffho.net
+# Send root mail to pillar <globals:ops_mail>
 /etc/aliases:
   file.managed:
     - source:
       - salt://postfix/aliases.{{ grains['id'] }}
       - salt://postfix/aliases
+    - template: jinja
+    - context:
+      root_mail_address: {{ salt['pillar.get']('globals:ops_mail') }}
 
 newaliases:
   cmd.wait: