We use cookies to keep our site relevant and easy to use, your continued use of this site is consent that we may set several cookies (see our Privacy & Cookie Policy), click to always allow cookies from our site (and not see this notifcation on your next visit) or read more.Allow Cookies

EU legislation requires that all websites clearly specify if cookies are being used and their purpose, You can read more about how we use cookies (and which cookies we use) in our Privacy and Cookie Policy.

You will see this notification the first time you visit our website unless you accept cookies (in which case we'll set a cookie to remember thay you're happy for us to to set cookies!).

Not so Hasty there! Thunderbirds are go!

You may have read earlier that I had written a funky script to remove email that I’d never ever read from my inbox, and it had all gone horribly wrong when I passed a null string into the function and it deleted the whole inbox along with 700+ messages in it. Disaster to some extent!

Then I sat and had a think about how long it would take to import all 700+ headers every time Thunderbird wanted to read my inbox. That wouldn’t be efficient – surely Thunderbird does some caching?

Lo and behold it does, and I’ve recovered everything (and a little bit more besides!) – let me explain.

Bratz movie Recovering Deleted Mail – Thunderbird!

  • As soon as I got back to my machine with Thunderbird on, I turned off the Internet, unplugged cables and routers. The machine was no completely independent (it hasn’t been this way in a long time!).
  • I located the Thunderbird data files.
    (in my case: c:\Documents and Settings\<user>\Application Data\Thunderbird\Profiles\<profile name>)
  • Under this directory I located where IMAP does it’s caching (ImapMail\<imap servername>).
  • I copied the INBOX and the INBOX.msf to a directory under Mail\Local Folders (in the Profile directory).
  • I loaded Thunderbird, and there in my local folders was all my old mail (minus attachments I suspect!)
  • I plugged in the Internet again and let the IMAP account download any new mail since I’d made my screw up.
  • Then dragged and dropped all the messages to the IMAP folder!

Only one slight concern is it’s still going and says there’s 16,000 emails in there. Looking at what’s being uploaded there are a fair amount of duplicates and also the deleted mail is still in there (so it’s probably because I haven’t compacted that folder in some time!

R’coon Dawg release

The duplicates are easy to dispose of via the Remove Duplicates Add-on for Thunderbird. Deletions I’ll just have to delete again 🙂 Maybe that script can help!

The Prisoner video I hope this helps somebody in a blind panic one day!

This entry was posted on Saturday, May 2nd, 2009 at 4:14 pm and is filed under Email Clients. You can follow any responses to this entry through the RSS 2.0 feed.