ansible-infra/roles/common/templates/opensmtpd/smtpd.conf.j2

11 lines
400 B
Django/Jinja

listen on localhost
table aliases file:/etc/aliases
table secrets file:/etc/smtpd-secret
action "local" mbox alias <aliases>
{% for account in smtp_accounts %}
action "{{ account.name }}_relay" relay host "smtps://{{ account.name }}@{{ account.host }}" auth <secrets> mail-from "{{ account.from }}"
{% endfor %}
match for local action "local"
match for any action "{{ smtp_default_account }}_relay"