summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-06-29 15:24:35 +0200
committerAlan Pearce2024-06-29 15:24:35 +0200
commitdb0d189821eb341fcbb89c25fd02f76e5cfd23f1 (patch)
tree3bd78f0b73d8fcf93b260a7375a1f1953f361b22
parentafded3e0e7dd206e7d6f01098c445413b2eab6d1 (diff)
downloaddns-db0d189821eb341fcbb89c25fd02f76e5cfd23f1.tar.lz
dns-db0d189821eb341fcbb89c25fd02f76e5cfd23f1.tar.zst
dns-db0d189821eb341fcbb89c25fd02f76e5cfd23f1.zip
permit linde to send mail
-rw-r--r--dnsconfig.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/dnsconfig.js b/dnsconfig.js
index acc2196..dd426c3 100644
--- a/dnsconfig.js
+++ b/dnsconfig.js
@@ -31,14 +31,18 @@ function fly(name) {
 /**
  * @param {string} domain
  * @param {string} verification
+ * @param {string[]} extras
  */
-function iCloudMail(domain, verification) {
+function iCloudMail(domain, verification, extras) {
+  if (extras == null) {
+    extras = []
+  }
   return [
     MX('@', 10, 'mx01.mail.icloud.com.'),
     MX('@', 10, 'mx02.mail.icloud.com.'),
     TXT('@', 'apple-domain=' + verification),
     SPF_BUILDER({
-      parts: ['v=spf1', 'redirect=icloud.com'],
+      parts: ['v=spf1'].concat(extras).concat('include:icloud.com', '-all'),
     }),
     CNAME('sig1._domainkey', 'sig1.dkim.' + domain + '.at.icloudmailadmin.com.'),
   ]
@@ -134,7 +138,7 @@ D(
   SSHFP('linde', 4, 2, '72f576b32b5c2d16312574182b028671fa39c8bab03d802fae04eb7f649d2570'),
   CNAME('*.linde', 'linde'),
 
-  iCloudMail('alanpearce.eu', 'anzQe301nq7grixH'),
+  iCloudMail('alanpearce.eu', 'anzQe301nq7grixH', ['a:linde.alanpearce.eu']),
   DMARC_BUILDER({
     policy: 'reject',
     percent: 100,