Clearing out unwanted emails will open up your disk space. This is easy to do by following these steps.
- Navigate to Email Accounts.
- Locate your email address and click on the manage button on the right.
- You should then click the link for Free up email storage on the right side.
- Select the Manage link on the right of a folder you wish to manage.
- Select the option you wish to use to delete email in that email box. These options are as follows:
- 1 year old or more – delete emails older than one year in this folder.
- 30 MB is size or more – delete old emails in this folder until the disk usage is 30 MBs.
- Previously viewed – delete all previously viewed emails in this folder.
- All Messages – Clear out the entire email folder.
- Custom Query — See Advanced: Custom Queries below.
- Click the Delete Permanently button to clear things out.
That’s it, you’ve just cleared out emails in this folder and opened up some disk space for your account.
Advanced: Custom Queries
Accessing the Custom Query Feature
- Log into the Control Panel
- Go to the EMAIL section and click Email Disk Usage
- Select the email account you want to manage from the dropdown
- Click Manage next to the folder you want to work with
- In the “Messages to delete” dropdown, select Custom query
Custom Queries Examples
Delete messages by size:
LARGER 10M
(Deletes messages larger than 10MB)
LARGER 100k
(Deletes messages larger than 100KB)
Delete messages by date:
savedbefore 2weeks
(Deletes messages older than 2 weeks)
since 1week
(Deletes messages from the last week)
before 2025-01-01
(Deletes messages before January 1, 2024)
Combine criteria:
LARGER 5M savedbefore 1month
(Deletes messages larger than 5MB AND older than 1 month)
Important Notes
- Always click Delete Permanently after entering your query
- Deleted emails cannot be recovered – this is permanent
- Test with a less critical folder first
- The query syntax is case-sensitive for some commands
- Further instructions: https://go.cpanel.net/doveadm_search_query .