aboutsummaryrefslogtreecommitdiffstats
path: root/roles/mail/templates/dkim
diff options
context:
space:
mode:
Diffstat (limited to 'roles/mail/templates/dkim')
-rw-r--r--roles/mail/templates/dkim/KeyTable.j210
-rw-r--r--roles/mail/templates/dkim/SigningTable.j210
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 %}