[rbldnsd] Feature request: zone file checker
Jeff Chan
jeffc at surbl.org
Sat Nov 5 13:39:26 MSK 2005
On Thursday, October 13, 2005, 3:00:31 AM, Michael Tokarev wrote:
> 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.
Yes, that sounds useful.
> 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".
Indeed, I fixed a dumb mistake where I was writing the zone files
directly, by following the helpful advice of the error logs:
rbldnsd[45864]: file multi.surbl.org.rbldnsd(248148): incomplete last line (ignored)
rbldnsd[45864]: file multi.surbl.org.rbldnsd: file changed while we where reading it, data load aborted
rbldnsd[45864]: file multi.surbl.org.rbldnsd: do not write data files directly, use temp file and rename(2) instead
and using mv -f on a temp file copy instead. :-)
Cheers,
Jeff C.
--
Jeff Chan
mailto:jeffc at surbl.org
http://www.surbl.org/
More information about the rbldnsd
mailing list