Finding out the total number of email accounts in a cPanel server [closed]
Solution 1:
You can do it using following one liner.
for i in `cat /etc/localdomains`; do grep -E ^$i: /etc/userdomains ; done | sed 's/://g' | awk '{ system("cat /home/"$2"/etc/"$1"/passwd") }' 2>/dev/null | wc -l