2 ms·
I discovered this when I wrote a Vim function to automatically update the serial of the SOA record (can be easy to forget if in a hurry) whenever I saved a zone
by Anthony-G 5y ago
I discovered this when I wrote a Vim function to automatically update the serial of the SOA record (can be easy to forget if in a hurry) whenever I saved a zone file. It worked fine for my own zone files, similar to:
$ORIGIN example.com.
@ IN SOA ns.example.info. hostmaster.example.info. (
2021031306 ; Serial
12h ; Refresh (secondary server accepts zone update notifications)
2h ; Retry (how long secondary should wait before retrying)
14d ; Expire (how long records should be considered valid by secondary)
1h ; NXDOMAIN (Nonexistent domain) TTL – previously the Minimum TTL
)
I considered publishing my Vim script but figured I should improve it so that it would work for all valid zone files. Then I read the Master Files section of RFC 1035¹ and realised that this would be more difficult than I had assumed. I’m also not particularly proficient with Vimscript so I never published it. Since then, I’ve converted my zones to be dynamic so I don’t need to worry about formatting or updating the serial.
Out of interest, which name server had the most robust parsing of zone files?
1. https://tools.ietf.org/html/rfc1035#section-5 https://tools.ietf.org/html/rfc1035#section-5
- nly 5y agoRobustness is irrelevant, because whenever there is a hole in the various specs people ask "What is BIND doing?"