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
{% 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 %}