I came accross a domain that had its mail enabled, although it didn't have any addresses configured.
This can be used when you want to redirect, but in this case the domain wasn't supposed to handle the mail.

If mail is enabled on the server and it should be handled by another server, that server can not send mails to that domain because it's thinking that it handles them itself.

I looked here: http://pleskhacker.com/
and saw some interesting info.

I already have all the domains that have email-addresses configured by modifying a command a bit (I know this can be done better, but I haven't actively used MySQL in the past).
mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -e 'select CONCAT(mail_name,"@",name) as email_address from mail left join domains on domains.id=mail.dom_id left join accounts on accounts.id=mail.account_id;' | grep @ | awk -F@ '{print $2}' | sort | uniq >domainswithmailaddresses
Now I want a command that will list the domains with mail enabled.
I'm talking about the checkbox.
Somehow I can't find this in this overview.

If I have that command I can get an overview of domains that have mail enabled but no addresses configured.
Which is at least suspicious.
Probably misconfigured.

mistery_mysql_command | grep -vf domainswithmailaddresses

I would really appreciate the help