Sunday, August 29, 2010

My inbox if Full! Really - but it looks empty

From Thunderbird 3.1.7 this information is largely obsolete. I am leaving it here for those using older versions of Thunderbird.
With Thunderbird 3.1.7 and later all that is required is to change the folder entry on the view menu to ALL then right click the folder and select compact. Once you have compacted click on the Folder entry in the view to return it to it's original setting. There is a Bug in the compact code which results in it doing nothing if the folder view is set to unified, which is the default.

This Mozilla knowledge base article refers.
Background
This 'problem' is caused by a limitation on the Windows platform in particular (the limits vary operating system to operating system) of files not being able to be opened if they exceed 4Gb in size.

The inbox, (or any Thunderbird folder), can exceed this size if you have lots of mails stored in it or have not compacted it. The error can occur even with folders that appear to be empty if they have not been compacted.

Compacting
Compacting is a fundamentally important Thunderbird process as when you delete a mail item, or move it to another folder, it is not removed from that mail store, it is simply marked as deleted. This is a common practice in Mail programs as it allows the program to respond much faster than it otherwise would if the mail was actually removed. Compacting is the final process that actually re writes the file minus the deleted item and the file can finally shrink to a size relative to its apparent contents.

After all that background there is some more. Thunderbird stores all of your internal folders as files. So if the amount of mail (deleted and current) in the file exceeds 4Gb this error will occur and can not simply be fixed by compacting.

Mozilla have fixed bug 62665 so the 4Gb limit of offline files both POP and IMAP is finally fixed, although people will have to wait for Version 12 to get the benefit of the change.

Solution
The only solution is to delete the offending file.

While Thunderbird can not open the file to add new mails, it can open it to allow mail to be transferred to another folder in the local folders hierarchy. Mails can be moved in bulk, simple by selecting the first mail and holding the shift key while you select the last and dragged to the new folder. There is little chance that a bulk transfer of this kind will cause a full condition as folders almost always contain a few deleted mails, so while the folder may take a while to copy it will almost always be successful.

When you delete the file, Windows WILL NOT use the recycle bin. The file will simply be to large for the recycle bin.

The file named inbox can also be renamed. In explorer instead of deleting the file simply rename it (old inbox perhaps) this will achieve a return to normal operation, but will not fix the problem with the file being to large. It is a quick and dirty fix that will get mail flowing again. You need to note that the renamed file will appear in Thunderbird with that name. You are not cutting yourself off from the contents of the file.

When in the explorer view you will note that each file is accompanied by a file of the same name with the extension of MSF. These are the index files associated with the folder and should really be deleted if the file is renamed or deleted. If the file is absent Thunderbird will simply create a new index. It will avoid potential indexing problems if they are deleted.

Locating the file
1. Copy your mails to a new folder
2. Go to the tools menu and select account settings
3. Select the server settings for the account (or local folders if it is a local folder or global inbox problem)
4. On the right at the bottom of the screen will be a local directory. Click browse.

Linux/Mac users will need to locate the profile another way and jump to step 7

5. In the window that opens right click the highlighted entry and select explore
This should open windows explorer located in the folder that the offending file is located
6. Close thunderbird by clicking cancel on all the Thunderbird window you have open and then the X

7. Delete the inbox and inbox MSF files, for inbox trouble. Substitute the folder name here that is causing the trouble.
8. Restart Thunderbird

1 comment:

  1. Thanks Matt, will try this. Using Windows Vista Ultimate which I failed to mention. Never keep anything in Inbox and dump Trash every six months.

    ReplyDelete