[rbldnsd] Feature request: zone file checker

Michael Tokarev mjt at tls.msk.ru
Thu Oct 13 15:00:31 MSD 2005


Jeff Chan wrote:
> Hi Michael and Folks,
> Not sure if this is the right place for feature requests, but a

Well, since there's no other place for such a thing... ;)

> zone file syntax checker could be a handy tool.  We are making
> rbldnsd (and BIND) zone files for our surbl.org Spam URI
> blocklist, and we occasionally see "last line incompete" errors,
> which leads me to think there may be occasional syntax errors
> getting in.  A debugging tool could be useful for tracking those
> down.

I was thinking about something different, for quite some time
now, but still unsure if it's a good idea.  I was thinking about
"pre-compiled" zonefiles, similar to data.cdb used by DJB's
rbldns, or similar to "frozen" sendmail.cf (used in ancient
versions of Sendmail).  With this setup, single command-line
switch will tell rbldnsd to "compile" all the data into internal
form and store it in a file, and ofcourse print all errors etc
it finds.  Right now rbldnsd performs only a minimal "syntax
checking" when loading data (partly because I wanted the load
process to be as fast as possible), while "compile mode" may
perform "more aggressive" testing, including testing for domain
name validity in dnset, duplicate checking in ip4set etc.

But I've another thought too.  "Incomplete last line" message
almost always means rbldnsd is reading a file which is being
written by another process at the same time.  See NOTES section
in rbldnsd manpage, which talks about atomic renames and stuff
like that...  Also, take a look at the syslog messages rbldnsd
produces, and note the number of entries it loaded - I bet
that number will be "smaller than usual" when it complains
about "incomplete last line".

There's really nothing to say about "syntax" per se, esp. for
dnset, for which even a single non-whitespace character on a
line is sufficient to form a valid entry, but it's about really
incomplete *last* line.  Ie, single reliable detectable "syntax
error" for the whole file - not worth the effort to do a "syntax
checker" pass.  I think, anyway... :)

/mjt


More information about the rbldnsd mailing list