List All Email Accounts for a Domain

Home » List All Email Accounts for a Domain

Yes you can do this via plesk! But sometimes I need to automate it for a script or API. The following will print out all mail names for domains on your plesk server:

mysql -u admin -p`cat /etc/psa/.psa.shadow` psa -e "SELECT mail.mail_name, domains.name from mail LEFT OUTER JOIN domains ON domains.id = mail.dom_id where name='DOMAIN NAME.EXT HERE';

Leave a Comment

Your email address will not be published. Required fields are marked *