PHP Script Live Count Email Account on cPanel
Hello :)
Anyone knows about how to making script live count for email on cPanel?
So everytime user creating email, this script will be automatically update for amount email on cPanel.
Previously I will tell you I have website and I want all visitor know how many user now on my website.
Any help will be appreciated :) Sory for my english, so bad. Thanks.
-
Hello :) This would involve developing a custom script that utilizes our API. The "Email::listpops" module would likely be helpful: cPanel API2 - Email Thank you. 0 -
Dear Michael, Previously thanks for your answer :) Can you tell me more specific how using this API "Email::listpops"? If possible, please give example with script maybe. Thanks so much for your help. Sory I'm newbie. 0 -
Do you have root access to this server or do you only have cPanel access? The API2 function is documented here: Email::Listpops You may need to consult with a developer if you need assistance with the custom script you are planning to create. Thank you. 0 -
I know this is an old thread but I too wanted to solve this, and I felt that there likely was a simpler answer. Here's mine: find /home -type f -name "maildirsize" > mailboxes.log I chose that filename after creating a brand new email account, never accessed, and looking inside for unique files I could search for. That seemed like a good one. I use Exim/Dovecot but not sure if that makes any difference. YMMV, do the same, make a fresh account and look inside. There will be one extraneous result per account under /home/accountname/mail/maildirsize but with a simple regex search/replace you should be able to quickly eliminate that, such as replacing .*?/mail/maildirsize.* with blank in your text editor, then collapsing the blank lines. Then just search/replace all of the / characters with commas, load into Excel as a CSV, make a PivotTable and you're done :) 0
Please sign in to leave a comment.
Comments
4 comments