Email

Empty the cPanel system account and stop Cron notifications filling it up

Reviewed on 4 min read mailbox space cron

Every hosting account with cPanel has a system email account, named after your cPanel username (without an @). It receives automatic notifications, mainly the output of scheduled tasks (Cron). If you don't keep an eye on it, it can pile up thousands of messages and take up several gigabytes of your hosting space.

Why it fills up

By default, every time a Cron job produces any output, cPanel sends an email with it. A job that runs every few minutes generates hundreds of emails a day, and over time they take up a lot of space.

Empty the system account

This is the quickest way to delete lots of emails at once:

  1. Log in to cPanel from the client area.
  2. Open Email > Email Disk Usage.
  3. In the Account drop-down, choose (System Account).

cPanel Email Disk Usage with the System Account selected in the Account drop-down

  1. You'll see the folders (INBOX, Sent…) with how much space each one uses. Click Manage next to the one you want to clean up.
  2. Choose what to delete:
    • All messages: every email in the folder.
    • year old or more: those older than a year.
    • Previously viewed: those that have already been read.
    • 30 MB in size or more: those that are 30 MB or larger.
  3. Click Delete Permanently. The deletion can't be undone.

If you use the Cron notifications to spot errors, have a look at the most recent ones before deleting them all: they can tell you which job is failing.

From webmail

If there are only a few messages:

  1. In cPanel, open Email > Email Accounts.
  2. Find the system account (your cPanel username, without an @) and click Check Email.
  3. Select the messages, delete them and empty the Trash.

For more ways to free up email space, see free up space in an email account.

Stop receiving Cron notifications

  1. Go to cPanel > Advanced > Cron Jobs.
  2. Under Current Cron Jobs, click Edit on each job.
  3. Add this to the end of the command:
> /dev/null 2>&1

For example:

php /home/usuario/public_html/script.php > /dev/null 2>&1
  1. Click Edit Line to save.

This way the normal output and the errors of that job are discarded and no email is sent.

Receive notifications from some jobs only

If you want some jobs to notify you and others not to:

  1. In Cron Jobs, under Cron Email, enter the address where you want to receive the notifications (for example, admin@yourdomain.com) and click Update Email. They'll then stop arriving in the system account.
  2. Add > /dev/null 2>&1 to the end of the jobs you don't want notifications from.
  3. Leave unchanged the jobs whose output you do want to receive.

Putting MAILTO="admin@yourdomain.com" at the start of a job's command doesn't work: cPanel doesn't treat it as the recipient of the notifications and the email will keep going to the general Cron address.

If a script needs to notify different people, the most reliable option is for the script to send the email itself (for example, with your application's mail function) and for you to add > /dev/null 2>&1 to it in Cron.

You'll find more details on creating and editing jobs in the Cron jobs guide.

You may also find useful

Something wrong or out of date? Tell us and we will review it.