refactor common role

This commit is contained in:
HgO
2020-11-28 20:47:30 +01:00
parent 67b8c5f230
commit 2b8f69fc41
45 changed files with 756 additions and 110 deletions

View File

@@ -0,0 +1,3 @@
{% for account in smtp_accounts %}
{{ account.name }} {{ account.username | default(account.from) }}:{{ account.password }}
{% endfor %}

View File

@@ -0,0 +1,11 @@
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"