The Email Disk Usage interface gives you an overview of how much space different mailboxes are using. You also got the the option to delete emails in a folder.
Image: The Email Disk Usage interface.
The interface has two sections:
The email folders are sorted by disk usage. You can also sort the folders by their name and the number of emails in folders.
Clicking the Manage button gives you the option to delete emails based on criteria. There are five options:
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…
By default, the Dovecot IMAP/POP3 server uses separate directories to store read and unread emails. Unread, or new emails are kept in a directory named new and read emails live in a directory named cur. This is linked to so-called Dovecot flags. Emails that have been opened have a flag named \Seen
.
When you select Previously viewed emails Dovecot will purge all emails that have been opened. This option is safer than All messages. When you select the latter option you might delete emails that arrived in the last few seconds.
There are quite a few Dovecot flags, and you can use them 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 specifiy 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 to purge.
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:
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.