You can automatically assign deletion rules to your server based email folders.
This is particularly handy if you are using IMAP, Forwarders or like to store mail on server.
To set the rules, follow the below:
- Access cPanel, then go into the EMAIL ACCOUNTS page.
- Next to the account you wish to configure, click the MORE (1 in the image below) dropdown on the left hand side and choose MANAGE DISK USAGE (2)
- On the Email Disk Usage Page, click MANAGE (1) next to the folder you wish to set deletion rules on and then set the corresponding settings (2)
Using the "Custom Query" option can open up some powerful options using Doveadm-Search-Query for more advanced users. See the official Doveadm-Search-Query page for more information.