From af32ce30bcfb53d1e4ca99b4ccb795ffbb15eddf Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Sat, 25 Jan 2020 13:58:26 +0100 Subject: [PATCH] Change the way we enable the local recipient maps. --- library/roles/postfix/templates/main.cf.j2 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/library/roles/postfix/templates/main.cf.j2 b/library/roles/postfix/templates/main.cf.j2 index d4db78f..8d17720 100644 --- a/library/roles/postfix/templates/main.cf.j2 +++ b/library/roles/postfix/templates/main.cf.j2 @@ -177,8 +177,10 @@ mydestination = {{ ansible_fqdn }}, localhost # #local_recipient_maps = unix:passwd.byname $alias_maps #local_recipient_maps = proxy:unix:passwd.byname $alias_maps -{% if not postfix_local_recipients %} +{% if postfix_virtual_transport_enabled %} local_recipient_maps = +{% elif not postfix_local_recipients %} +#local_recipient_maps = {% endif %} # The unknown_local_recipient_reject_code specifies the SMTP server @@ -347,6 +349,7 @@ relayhost = {{ postfix_relay_host }}:{{ postfix_relay_port }} transport_maps = {% for tmap in postfix_transport_maps %}{{ tmap }}{% if not loop.last %}, {% endif %}{% endfor %} {% endif %} + # ALIAS DATABASE # # The alias_maps parameter specifies the list of alias databases used @@ -490,7 +493,7 @@ virtual_mailbox_maps = {% for mbmap in postfix_virtual_mailbox_maps %}{{ mbmap } {% endif %} {% if postfix_virtual_domains %} -virtual_alias_domains = = {{ postfix_virtual_alias_domains }} +virtual_alias_domains = {{ postfix_virtual_alias_domains }} {% endif %} {% if postfix_virtual_addresses %} virtual_alias_maps = {% for mbmap in postfix_virtual_alias_maps %}{{ mbmap }} {% endfor %}