cPanel email stats reporting

SeitanMan

Registered
Feb 19, 2018
1
0
1
Australia
cPanel Access Level
Root Administrator
Hey,

I manage the cpanel mail for an organisation and we have a large number of email accounts and forwarder addresses many of which I suspect are no longer in use.

What I am hoping to do is generate a report with things like, last time an email account was logged into (most important) amount of emails sent/received per mailbox (less important) and last date an email was sent to a forwarder address.

I have access to root and both cpanel and WHM which is installed on the same server.

I've had an extensive look online and I can't find any tools that seem to do this, webilzer etc just report on websites not email, the best I found was the default reporting in WHM, but even still no easy way to export the kind of data I need, any suggestions are appreciated.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello,

The specific information you are looking for isn't easily available as part of an existing feature in cPanel & WHM. You can use "WHM >> Mail Delivery Reports" and "WHM >> View Sent Summary" to search for information about emails that were delivered (including forwards), however information about when an email account last signed in is only available via the /var/log/maillog file from the command line. You would need to develop a custom bash script that searches for login entries in /var/log/maillog (and the archives of that log) to determine when an email account last signed in.

Thank you.