Last updated: 30 March 2021

The Email Disk Usage interface gives you an overview of how much space different email addresses are using. You also got the the option to delete emails in a folder.

The interface

cPanel's 'Email Disk Usage' interface lets you quickly see how much disk space email folders are using.
Image: The Email Disk Usage interface.

The interface has two sections:

  • If you have more than one email address you can select a mailbox from a drop-down menu at the top of the page. Every cPanel account has at least one mailbox: the default mailbox.
  • The search box can be used to search for a particular folder in the selected mailbox. This can be useful if you have lots of custom folders.
  • At the bottom of the page is an overview of the folders in the selected mailbox. The overview shows the name of the folder, the number of emails it contains, the amount of disk space used and a Manage option.

The email folders are sorted by disk usage. You can also sort the folders by their name or the number of emails in folders.

Deleting emails

Clicking the Manage button gives you the option to delete emails based on criteria. There are five options:

  • 1 year old or more
  • 30 MB in size or more
  • Previously viewed
  • All messages
  • Custom query

The five options for deleting emails in a folder.
Image: the five options for deleting emails.

Most of the options are self-explanatory. There are two options that need a bit of an explanation though…

Previously viewed emails

On cPanel servers, IMAP and POP3 are handled by Dovecot. The server uses various flags to indicated the state of an email. For instance, when an email first arrives it gets the flag \New. And, when you open the newly arrived email it gets the flag \Seen.

When you select Previously viewed emails Dovecot purges all emails with the flag \Seen. This option is safer than All messages. When you select the latter option you might delete emails that you were not aware of, including emails arrived in the last few seconds.

Custom queries

The custom query option lets you use any Dovecot flag to match specific emails. There is a good overview of all the flags on Dovecot’s SearchQuery page.

To give an example, you can select all emails that are older than one week using “since 1w”. There are various other ways to select a date. For instance, you can also specify a date using the “YYYY-MM-DD” format.

Similarly, instead of using the “30 MB in size or more” option you can choose a different size. For instance, you can delete emails larger than 10MB by using “larger 10M”. You can also do the reverse: “smaller 10M” will delete emails that are smaller than 10MB.

There are many other options. If you are familiar with Dovecot then it can be useful to run custom queries. However, if you are not a Dovecot guru then you should probably not use the feature. You might accidentally purge more emails than you intended.

Is the feature useful?

The Email Disk Usage interface provides a very crude way of managing emails. The feature is handy if you want to delete lots of emails quickly. Usually, though, there are better ways of managing emails.

That said, there are two common use cases:

  • The Email Disk Usage interface is useful for managing the default mailbox. The mailbox can grow quite large over time, and often it doesn’t contain any emails you want to keep.
  • Similarly, if you have an email address that forwards all incoming emails to another mailbox then you may from time to time want to empty the inbox. As all emails have been forwarded there isn’t normally a need to keep emails in the inbox.

For “normal” email addresses it is better to use an email client to manage emails. Pretty much all email clients have an option to archive emails. So, instead of deleting emails you can simply move emails from the mail server to your email client. It reduces the amount of disk space you use on the server, and you still got all your emails. If you are not familiar with archiving emails, we got guides for Outlook 2016, Thunderbird and Evolution. For other email clients, a quick online search will yield plenty of good guides.