Digital Media Insights for Business Owners

Deleting eMails from your Server using SSH

You may be in a dilemma. You have hundreds of emails arriving in your account. And now you either check them one by one or you delete them by the page. The best way to do this is instead to delete them via SSH.

I understand that this post may not be for everybody. You may not even know what SSH is. So this post is not for you. Believe me, SSH can be dangerous. So if you don’t know what you are doing it is probably better for you to do it page by page in your webmail application.

On the other hand if you are a systems admin here is how to do it:

SOLUTION

  1. Log in via ssh.
  2. Go to > /home/NAMEOFACCOUNT/mail/DOMAIN.COM/EMAIL
  3. execute the following commands:
/* this code removes, without asking for confirmation (flags -rf) the directories cur/ and new/ */
rm -rf cur
rm -rf new
/* these two will remove all current and new emails from your account */

That’s it and now you should be good to go.

 

Say: "Hola" to your new clients.

Follow us on Social Media for more Tips & Tricks.

Other Posts You May Enjoy