WP Hosting Blog

Best practice WordPress hosting, development and management

2018-02-07T21:32:52+00:00 January 23rd, 2018|WordPress Hosting & Development|By WP Hosting Editor|

cPanel Housekeeping: Freeing Up Email Disk Space

We read and write emails via apps like Gmail and Outlook that are external to cPanel, but in some cases, emails end up clogging the cPanel, too.

cPanel stores sent and received mail as individual text files on the server, within a subdirectory of the account’s home directory. If the volume of emails you send and receive is high, the combined space these files use will soon begin to add up. You can check this figure precisely using cPanel’s Disk Usage function.

This is always the case even if you’re using one of cPanel’s webmail applications which are installed out of the box.

You can access these files via cPanel’s File Manager or FTP, navigate your way down the folder structure from the /mail folder. You’ll notice that each email account will have its own folder and within each, there are sub-folders holding new, current and temporary emails files.


Before you delete them, save them locally as a backup. You’ll be able to upload them again if you wish to. To remove unwanted mail, also consider using the ‘Email Disk Usage’ module in cPanel. This will allow you to programmatically remove mail according to a filter – such as age, status or sender.

If you’re using Gmail or Outlook, you’ll have copies of the same emails stored on their servers (or locally on your PC if you’re running an email client on it). Unless you’ve deleted them, that is.

How to prevent emails from being saved to your server?

Emails are only saved if you have configured your email clients to ‘leave a copy of the retrieved email on the server’:

Uncheck the box in your settings and no files will be generated on your server.

Should or shouldn’t you keep copies of your email on a server?

It depends. Most people are happy to manage their emails all in one place via third parties, trusting that their data will always be accessible and safe with them.

This approach works best if you rely on professional services such as G Suite Gmail and Outlook on an Office 365 subscription. These services offer more than 30GB storage for your emails and bypass your server completely (which is a good practice too).

Others prefer to have complete control over email and do not rely on any third party at all. They use webmail clients running on a server such as SquirellMail and Horde, which are not as sophisticated and polished as their commercial counterparts but still work perfectly well.

The third scenario is the former approach, but this time, allowing emails to be saved on the server for back up. To make this work best, you’ll need enough storage space in place to handle your email volume and a regular process scheduled to save email files offline and delete them from the server. This process provides a dedicated space for the next batch.

Leave A Comment