2024-02-27 15:00:17 +00:00
|
|
|
function protonmail(domain, verification, dkim)
|
2024-08-18 21:47:47 +00:00
|
|
|
-- Configure mail records for protonmail
|
|
|
|
|
|
|
|
-- Verification
|
|
|
|
txt(domain, "protonmail-verification=" .. verification)
|
|
|
|
|
|
|
|
-- MX records
|
|
|
|
mx(domain, "mail.protonmail.ch", 10)
|
|
|
|
mx(domain, "mailsec.protonmail.ch", 20)
|
|
|
|
|
|
|
|
-- SPF
|
|
|
|
txt(domain, "v=spf1 include:_spf.protonmail.ch mx ~all")
|
|
|
|
|
|
|
|
-- DKIM
|
|
|
|
-- TODO: use concat()?
|
|
|
|
cname("protonmail._domainkey", "protonmail.domainkey." .. dkim .. ".domains.proton.ch.")
|
|
|
|
cname("protonmail2._domainkey", "protonmail2.domainkey." .. dkim .. ".domains.proton.ch.")
|
|
|
|
cname("protonmail3._domainkey", "protonmail3.domainkey." .. dkim .. ".domains.proton.ch.")
|
|
|
|
|
|
|
|
-- DMARC
|
|
|
|
txt("_dmarc", "v=DMARC1; p=quarantine")
|
|
|
|
end
|
|
|
|
|
|
|
|
function fastmail(domain)
|
|
|
|
-- Configure mail records for fastmail
|
|
|
|
mx(domain, "in1-smtp.messagingengine.com", 10)
|
|
|
|
mx(domain, "in2-smtp.messagingengine.com", 20)
|
|
|
|
cname("fm1._domainkey", "fm1." .. domain .. ".dkim.fmhosted.com")
|
|
|
|
cname("fm2._domainkey", "fm2." .. domain .. ".dkim.fmhosted.com")
|
|
|
|
cname("fm3._domainkey", "fm3." .. domain .. ".dkim.fmhosted.com")
|
|
|
|
txt(domain, "v=spf1 include:spf.messagingengine.com ?all")
|
2022-11-06 02:48:42 +00:00
|
|
|
end
|
2023-07-26 16:51:00 +00:00
|
|
|
|
|
|
|
function vanityns(ns1, ns2)
|
2024-08-18 21:47:47 +00:00
|
|
|
-- Configure vanity DNS nameservers
|
2023-07-26 16:51:00 +00:00
|
|
|
|
2024-08-18 21:47:47 +00:00
|
|
|
aaaa(concat(ns1, "ns"), "2001:67c:25a0::1")
|
|
|
|
a(concat(ns1, "ns"), "185.142.218.1")
|
|
|
|
aaaa(concat(ns2, "ns"), "2001:67c:25a0::2")
|
|
|
|
a(concat(ns2, "ns"), "185.142.218.2")
|
2023-07-26 16:51:00 +00:00
|
|
|
end
|