X-Git-Url: https://git.ralfj.de/ansible.git/blobdiff_plain/e7f0dda5b871d22ea9925aeaf8a1513d9833128b..65ce86070073854ddd409cfa987e58f33885e622:/roles/email/templates/main.cf diff --git a/roles/email/templates/main.cf b/roles/email/templates/main.cf index cbd7b3d..01c2185 100644 --- a/roles/email/templates/main.cf +++ b/roles/email/templates/main.cf @@ -1,12 +1,16 @@ compatibility_level = 2 -# local delivery: aliases only -alias_maps = hash:/etc/aliases -local_recipient_maps = $alias_maps +{% if postfix.hostname is defined %} +myhostname = {{ postfix.hostname }} +{% endif %} {% if postfix.mynetworks is defined %} mynetworks = {{ postfix.mynetworks }} {% endif %} +# local delivery: aliases only +alias_maps = hash:/etc/aliases +local_recipient_maps = $alias_maps + {% if 'letsencrypt' in group_names %} # TLS server parameters smtpd_tls_cert_file=/etc/ssl/mycerts/letsencrypt/live.crt+chain @@ -83,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 %} @@ -133,6 +137,6 @@ non_smtpd_milters = $smtpd_milters # misc smtpd_delay_reject = yes disable_vrfy_command = yes -recipient_delimiter = + +recipient_delimiter = {{ postfix.recipient_delimiter | default("+") }} delay_warning_time = 4h message_size_limit = 21384000