Cpanel List Email accounts from shell
List all email userdata
This First one outputs A LOT of data
1
for i in $(cat /etc/userdomains | awk '{print $2}'); do uapi --user=$i Email list_pops 2>/dev/null ; done | less
List users email Accounts
1
for i in $(cat /etc/userdomains | awk '{print $2}'); do uapi --user=$i Email list_pops 2>/dev/null | grep email | awk '{print $2}'| grep @; done | sort | uniq
List email accounts (including default accounts)
1
for i in $(cat /etc/userdomains | awk '{print $2}'); do uapi --user=$i Email list_pops 2>/dev/null | grep email | awk '{print $2}'; done | sort | uniq
This post is licensed under CC BY 4.0 by the author.