Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Obtain number of email accounts on server

Discussion in 'General Discussion' started by akust0m, May 15, 2016.

  1. akust0m

    akust0m Well-Known Member

    Joined:
    Feb 19, 2016
    Messages:
    63
    Likes Received:
    4
    Trophy Points:
    8
    Location:
    Melbourne
    cPanel Access Level:
    Root Administrator
    Hello,

    How can I obtain the number of email accounts on a cPanel server? Spamhaus require a total number of users for their data feed license.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Several threads reference the use of the following command to see a total number of all email accounts on the system:

    Code:
    sed "s|:||g" /etc/userdomains | awk '!/^\* nobody/{print $1, $2 | "sort | uniq" }' | awk '{print "cat /home/"$2"/etc/"$1"/passwd"}' | sh 2>/dev/null | wc -l
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice