
mbox file corrupt not recognising messages after mime multipart
Hello, I recently deleted all my emails by accident, but have read that they are still in the mbox file. I have changed the x-mozilla-status to 0000, and I have broken the file up into six parts to make it editable on VIM.
The file is all over the place... blank lines missing, names missing.... but the file is recognised in Thunderbird and shows a few hundred of the emails...
By dividing up the inbox, each of the smaller files shows about 350 or so emails. But not all. The importing seems to stop after a multi-part mime message... no messages after that are recognised.
I have found python scripts like mboxsplit.py that say they will separate the mbox into individual emails, but it is also not recognising the emails after the mime fault.
Does anyone know of a code that will just recognise the From - line and split that way?
I can't find any splitting solutions that don't try to read messages or understand mboxdr format. I just want to separate text, save as different files.
Chosen solution
sfhowes said
To avoid the problems that may come from splitting the mbox file, I suggest you first try the add-on suggested here. Drag the Download link and drop it onto Tools/Add-ons in TB to install it.
Thanks sfhowes, I did try that before all else... It retrieved a total of 1300 messages, and again - these were generally from the older part of the file...
But after you sent this message I also tried other solutions on that page.
I had already tried "Thunderbird Reset Status" and it came up as a virus with my Avast... I understand it might or might not be a virus, but it wasn't easy for me to work out.
I hadn't tried IMAP size, because it is listed here as for POP accounts... and when I did try it - it asks for your account settings. My mbox was only a local copy - so I didn't think I could link it.
Two days ago I had already run Restore Deleted Files (it only found a few), and had used a text editor to find and replace all the X-Mbox-Status to 0000
After receiving your message I gave IMAPsize another go. I followed the tools mbox2eml and it found ALL the messages in my directory of split mbox files.
So now I ran ImportExportTools in Thunderbird>Import all messages from a directory into a new local folder in Thunderbird. It has brought them back into several folders each one related to my split files.
I now have my 13,000 emails back!
Because I had changed the X-Mozilla-Status it thinks they are all new. But at least it hasn't forgotten which ones were junk!
I am now moving them into one LOCAL folder in Thunderbird, will then delete all the junk mail and compact the folder... run through a few times by sender to sort out which emails should have been deleted, and delete them again... then compact the folder before moving the emails I DO want back to my usual account (an IMAP account).
Thanks for posting the page. The solution was on it!
My problem seemed to be specifically that trying to IMPORT the mbox file flunked after the MIME messages that might have been corrupt.
Using IMAPSize mbox2eml overcame this.
Read this answer in context 👍 0All Replies (5)
To avoid the problems that may come from splitting the mbox file, I suggest you first try the add-on suggested here. Drag the Download link and drop it onto Tools/Add-ons in TB to install it.
Chosen Solution
sfhowes said
To avoid the problems that may come from splitting the mbox file, I suggest you first try the add-on suggested here. Drag the Download link and drop it onto Tools/Add-ons in TB to install it.
Thanks sfhowes, I did try that before all else... It retrieved a total of 1300 messages, and again - these were generally from the older part of the file...
But after you sent this message I also tried other solutions on that page.
I had already tried "Thunderbird Reset Status" and it came up as a virus with my Avast... I understand it might or might not be a virus, but it wasn't easy for me to work out.
I hadn't tried IMAP size, because it is listed here as for POP accounts... and when I did try it - it asks for your account settings. My mbox was only a local copy - so I didn't think I could link it.
Two days ago I had already run Restore Deleted Files (it only found a few), and had used a text editor to find and replace all the X-Mbox-Status to 0000
After receiving your message I gave IMAPsize another go. I followed the tools mbox2eml and it found ALL the messages in my directory of split mbox files.
So now I ran ImportExportTools in Thunderbird>Import all messages from a directory into a new local folder in Thunderbird. It has brought them back into several folders each one related to my split files.
I now have my 13,000 emails back!
Because I had changed the X-Mozilla-Status it thinks they are all new. But at least it hasn't forgotten which ones were junk!
I am now moving them into one LOCAL folder in Thunderbird, will then delete all the junk mail and compact the folder... run through a few times by sender to sort out which emails should have been deleted, and delete them again... then compact the folder before moving the emails I DO want back to my usual account (an IMAP account).
Thanks for posting the page. The solution was on it!
My problem seemed to be specifically that trying to IMPORT the mbox file flunked after the MIME messages that might have been corrupt.
Using IMAPSize mbox2eml overcame this.
Modified
See Edited Above
Modified
See Edited Above
Modified
See Edited Above
Modified