From 63e85078cd3598c0c0141090667fa92b4d178c50 Mon Sep 17 00:00:00 2001
From: Jan Philipp Timme <jan.philipp@timme.it>
Date: Wed, 4 Dec 2019 15:32:41 +0100
Subject: [PATCH] Use pillar data for most important configuration part

---
 postfix/nullclient/etc/postfix/main.cf | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/postfix/nullclient/etc/postfix/main.cf b/postfix/nullclient/etc/postfix/main.cf
index 041d508..84cbb1e 100644
--- a/postfix/nullclient/etc/postfix/main.cf
+++ b/postfix/nullclient/etc/postfix/main.cf
@@ -1,5 +1,6 @@
 ### THIS FILE IS MANAGED BY SALT STATE `postfix.nullclient`
 ### YOUR CHANGES WILL BE OVERWRITTEN!
+{% set pillar = salt['pillar.get']('postfix:nullclient') %}
 {% set minion_id = grains['id'] %}
 # Set compatibility level
 compatibility_level = 2
@@ -29,12 +30,12 @@ smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
 myhostname = {{ minion_id }}
 
 # Forward emails for local users to this address for easy collection
-alias_maps = static:web-rootmails@hs-hannover.de
+alias_maps = static:{{ pillar['rootmail-destination'] }}
 alias_database =
 local_recipient_maps = unix:passwd.byname
 
 mydestination = {{ minion_id }}, localhost
-relayhost = smtp.hs-hannover.de
+relayhost = {{ pillar['relayhost'] }}
 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
 mailbox_command = procmail -a "$EXTENSION"
 mailbox_size_limit = 0
-- 
GitLab