help with name checking script

Kevin Darcy kcd at daimlerchrysler.com
Tue Sep 28 23:44:30 UTC 1999


Try the "host" utility (in the contrib directory of the BIND distribution).
Not only is its output format simpler to parse than "dig"'s or
"nslookup"'s, but it appears to have a more meaningful exit code (from the
few tests I ran). Seems like it might be a better fit for what you're
trying to do.


- Kevin

lnordin at noblesys.com wrote:

> I'm tyring to use a shell script to verify that our name server is
> running correctly and that the appropriate MX records exist. The problem
> I'm having is that when I run,"dig domain.com mx" it gives a return code
> of 0 even if there isn't an MX record for domain.com. Am I not using the
> correct options on dig or what?
>
> I've tried doing the same thing with nslookup but with the same result.
>
> Do I have to resort to parsing std out to determine if the MX record
> resolved correctly?
>
> BTW running SCO v5.0.4, bind v4.9.7 resolver libs, dig v2.2.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.





More information about the bind-users mailing list