zone.tx 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. $TTL 300
  2. @ IN SOA <: $title :>. soa.<: $title :>. (
  3. <: $version :> ; Serial
  4. 10800 ; Refresh
  5. 3600 ; Retry
  6. 604800 ; Expire
  7. 10800 ) ; Minimum
  8. ; NS Records.
  9. ; These are actually academic, as the registrar is where any of this matters.
  10. ; You'll have to also set up A / AAAA records with the IP of these NS subdos of yours.
  11. : for $nameservers -> $ns {
  12. <: $title :>. IN NS <: $ns :>.
  13. : }
  14. ; A Records
  15. <: $title :>. IN A <: $ip :>
  16. <: $title :>. IN AAAA <: $ip6 :>
  17. ; PTR - also academic. Must be set not with your registrar, but your ISP/colo etc.
  18. <: $ip_reversed :> IN PTR <: $title :>
  19. <: $ip6_reversed :> IN PTR <: $title :>
  20. ; Subtitles. Look ma, it's a glue record!
  21. : for $subdomains -> $sub {
  22. <: $sub.name :>.<: $title :>. IN A <: $sub.ip :>
  23. <: $sub.name :>.<: $title :>. IN AAAA <: $sub.ip6 :>
  24. : for $sub.nameservers -> $ns {
  25. <: $sub.name :>.<: $title :>. IN NS <: $ns :>
  26. : }
  27. : }
  28. ; CNAME records
  29. : for $cnames -> $cname {
  30. <: $cname :>.<: $title :>. IN CNAME <: $title :>.
  31. : }
  32. ; MX & SRV records
  33. <: $title :>. IN MX 0 mail.<: $title :>.
  34. _smtps._tcp.mail.<: $title :>. IN SRV 10 5 587 .
  35. _imaps._tcp.mail.<: $title :>. IN SRV 10 5 993 .
  36. _pop3s._tcp.mail.<: $title :>. IN SRV 10 5 995 .
  37. ; SPF, DKIM, DMARC
  38. _dmarc.<: $title :>. IN TXT "v=DMARC1; p=reject; rua=mailto:postmaster@<: $title :>; ruf=mailto:postmaster@<: $title :>"
  39. mail._domainkey.<: $title :>. IN TXT "v=DKIM1; h=sha256; k=rsa; t=y; p=<: $dkim_pkey :>"
  40. <: $title :>. IN TXT "v=spf1 +mx +a +ip4:<: $ip :> +ip6:<: $ip6 :> ~all"
  41. ; Indexer verification
  42. <: $title :>. IN TXT "google-site-verification=<: $gsv_string :>"
  43. ; LetsEncyst
  44. _acme-challenge.<: $title :>. IN TXT "<: $acme_challenge :>"
  45. <: $title :>. IN CAA 0 issue "letsencrypt.org"