summaryrefslogtreecommitdiffstats
path: root/roles/lists/templates/etc
diff options
context:
space:
mode:
Diffstat (limited to 'roles/lists/templates/etc')
-rw-r--r--roles/lists/templates/etc/postfix/main.cf.j24
1 files changed, 3 insertions, 1 deletions
diff --git a/roles/lists/templates/etc/postfix/main.cf.j2 b/roles/lists/templates/etc/postfix/main.cf.j2
index 933d540..07b27a6 100644
--- a/roles/lists/templates/etc/postfix/main.cf.j2
+++ b/roles/lists/templates/etc/postfix/main.cf.j2
@@ -19,7 +19,9 @@ append_dot_mydomain = no
mynetworks = 127.0.0.0/8, [::1]/128
{%- if groups.all | length > 1 -%}
- , {{ ipsec_subnet }}
+{%- for mx in groups.MX | sort -%}
+ , {{ ipsec[ hostvars[mx].inventory_hostname_short ] | ipaddr }}
+{%- endfor %}
{% endif %}
queue_directory = /var/spool/postfix-{{ postfix_instance[inst].name }}