Thursday, March 30, 2006

Compacting email folders in thunderbird

My email client, thunderbird, was extremely slow last night and I thought it may be because I had too many emails in my inbox. 'Fair enough' I thought and started deleting some of them. Thunderbird started behaving very strangely and labeling some of my old emails as 'unread' and being extremely unresponsive. This spurred my inquisitiveness and I tried to figure out what was going on but looking at the files that contained my emails. Thunderbird creates a file for each email 'folder', which contains a text file containing all emails. It also contains an msf file for each email 'folder' that keeps track of only headers (basically a list of pointers to emails in email file).

Although I kept deleting emails from thunderbird, it didn't seem to be affecting the size of the email file. I came across this 'compact' feature in thunderbird and tried it. However, no luck! No change to the size of my email file. I decided to consult my the oracle, "Google". It told found me an article of some one who had a similar problem or not deleting emails from the email file although they were deleted. That led me to a page at Mozilla ( which explained that Thunderbird actually kept the deleted emails labelled as deleted. It also had a description of how to 'compact' a folder if the 'compact' option does not work. It told me to delete the msf file and restart thunderbird. Thunderbird then rebuild the msf file and I was managed to use the compact folder option to get rid of all the crap that was already deleted.

Why in the world do we need emails to be labeled as deleted in the inbox while the trash folder also contains a copy? I realized that thunderbird actually has an option that can be set to automatically compact folders if it gets beyond a certain point. Why can't this be automatically enabled? I think what put me off more what the message that asked "Do you want to compact the folder and save space?". My hard disk is about 80Gbs. Why would I need to save a few Kbs? But then again, what I didn't know was that if the email file gets beyond a certain point, the whole mail client starts playing up!!

Moral of the story, compact your email folders regularly. Or set the option which performs it automatically.