email file without extension parsing
Thunderbird stores emails in a file that has no extension. I am accessing this file to make changes but have noticed that the file has bad housekeeping. It contains emails that have moved to another email directory, have been deleted or has multiple copies for unknown reasons. What is the deal with the extensionless email file, and why isn't it accurate for the folder it clearly represents?
Thank you.
Όλες οι απαντήσεις (1)
I suggest you spend some time learning how the MBOX rd mail format works. Then I suggest you look at the x-mozilla headers in the email for determine the status of the mail you are looking at. It is not poor housekeeping that leaves mail in that file. It is a desire to make the program actually usable. Windows is a pig at opening a 4Gb file to edit.
Then I suggest you look at the article in the knowledgebase about compacting folders. https://support.mozilla.org/en-US/kb/compacting-folders but be aware that IMAP mail accounts really only cvlean house when they are expunged.
Then I suggest you backup your data, because Thunderbird will not share nicely and whatever you do with the mail in the mbox file is almost certain to corrupt either the mail database/index (MSF) or corrupt the mbox file itself. Thunderbird uses the Berkley RD variant of the MBOX file format. Not all mobox file are the same.
The only safe way to manipulate Thunderbird mail is using a Thunderbird add-on. Any external data manipulation will require you to update the MSF file and other files such as the global-messages-db.sqlite each extra file bringing a exponentially greater risk of corrupting something. Using an add-on you can use Thunderbird's own API's to do the manipulation and Thunderbird will make the other necessary changes to reflect the commands that have been executed.