Checking domain ns records are pointing to us

Matt Dawson matt at
Fri Jun 18 13:11:28 BST 2004

On Friday 18 Jun 2004 12:00, Dave Tiger wrote:
> Is the a way of checking that each domain we host has its ns record =
> pointing
> to us without having to nslookup -q=3Dns each one.

# dig mx <yourdomain> |grep "IN MX"

This command returns the MX records in order of priority. For those with only 
one MX record, it will return one line. You could use this in a shell script 
to check against your mail server for each domain you wish to check, and with 
a little sed-ing, create a cron job to report on only those that do not match 
the specified pattern.
Matt Dawson.

More information about the Ukfreebsd mailing list