Optionally add the hostname to the virtual_domains table

This commit is contained in:
Andrea Dell'Amico 2020-09-28 18:32:09 +02:00
parent eb904bf219
commit 1ef6d31abd
2 changed files with 4 additions and 0 deletions

View File

@ -165,6 +165,7 @@ postfix_alias_maps:
postfix_alias_databases: '{{ postfix_alias_maps }}'
postfix_virtual_addresses: False
postfix_hostname_as_virtual_domain: True
postfix_virtual_mailbox_domains: 'hash:/etc/postfix/virtual_domains'
postfix_virtual_mailbox_domains_data: []
#

View File

@ -6,6 +6,9 @@
{% for dom in postfix_virtual_mailbox_domains_data %}
{{ dom.domain }} OK
{% endfor %}
{% if postfix_hostname_as_virtual_domain %}
{{ ansible_fqdn }} OK
{% endif %}
{% else %}
localdomain OK
{% endif %}