Clearing out unwanted emails will open up your disk space. This is easy to do by following these steps.

  1. Navigate to Email Accounts.
  2. Locate your email address and click on the manage button on the right.
  3. You should then click the link for Free up email storage on the right side.
  4. Select the Manage link on the right of a folder you wish to manage.
  5. Select the option you wish to use to delete email in that email box. These options are as follows:
    1. 1 year old or more – delete emails older than one year in this folder.
    2. 30 MB is size or more – delete old emails in this folder until the disk usage is 30 MBs.
    3. Previously viewed – delete all previously viewed emails in this folder.
    4. All Messages – Clear out the entire email folder.
    5. Custom Query — See Advanced: Custom Queries below.  
  6. 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

  1. Log into the Control Panel
  2. Go to the EMAIL section and click Email Disk Usage
  3. Select the email account you want to manage from the dropdown
  4. Click Manage next to the folder you want to work with
  5. 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 .