From 7a7bb361396e03707f1f12b10fb61f5d31d91280 Mon Sep 17 00:00:00 2001 From: mia Date: Wed, 24 Apr 2024 22:44:53 -0700 Subject: initial commit --- example/example.com.zone | 12 ++++++++++++ example/hook | 15 +++++++++++++++ example/zoner.toml | 2 ++ 3 files changed, 29 insertions(+) create mode 100644 example/example.com.zone create mode 100644 example/hook create mode 100644 example/zoner.toml (limited to 'example') 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 = "" +secret_key = "" -- cgit 1.4.1