From e77c174c33c18df68635dbe6a8ec5686dd6176d8 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 16 Jun 2018 20:15:22 +0200 Subject: [PATCH 1/1] postfix: permit adding more domains to virtual_mailbox_domains --- host_vars/template.yml | 2 ++ roles/email/templates/main.cf | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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 %} -- 2.30.2