From 105f283be508c52496ed1a661dd1325f17282f0e Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 5 Mar 2018 09:46:35 +0800 Subject: mail: setup opendkim config files --- roles/mail/templates/dkim/KeyTable.j2 | 10 ++++++++++ roles/mail/templates/dkim/SigningTable.j2 | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 roles/mail/templates/dkim/KeyTable.j2 create mode 100644 roles/mail/templates/dkim/SigningTable.j2 (limited to 'roles/mail/templates/dkim') 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 + +# :: +{% 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 + +# +{% for domain in mail.domains %} +*@{{ domain }} {{ domain }}.key +{% endfor %} -- cgit v1.2.2