Ask users to check inactive email accounts

Rogerio

Well-Known Member
Sep 26, 2016
78
15
8
Sao Paulo, Brazil
cPanel Access Level
Root Administrator
Hello,

Today I realized that a client has 30 email accounts, 20 of them has no usage for more than a year, and in a total of 20 Gb of their account space, 13 Gb were used for abandoned email accounts.

I would like to be able to automate some way of listing all the email accounts of all cPanel accounts along with the information when the account was last accessed, by pop3, imap or webmail. So I can send emails to customers with this data asking them to exclude abandoned email accounts, usually from fired employees, and forgot to delete.

Any idea how to do this? Maybe a file or something that is "touched" when a user logs in.

Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello @Rogerio,

CSF's Mail Manager plugin is useful if you want to see a list of email accounts using more than "X" amount of disk space:

ConfigServer Mail Manage (cmm)

However, there's no functionality in this third-party plugin or in cPanel & WHM that will fetch and list "Inactive" email accounts. You could explore creating a custom bash command that compares a list of all email accounts on the server with the last recorded successful authentication in /var/log/maillog* to see which ones have not logged in within "X" amount of days.

Additionally, I recommend submitting a feature request for an interface that presents this information to you directly from Web Host Manager:

Submit A Feature Request

Thank you.