The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    47
    Likes Received:
    2
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    32,483
    Likes Received:
    842
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page