diff options
author | Aaron LI <aly@aaronly.me> | 2018-03-05 09:46:35 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2018-03-14 11:35:08 +0800 |
commit | 105f283be508c52496ed1a661dd1325f17282f0e (patch) | |
tree | 99a6c2e5f21006b895c9031879fdbdefc0e598de /roles/mail/templates/dkim | |
parent | ba8ab3512064bb7b5aa2484c1ffdcd896ef3bc43 (diff) | |
download | ansible-dfly-vps-105f283be508c52496ed1a661dd1325f17282f0e.tar.bz2 |
mail: setup opendkim config files
Diffstat (limited to 'roles/mail/templates/dkim')
-rw-r--r-- | roles/mail/templates/dkim/KeyTable.j2 | 10 | ||||
-rw-r--r-- | roles/mail/templates/dkim/SigningTable.j2 | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/roles/mail/templates/dkim/KeyTable.j2 b/roles/mail/templates/dkim/KeyTable.j2 new file mode 100644 index 0000000..450bf87 --- /dev/null +++ b/roles/mail/templates/dkim/KeyTable.j2 @@ -0,0 +1,10 @@ +# OpenDKIM KeyTable +# Map key names to signing keys +# See opendkim.conf(5) +# See also: http://opendkim.org/opendkim-README + +# <key-name> <domain>:<selector>:<private-key-path> +{% for domain in mail.domains %} +{% set keyfile = "/usr/local/etc/mail/dkim/" + domain + "-" + mail.dkim.selector + ".pem" %} +{{ domain }}.key {{ domain }}:{{ mail.dkim.selector }}:{{ keyfile }} +{% endfor %} diff --git a/roles/mail/templates/dkim/SigningTable.j2 b/roles/mail/templates/dkim/SigningTable.j2 new file mode 100644 index 0000000..0543aae --- /dev/null +++ b/roles/mail/templates/dkim/SigningTable.j2 @@ -0,0 +1,10 @@ +# OpenDKIM SigningTable +# Table to select one or more signatures to apply to a message based on +# the address found in the "From:" header field. +# See opendkim.conf(5) +# See also: http://opendkim.org/opendkim-README + +# <from-address> <key-name> +{% for domain in mail.domains %} +*@{{ domain }} {{ domain }}.key +{% endfor %} |