Realtime email usage stats (SKINS)

Version 1.401

Feature
Finished

*** REQUIRES new exim.pl version 10 - manual install *** wget -O /etc/exim.pl http://files1.directadmin.com/services/exim.pl.10 /etc/init.d/exim restart If you don't update to VERSION=10, you'll be missing some stats on this page. (message size, and destination address) Once determined to be fully functional, the exim.pl.10 will be renamed to exim.pl on the files server as the default for new installs. ----------------------------------- Accessed at: User Level -> E-Mail Accounts -> E-Mail Usage ----------------------------------- New page that will show all emails that were sent today, this month, or this month excluding today. CMD_EMAIL_USAGE and CMD_API_EMAIL_USAGE Grabs stats from: /etc/virtual/usage/username.bytes (today) or /usr/local/directadmin/data/users/username/bandwidth.tally (this month, excluding today) chews on them, and shows the results. Figures out: top sending email top authentication username, when applicable (as it can be different from the "from" email, or blank if email not sent through smtp) top sending IP address, when applicable. CMD_API_EMAIL_USAGE: Method: GET or POST domain=domain.com sample output variables: BYTES_FILE = ./data/users/admin/bandwidth.tally TOP_AUTH = user@email.com TOP_AUTH_COUNT = 2 TOP_AUTH_PERCENT = 100 TOP_HOST = 127.0.0.1 TOP_HOST_COUNT = 2 TOP_HOST_PERCENT = 100 TOP_PATH = / TOP_PATH_COUNT = 2 TOP_PATH_PERCENT = 100 TOP_SEDNER_PERCENT = 100 TOP_SENDER = user@email.com TOP_SENDER_COUNT = 2 USERNAME = admin user@email.com = 2 otheruser@email.com = 1 Where the UPPER CASE texts mentioned will always be present. They contain stats about the highest sending data. Values which are email addresses (or the system account name) will have variable showing the number of emails sent. Note that the number is based on the From address, only if the authenticated sender is not used (eg: when sending via script or popb4smtp) ======================= SKINS files_user.conf: CMD_EMAIL_USAGE=user/email/usage.html user/email/pop.html: added link to the new page: <a href="CMD_EMAIL_USAGE?domain=|DOMAIN|">E-Mail Usage</a><br> user/email/usage.html: see new skin for info.

Interested to try DirectAdmin? Get a 30-day Free Trial!