4 ms·
Bind's config files are awful. I think it is like Sendmail where the only reason it is still awful is that there is too much infrastructure built around them t
by jandrese 4y ago
Bind's config files are awful. I think it is like Sendmail where the only reason it is still awful is that there is too much infrastructure built around them to make them better. They could improve the configs, but it might break many thousands of scripts around the world.
Back in the 80s there were not many examples of configuration files, so everybody just invented their own idiosyncratic format. Most of those old formats have long since died off, but a few have survived to haunt us even today.
- h2odragon 4y agosendmail.cf is bytecode. At the time it was written, bytes mattered, and it did a magnificent job. Now we have the resources to make things easier on humans. but there really should be some sort of charity foundation to help the victims of sendmail.cf trauma.
- aldrich 4y agoYeah, though I would say human readable bytecode, and it is interesting to see that in the actual context. For anyone who's interested, there's a git repository containing a historical reconstruction of the original BSDs. I believe one of the first BSD versions containing sendmail (by Eric Allman) is this one: https://github.com/weiss/original-bsd/blob/bd282c88c1b3c2575b96e2c181085233f7b15786/usr.sbin/sendmail/READ_ME https://github.com/weiss/original-bsd/blob/bd282c88c1b3c2575... (almost 40 years ago!) Its a little hard to read due to the format, but here's some explanation of the (1983, earliest?) config file that was used back then: https://github.com/weiss/original-bsd/blob/bd282c88c1b3c2575b96e2c181085233f7b15786/usr.sbin/sendmail/doc/intro/intro.me#L488 https://github.com/weiss/original-bsd/blob/bd282c88c1b3c2575... From what I grasp, it started as an extensive dynamic parser that needed to understand a lot of rules, and I guess with each new RFC and version, the rules needed to be extended too. And the config file could be loaded into a memory image to improve performance.
- teknopaul 4y agoIt's not that bad. You may have to rtfm, but only once.
- jandrese 4y agoI have to RTFM every time I get asked to write a Bind config.
- icedchai 4y agoI've been running BIND since 1995. Most configurations are very similar. A zone is either primary / master or secondary / slave. You copy and paste from a previous config entry, change a zone name, maybe add an extra secondary name server now and then.
- thayne 4y agoAlso, the zone file format is defined by an RFC. Which is why several a lot if DNS software uses that format, not just bind. Bind in particular, is conservative about deviating from the standardized format.