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!
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!