I need the ability to purge inactive users from my Atmail installation.
- On-Premise Server + WebMail Installations: Version 7.0 > Current Version
- Webmail Only Installations: Version 7.0 > Current Version
- Too many inactive users inflating the database
After running a mailserver for some time, especially those with larger user bases, you may find you want to purge the Atmail system of any inactive users. Included with Atmail is a script that allows you to do just that.
Purging Inactive Users From Atmail
You will find the script at /usr/local/atmail/webmail/utilities/tools/purge-users.php (the /usr/local/atmail part of the path may vary for webmail only installations) and it is used as such:
For example: I want to delete all users whom have been inactive for 60 days. I want to double check the list first so I pass the --no-delete option:
Once I confirm that I indeed wish to delete those accounts listed I re-issue the command, this time without the --no-delete option:
Now the inactive accounts have been deleted, that includes all email and other data associated with them.