Clear Default email Account using cPanel and SSH Access
If you want to clear Default Email you must first be aware that in every cPanel account, there is default mail account in the name of the cPanel username. This mail account is not meant for normal emailing purposes. All the notification mails from TNP HOST server and the mails to the accounts which doesn’t exist goes there if catch-all feature is enabled. In most cases , in default email, spam mails are being sent to random email accounts under a domain and even if the email address is not present, these spam mails are most likely going to end up in these default mail accounts. This increases the disk space usage and is completely useless. So it is often recommended to clear the mailbox of the default mail accounts. Let us see how this is done in TNP HOST server with SSH access and with cPanel access.
Clearing mails in default mail acount via SSH
Just login to your cPanel account via SSH if your hosting provider provides SSH access.
ssh -p port [email protected]_or_IP
Provide password when prompted. This will let you go into your home directory.
Change the current working directory to the mail directory.
Remove the files in ‘cur‘ and ‘new‘directory which contains all the read and unread mails in the default cPanel account respectively.
rm -rf cur/*
rm -rf new/*
Also remove or rename the file ‘maildirsize’ for manually updating the quota. This file will be created again with updated mail quota.
rm -f maildirsize or,
mv maildirsize maildirsize.bak
Double check the command before deleting just to be on the safe side. Now check if your disk space via cPanel >> Files >> Disk Space Usage, you can see the mails has been cleared and the disk space has been restored. You’ll have to give it some time (15 minutes by default) for the cPanel cache to update and you might need to logout and login again to see the updated quota.
Using cPanel interface to Clear default email
This is an alternate way to clear the default mail account if you don’t have SSH access. Just login to your cPanel account and open File Manager.
Just select the directories ‘cur‘ and ‘new‘ and click on delete button. These directories will be recreated by cPanel once you delete it.
If you are a Dedicated server user, you can disable the catch-all feature by going to WHM >> Server Configuration >> Tweak Settings >> Mail and set the value of the field Initial default/catch-all forwarder destination to fail
With this setting being enabled, no spam emails will go to the default cPanel mail account if the intended mail account doesn’t exist.
If you are looking to clear default email content, you can reach TNP HOST support department and our support representative will provide a very quick help. All you have to do is open a support ticket from client area.