Explorar o código

Make possible to add extra mynetworks in postfix configuration

Emmanuel Bouthenot %!s(int64=10) %!d(string=hai) anos
pai
achega
858f7a95d6
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      roles/common/templates/postfix/main.cf.j2

+ 3 - 3
roles/common/templates/postfix/main.cf.j2

@@ -57,9 +57,9 @@ mydestination = {{ ansible_fqdn }} {{ ansible_hostname }}
 alias_maps = hash:/etc/aliases
 alias_database = $alias_maps
 
-{% if smtp_relay_host is defined %}
+{% if smtp_relay_host is defined -%}
 relayhost = {{ smtp_relay_host }}
-{% endif %}
+{%- endif %}
 
 {% if smtp_relay_domains is defined %}
 relay_domains =
@@ -68,7 +68,7 @@ relay_domains =
 {% endfor %}
 {% endif %}
 
-mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
+mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 {% if postfix_mynetworks is defined %}{{ postfix_mynetworks }}{% endif %}
 
 mailbox_command = procmail -a "$EXTENSION"
 mailbox_size_limit = 0