Introduction
You may need to list all email accounts on the server and their disk usage. This can be done with the UAPI and a Bash loop.
Procedure
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Run the following command.
find /var/cpanel/users -type f | cut -d"/" -f5 | while read cpusername; do uapi --user=$cpusername Email list_pops_with_disk|egrep 'email|humandiskquota|humandiskused';done
Additional resources
How to use a while loop in BASH to iterate over all cPanel users on a server
Comments
0 comments
Article is closed for comments.