How do I delete thousands email messages with cPanel/Horde's webmail interface.

Started by Rahul Sambre, July 23, 2016, 10:33:18 PM

Previous topic - Next topic

Rahul Sambre

Hi,

If you run a website, you may find out one day that you have a mail account containing thousands of messages. The most common reason this happens is because the default email account is set up as a "catch-all" address. This will direct all email sent to invalid usernames at your domain to the default Inbox. Because spammers send out spam messages to invalid email addresses all the time, the number of emails received by the default mailbox can grow by thousands of messages each day.

Just follow below steps to delete thousands email messages.

1) Log into the Horde Mail system.
2) Click the "Folders" icon at the top of the window.
3) Check the box next to "Inbox" or the mailbox that contains the messages you want to delete.
4) From the "Choose Action:" drop-down menu, select "Empty Folders."
5) Click "Empty Selected Folders" to clean out the mailbox.

Depending on how many messages are stored in your Inbox, this operation may take a few seconds to several minutes to complete. The only catch is that if the mailbox contains too many messages, the operation will time out and will not empty the mailbox.
You may have to delete the message folders manually. To do this, you will first need to navigate to the mail folder, which is located in the following directory.

Quote/home/username/mail/

where "username" is the username for the mail account.

The two folders you will need to delete are the cur and new folders, which contain the messages. You may be able to do this with an SSH.

Use below commands to recursively delete the cur and new directories.

Quotecd /home/username/mail

Quoterm -rf cur

Quoterm -rf new

I hope this information is helpful to you.

That's it.  :)