Plesk for Linux
kb: how-to
ABT: Group A
Applicable to:
- Plesk for Linux
Question
How to get a list of domains with information about IP-addresses, DMARC, DKIM status and SSL certificate name for domain and webmail?
Answer
This information can not be viewed via Plesk UI, however it is possible to get all this information directly from Plesk Database.
- Log into the server via SSH.
- Download report.sh.tar.gz from the attachment:
# wget https://plesk.zendesk.com/hc/article_attachments/115005405693/report.sh.tar.gz
- Unpack it:
# tar -xvzf report.sh.tar.gz
- Add executeble permissions to unpacked script:
# chmod +x report.sh
- Execute the script:
MYSQL_LIN: ./report.sh
Information will be stored in report.txt
file in the same directory.
Comments
11 comments
I get the following error running the script:
@Timo
Could you please run the script as below and share the output:
sh -x ./report.sh
@Timo Meinen
There is a possibility that the DNS setup differs from what is expected by script, i.e. there are two DMARC records configured for the same domain.
To troubleshoot it further, please check the output of the following queries:
@... Sorry, Table 'psa.tmp_report' doesn't exist
@Timo Meinen
Please create it as in the script:
I get the same error as Timo - ERROR 1242 (21000) at line 1: Subquery returns more than 1 row
I created the tmp_report table and ran the two queries above and they returned nothing. What next? :-)
Mine was failing at the Dmarc line, and I realised this was because my master domain has several DMARC records to allow reporting for other domains, so I added AND host not like '%._report._%' to line 12 in the script the line just before );" at the end and that has fixed it.
Since it is valid to have more than one DMARC record containing ._report._ (but otherwise only one DMARC line is allowed), I would suggest updating the script to cope with this eventuality.
Hi Brian Craigie, thanks for that, i will test it and update the script.
Thanks :-)
Actually, I found another use-case where more than one valid DMARC entry can exist on a domain. When someone has added a DMARC entry for MailChimp. I discovered this today and it made the script fail again, so actually, it might be better to modify the script to cope with multiple rows in the subquery and add all the DMARC entries to the report. I'm not sure how to modify the SQL to do that though.
Thank you again! This will require some deeper investigation.
Please sign in to leave a comment.