1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00
Yannik Sembritzki dc02d5b74f Expect SOA mailbox in hostmaster@example.org format instead of hostmaster.example.org (#2037)
Co-authored-by: Yannik Sembritzki <yannik@sembritzki.org>
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-02-07 09:25:41 -05:00

1.3 KiB

name parameters parameter_types
SOA
name
ns
mbox
refresh
retry
expire
minttl
modifiers...
name ns mbox refresh retry expire minttl modifiers...
string string string number number number number RecordModifier[]

SOA adds an SOA record to a domain. The name should be @. ns and mbox are strings. The other fields are unsigned 32-bit ints.

D("example.com", REG_THIRDPARTY, DnsProvider("DNS_BIND"),
  SOA("@", "ns3.example.org.", "hostmaster@example.org", 3600, 600, 604800, 1440),
);

The email address should be specified like a normal RFC822/RFC5322 address (user@hostname.com). It will be converted into the required format (e.g. BIND format: user.hostname.com) by the provider as required. This has the benefit of being more human-readable plus DNSControl can properly handle escaping and other issues.

Notes

  • Previously, the accepted format for the SOA mailbox field was hostmaster.example.org. This has been changed to hostmaster@example.org
  • The serial number is managed automatically. It isn't even a field in SOA().
  • Most providers automatically generate SOA records. They will ignore any SOA() statements.

There is more info about SOA in the documentation for the BIND provider.