cPanel – every email address in the server


cat /etc/userdomains | sed "s/://g" | awk {'system("ls -1d /home/"$2"/mail/"$1"/* 2> /dev/null")'} | sed "s/\// /g" | awk {'print $5"@"$4'}

The above command will print our every email address in the server.
* Don’t forget you’ll want the email aliases aswell (found under /etc/valiases/).



Leave a Reply

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


This site uses Akismet to reduce spam. Learn how your comment data is processed.