postfix: also use _ as extension separator
[ansible.git] / roles / email / templates / main.cf
index cbd7b3d85c4cdd515b4a24485beebc68938952d7..a7313ae9fda3f2b363b81fe53ca09acc11a39215 100644 (file)
@@ -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 = +_
 delay_warning_time = 4h
 message_size_limit = 21384000