Browse Source

Make possible to configure relay_domains in postfix configuration

Emmanuel Bouthenot 11 years ago
parent
commit
c6b85e52d8
1 changed files with 9 additions and 2 deletions
  1. 9 2
      roles/common/templates/postfix/main.cf.j2

+ 9 - 2
roles/common/templates/postfix/main.cf.j2

@@ -57,8 +57,15 @@ mydestination = {{ ansible_fqdn }} {{ ansible_hostname }}
 alias_maps = hash:/etc/aliases
 alias_database = $alias_maps
 
-{% if smtp_relay is defined %}
-relayhost = {{ smtp_relay }}
+{% if smtp_relay_host is defined %}
+relayhost = {{ smtp_relay_host }}
+{% endif %}
+
+{% if smtp_relay_domains is defined %}
+relay_domains =
+{% for domain in smtp_relay_domains %}
+    {{ domain}}
+{% endfor %}
 {% endif %}
 
 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128