Compacting foldersFrom MozillaZine Knowledge Base(Redirected from Thunderbird : Tips : Compacting Folders)
When you delete or move a message, most e-mail programs ("clients") simply hide the message and mark it as ready for physical deletion later on. The "deleted" messages are still stored in the folder - even emptying the Trash does not remove them. The hidden messages are not physically removed until the folder is compacted (not to be confused with compressing a file). If you don't compact your mail folders periodically, they can grow very large. Many users have never heard of compacting, but most e-mail clients do this to improve performance. As a result, the e-mail client does not have to to rewrite the entire folder every time you delete a single message. The reason many users have never heard of compacting is that most e-mail clients default to automatically compacting the folder whenever a certain amount of space is wasted, while this has to be first turned on in Thunderbird. If a folder has a lot of messages, messages are frequently deleted in it, and if you don't compact it frequently, this greatly increases the chance of the folder becoming corrupted. This creates message fragments, and may cause erratic behavior as Thunderbird tries to parse the file storing the messages for that folder. Usually this is a problem just for the inbox folder. That is why the keep it working article recommends that you keep the inbox folder as empty as possible (move any messages you want to keep elsewhere) and configure Thunderbird to automatically compact folders.
[edit] How to compact foldersThe best way is to let Thunderbird do this automatically: "Tools -> Options -> Advanced -> Network & Disk Space -> Disk Space -> Compact folder when it will save over 100 kB -> OK." To compact all folders in an account manually, click the account on the left, and then click "File -> Compact Folders". Compacting an account may take from a few seconds to 10 minutes or more, depending on how much mail you have and how recently you last compacted the folders. If you have trouble doing this and the process stalls, try compacting one folder at a time by right-clicking on the folder and choosing "Compact This Folder". If you do not let Thunderbird compact automatically, you should do this regularly, at least once a week. If you do it daily, it will take only a fraction of the time. Most people never have a problem compacting a folder when its online. However, if you get Nstmp folders that's due to the compacting being interrupted while Thunderbird is downloading new messages. You can avoid this by going offline before compacting (go to "File -> Offline -> Work Offline", or simply click on the icon in the bottom left corner.) It is rare for this to cause other problems but if you suspect it, experiment with going offline before compacting (ideally on a new known good folder). You can only compact IMAP accounts while you are online. However, this normally doesn't cause a problem since IMAP accounts only download the headers to the hard disk. [edit] Other ways to compact foldersThe Xpunge extension lets you add a button to empty the trash and compact the folders in multiple accounts (in one step). If you use the beta version you can set a timer to automate that. The Mozilla Add-ons web site has several other extensions that add buttons to compact folders. If you have an IMAP account there are two ways to automate compacting its folders.
[edit] Undoing compactingYou can not undo compacting of a folder, in other words there is no such thing as "uncompacting". Compacting physically removes messages marked for deletion and hidden from view. Once they're gone, they're gone. Don't confuse compacting a folder with compressing or zipping it. Usually somebody asks how to "uncompact" a folder if they lose messages due to compacting. You shouldn't lose messages when compacting unless a folder was badly corrupted, in which case you'd probably have already noticed message fragments, several messages with a date of 1969 (due to the Date: header in a message being deleted), "resurrected" deleted messages, or long startup times because Thunderbird gets caught in a loop parsing (analysing) the inbox. If you suspect a folder is badly corrupted, don't compact it. It might make things worse because compacting depends upon Thunderbird being able to parse the mbox file (the text file named after the folder that contains all of the messages for that folder) and figure out where every message begins and ends. Thunderbird can't use the so-called index file (folder_name.msf) to do this. Once Thunderbird starts to lose track of where each message begins and ends, compacting can cause the removal of other messages besides those marked ready for physical removal. It's unusual but possible to lose every message in a folder by compacting it if the folder was badly corrupted. If you suspect a folder is badly corrupted, try to fix it by following the instructions in compacting does not seem to work instead. [edit] Problems when compacting[edit] Compacting seems to take foreverUsually it only takes a couple of minutes to compact your folders unless your profile is over a gigabyte in size or your computer is slow. The worst that normally happens if you exit Thunderbird before it finishes compacting is that it fails to delete some nstmp temporary files that it created and you have to manually delete them. If compacting takes a long time, the status bar at the bottom of the window may not remove the text about it compacting a folder when it finishes. It may also fail to update that text to mention the last folder in that account if you use "File -> Compact Folders". If you do something else that normally displays some text in the status bar, it should replace the message about compacting. [edit] Compacting does not seem to workIf compacting folders doesn't seem to work even for a single folder (where you right-click on the folder and choose "Compact This Folder"), it is possible that the folders and/or the .msf mail summary files are corrupted. If the corruption is mild you frequently can fix it by deleting the .msf file(s).
If you're using Windows a quick way to find the .msf files in all of the subfolders is to enter *.msf in Start->Search. On Windows XP, ensure that "Search hidden files" is chosen under "More advanced options"; on earlier versions of Windows, ensure that hidden files are viewable in Windows Explorer ("Tools -> Folder Options -> "View hidden files and folders").) Make sure that you only delete msf files in Thunderbird folders - other programs may use the same extension! If the corruption is severe deleting the .msf files won't help much, and compacting the folder may just make it worse. You'll typically run into this only with the Inbox folder. Its much more vulnerable to corruption because many users tend to store lots of messages in it and they also frequently delete messages in it. Thats why its recommended that you don't permanently store messages in your Inbox folder, move them to other folders. You can fix the problem by replacing the corrupt folder with a new known good folder that you copied the messages to.
[edit] What if you do not compact folders?If you rarely or never compact folders, your mail files will accumulate more and more of the "hidden" messages that have been marked for permanent deletion but have not yet been removed. This can cause a lot of disk space to be used, and it can have a negative effect on Thunderbird’s performance.
[edit] See also[edit] External links
|
|