🗝
about summary refs log tree commit diff
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/example.com.zone12
-rw-r--r--example/hook15
-rw-r--r--example/zoner.toml2
3 files changed, 29 insertions, 0 deletions
diff --git a/example/example.com.zone b/example/example.com.zone
new file mode 100644
index 0000000..27998b2
--- /dev/null
+++ b/example/example.com.zone
@@ -0,0 +1,12 @@
+; simple zoner example for a migadu email domain
+
+@	MX	10 aspmx1.migadu.com
+@	MX	20 aspmx2.migadu.com
+
+key1._domainkey	CNAME	key1.example.com._domainkey.migadu.com
+key2._domainkey	CNAME	key2.example.com._domainkey.migadu.com
+key3._domainkey	CNAME	key3.example.com._domainkey.migadu.com
+
+@		TXT	hosted-email-verify=abcdefgh
+@		TXT	v=spf1 include:spf.migadu.com -all
+_dmarc	TXT	v=DMARC1; p=quarantine;
diff --git a/example/hook b/example/hook
new file mode 100644
index 0000000..291419b
--- /dev/null
+++ b/example/hook
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# small example hook to purge 1.1.1.1's cache for all touched records
+
+for rec in "$@"; do
+	parts=($rec)
+	op=${parts[0]}
+	type=${parts[1]}
+	name=${parts[2]}
+	if [ "$op" != "create" ]; then
+		continue # only purge for creates
+	fi
+	echo "purge 1.1.1.1 $type $name"
+	curl -X POST "https://one.one.one.one/api/v1/purge?domain=$name&type=$type" | jq -r '.msg'
+done
diff --git a/example/zoner.toml b/example/zoner.toml
new file mode 100644
index 0000000..087eb58
--- /dev/null
+++ b/example/zoner.toml
@@ -0,0 +1,2 @@
+api_key = "<api key>"
+secret_key = "<secret key>"