If you have a lot of mail in one of your domains in your cPanel account, you can remove some or all of the mail you don't want using the special Email Disk Usage feature.
- Log into your cPanel account if you aren't already.
- Click on Email Disk Usage in the Email section of cPanel.
Select an email account to prune from the drop-down list next to Account.
If you have a lot of email accounts, you can use the search field just above the list of email accounts to narrow down the list.
- cPanel will show you a list of the available mail folders for the selected email account. If there are a lot, you may want to use the Search field to narrow down the list of mail folders.
- If any of them have email messages stored in them, you will see Manage in the Actions column. Click it to reveal the deletion options for that folder.
Select the criteria under Messages to delete. If you decide to enter a custom delete criterion, select custom query... and type in a Dovecot search query. Once you have everything set the way you want, click Delete Permanently.
There is no confirmation of this step. Once you click Delete Permanently, the system will start removing mail according to your selected criteria.
Repeat these steps for any other folders or accounts you want to clear out.