«

»

Mar 15 2013

Using Telnet to Delete Mass Amounts of E-mail

For whatever reason, you may end up with a huge amount of e-mail stuck on a mail server and it all just needs to go. Maybe you’ve been lax in clearing e-mail, your e-mail application isn’t managing your mailbox properly or perhaps you’ve just been spammed into oblivion.

However, if you’ve got hundreds or even thousands of messages on the mail server that need to be deleted you’re probably not looking forward to manually deleting each and everyone one:

user

pass

stat

dele 1

dele 2

dele 3

….

dele x – 1

dele x

Luckily, there is a smarter way to do this using Microsoft Excel using some easy steps. But first, a warning:

Undertaking the following will delete most, if not, all of your e-mail from your mailbox – only proceed if you understand that you are deleting your e-mail!

Microsoft Excel - Generating Telnet Delete Commands

Microsoft Excel – Generating Telnet Delete Commands

  1. In cell A1, type in dele and press Tab,
  2. In cell B1, type in 1 and press Tab,
  3. In cell C1, type in the following formula then press Enter:
    1. =A1&” “&B1
  4. Highlight cells A1 to C1 and drag down for as many rows that you require,
  5. Copy the resulting text in Column C into your active telnet session,
  6. Watch your telnet window go nuts,
  7. Type quit and press Enter to confirm the deletions.

You might not need to use this tip all that often but always worth knowing just in case.

2 comments

  1. Mark

    You legend!!!!!!!!

    Thanks for the advice. I just deleted 10,000 emails from my wife’s email account. It as been a nightmare. I called Telstra and they put it in the too hard basket, referred me to some Tech support in Malaysia ( who wanted to charge me $100) to clean out mail!!
    I had accessed Telnet server but was deleting one at a time. Then found your tip, today.

    THANKYOU my wife blames me for everything ( like it was my fault she doesn’t delete spam), so now I’m not as deep in it.
    ( always in the s##t, it’s only the depth that varies)

    P.s. it still takes a while if you have heaps f mail to delete. Just paste the excel file, hit enter, once it lists all the files, hit quit, them it just sits there for up to 10 minutes , just leave it

    Cheers
    Mark

    1. Boyd Chan

      That’s an awesome result for you!

      It’s a bit odd that Telstra wouldn’t help you out – I actually worked there in technical support in a previous life and we would delete large e-mails or even clear the mailbox out. We had a very handy tool to do it as well back in the day.

      Anyway, glad that it will help get you in the good books again (even though it’s not your fault)!

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>