diff --git a/postfix/templates/main.cf.j2 b/postfix/templates/main.cf.j2 index 6acc3c927c88a6ba701546ae71811ab43f3c097b..5d9800c17bde4f85702c18086e337a1438e34e53 100644 --- a/postfix/templates/main.cf.j2 +++ b/postfix/templates/main.cf.j2 @@ -1,7 +1,7 @@ # See /usr/share/postfix/main.cf.dist for a commented, more complete version inet_interfaces = {{ "loopback-only" if postfix_satellite_only else "all" }} -inet_protocols = all +inet_protocols = {{ "all" if not postfix_fsmpi|default(false) else "ipv4" }} myhostname = {{ ansible_fqdn }} myorigin = /etc/mailname mydestination = $myhostname localhost {{ postfix_domains | join(" ") }} @@ -104,7 +104,7 @@ tls_ssl_options = NO_COMPRESSION alias_maps = {{ postfix_alias_maps|join(" ") }} alias_database = cdb:/etc/aliases -{% if virtual_aliases|default([])|count > 0 or postfix_virtual_domains|count > 0 %} +{% if virtual_aliases|default([])|count > 0 or postfix_virtual_alias_maps != ['cdb:/etc/postfix/virtual'] %} virtual_alias_maps = {{ postfix_virtual_alias_maps|join(" ") }} {% endif %}