mail-server/ansible/templates/secondary-smtpd.conf
2024-05-28 23:03:37 +03:00

17 lines
554 B
Plaintext

{% set _mx_domain = lookup('vars', inventory_hostname + '_mail_domain') %}
pki {{ _mx_domain }} cert "/etc/ssl/{{ _mx_domain }}.fullchain.pem"
pki {{ _mx_domain }} key "/etc/ssl/private/{{ _mx_domain }}.key"
listen on all tls pki {{ _mx_domain }}
table aliases file:/etc/mail/aliases
action "local" mbox alias <aliases>
action "relay" relay host {{ mx1_mail_domain }}
{% for domain in mail_domains %}
match from any for domain {{ domain }} action "relay"
{% endfor %}
match from local for local action "local"
match from local for any action "relay"