Hi guys,
I'm trying to list the domains and their nameservers on our plesk server.
For a single domain, I'd go to the Plesk control panel and go to "websites/domains" -> "dns settings".
I want to do that for over 100 domains and there should be a better way to do this than looking up individually.
I've been looking at the mysql databases in /etc/psa but there doesn't seem to be a table for this.
It should be similar to dns_recs but not just for our main domain.
Any ideas?
MX Records on all domains of Plesk
Re: MX Records on all domains of Plesk
You can bash script a DNS lookup in a for loop to get the DNS-records for all your domains. Which records do you want to retrieve?
Example:
Be advised that if you are using your Plesk machine as the local resolver that you can get false results if your local nameserver incorrectly contains records for domains that are actually registered elsewhere.
Example:
Code: Select all
for domain in `mysql -uadmin -p$(cat /etc/psa/.psa.shadow) -e 'select name from psa.domains'`;
dig MX $domain
done
Lemonbit Internet Dedicated Server Management