Deleting eMails from your Server using SSH

November 22nd, 2011 admin Location: Raleigh, NC, Topic: Web Design | Digital Media

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.

 

About the Author

Alex Centeno MBA., is an international creative director and digital media strategist. Currently residing minutes away from the Research Triangle Park (RTP) - North Carolina, and with over 10 years of interactive marketing training and experience, Alex leads Merkados' international clients to maximizing their online business strategies. One of Alex's biggest strengths is his world-class capacity to effectively combine interactive marketing, digital media design and web development.

You may find further information about Alex Centeno MBA. at: and Twitter.

Sobre el Autor

Alex Centeno MBA., Es un director creativo y estratega de medios digitales reconocido internacionalmente. En la actualidad reside a tan solo minutos del Research Triangle Park (RTP) - Carolina del Norte, y con más de 10 años de entrenamiento y experiencia en marketing interactivo, Alex lidera a los clientes internacionales de Merkados™ para maximizar sus estrategias de negocios en línea. Una de las mayores fortalezas de Alex es su capacidad global de combinar de manera efectiva, mercadeo interactivo, diseño de medios digitales y desarrollo web.

Para más información sobre Alex Centeno MBA. puede visitar: y Twitter.