From: Ralf Jung Date: Sat, 16 Jun 2018 18:15:22 +0000 (+0200) Subject: postfix: permit adding more domains to virtual_mailbox_domains X-Git-Url: https://git.ralfj.de/ansible.git/commitdiff_plain/e77c174c33c18df68635dbe6a8ec5686dd6176d8?ds=inline postfix: permit adding more domains to virtual_mailbox_domains --- diff --git a/host_vars/template.yml b/host_vars/template.yml index 6b9c4c7..142e408 100644 --- a/host_vars/template.yml +++ b/host_vars/template.yml @@ -14,6 +14,8 @@ postfix: submission: True # optional: From which IPs to accept mail. mynetworks: '127.0.0.0/8 [::1]/128 203.0.113.0/24' + # optional: Domains for which to receive emails and forward according to virtual_alias_map. + alias_domains: staff.example.org # optional: Hostnames and SHA1 certificate hashes that are allowed to relay email via this host. relay_client_cert_whitelist: - hostname: other.example.org diff --git a/roles/email/templates/main.cf b/roles/email/templates/main.cf index f6840cc..a03d627 100644 --- a/roles/email/templates/main.cf +++ b/roles/email/templates/main.cf @@ -87,7 +87,7 @@ relay_clientcerts = hash:$config_directory/relay_clientcerts {% endif %} # setup virtual delivery domains, aliases and destinations -virtual_mailbox_domains = +virtual_mailbox_domains = {{ postfix.alias_domains | default("") }} {% if postfix.mailman is defined %} {% for item in postfix.mailman.domains %} {{item}}{% endfor %}{% endif %} {% if postfix.dovecot is defined %} {% for item in postfix.dovecot.domains %} {{item}}{% endfor %}{% endif %}