With a few clicks you can reduce the email storage being used and reduce how much time your nightly backups runs backing up the ever growing user mail boxes. If you’re using Virtualmin Pro, it comes with an option to easily apply email retention to an individual user or as a global policy applying to everyone within the mail domain.
From the Virtualmin menu go to the domain you want to manage then expand the menu email messages then click Mailbox Cleanup.
From here you can set if any email is older than let us say 30 days it will be automatically deleted.
You also need to set if deletion is only applied to emails in the inbox or all user folders. At work I have it set to only the inbox. You can also set whether to apply it to all virtual servers managed through Virtualmin or only selected. Click save.
You can also set it for a specific user mail folder if you don’t have the email message cleanup set to apply globally. This is how I have it setup to delete email messages which are tagged as spam in my spam folder.
Logging in to Usermin https://188.8.131.52:20000
Click on the menu Managed Folders > click Auto Clearing next to the spam folder.
Set the following options then click save.
Once the Auto Clearing option has been enabled it shows up as bold indicating it is active. Now go reclaim some email storage space by deleting those emails and listen to your users scream! ; )