From 7a107269d47214e9d8b52accfd309f7ab722e5e8 Mon Sep 17 00:00:00 2001
From: Lars Beckers <lars.beckers@rwth-aachen.de>
Date: Tue, 4 May 2021 13:55:00 +0200
Subject: [PATCH] postfix: fix fsmpi special caseing

---
 postfix/templates/main.cf.j2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/postfix/templates/main.cf.j2 b/postfix/templates/main.cf.j2
index 6acc3c9..5d9800c 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 %}
 
-- 
GitLab