Bulk DNS Query in Plesk

I put this command together to grab DNS information relating to all of the domains hosted on a Plesk server.  Useful if your migrating to a new server and need to know where to update the DNS zones.  This checks the nameservers but can easily be substituted with A or MX:

for domain in $(mysql -uadmin -p$(cat /etc/psa/.psa.shadow ) -Dpsa -e'select name from domains;'); do dig ns $domain +noall +answer; done

You can leave a response, or trackback from your own site.

Leave a Reply