|Keeping Thunderbird from breaking
by Steven J. Vaughan-Nichols (May 16, 2006)
My love/hate relationship with Thunderbird, the Mozilla Foundation's email client, continues. On the one hand, Thunderbird's a very good open-source email/Usenet/RSS client. It's easy to filter, search, and sort messages with Thunderbird -- even with multiple mail accounts. And, unlike Evolution, my favorite email program, it's also available on Windows and Mac OS, besides Linux.
So, what's the problem?
Well, actually, there are a lot of them. I've already gone over its lack of business-ready features, like individual and group calendaring. More recently, though, both I and some of my friends have been seeing far too many examples of Thunderbird breaking.
Fortunately, there are some ways around these problems. Here are a few solutions for some of the more common Thunderbird trouble spots that I've tested out myself.
Always use the newest
First, you should always use whatever the most recent version of Thunderbird you can get your hands on.
As I write this, in early May, that's Thunderbird 1.502, which includes many security fixes.
This newest version is available for all three supported operating systems. Well, there is one exception -- there's no native support for Mac OS X on Intel. Still, you can run it on Mactels if you use Rosetta. In light of the many security fixes, I'd run it on Rosetta rather than use an older version. Thunderbird's programmers do promise that there will be a native Mactel version for 1.503, however.
Just as important, for my use, is that the new version includes numerous bug fixes. These range from program crashes, to RSS feed lock-ups, to some copy and paste problems.
Put them all together and you have a release that's a "must upgrade" for any Thunderbird user.
The right way to upgrade
However, do not -- I repeat, do not -- simply upgrade over your old copy of Thunderbird. Bad things will happen. Officially, this is only a truly awful idea with upgrading from Thunderbird 1.0x to Thunderbird 1.5x, but I and other people I know have found plenty of trouble in upgrading from one 1.5x version of Thunderbird to another.
So, what you should do, instead, is uninstall Thunderbird. This will not destroy your old email or profile settings. These are kept in another location -- far, far away from the program files.
To be precise, Thunderbird keeps your profile and mail in the following locations:
Windows 2000, XP: The profile name in Windows is eight characters of gibberish followed by a "." and the profile's name. If you have given your account a name, the extension will be "default."
Documents and Settings\\Application Data\Thunderbird\Profiles\\MacOS X:Linux and Unix systems:
You say you still can't find it in Windows? That's because in Windows, application data and the directories underneath it, are hidden. To be able to see them, you'll need to double-click on your My Computer icon and then click your way down: Tools > Folder Options > View (tab) > Show Hidden files and folders.
It's hidden in Linux and Unix, as well, but in those operating systems, that '.' at the beginning of a file or directory name is a dead give-away that they're hidden.
Backing up your profile
Now, if you're paranoid, like I am, you can also backup your profile. The simple way to do this is to simply copy the profile directory. To do this, close down Thunderbird, double-check to make sure there are no Thunderbird processes left running, and then copy it to wherever you want with your copying tool of choice.
Then, if you need to restore it, you reverse the process. Again, you start by making darn sure that Thunderbird isn't running and then copying your backup to its original location. You must, however, place it back in exactly the same place. If you don't, Thunderbird won't be able to find your profile, and you'll just have to start over again.
What about if your profile is corrupted? In that case, you'll need to create a new profile using the Profile Manager. For instructions on that, refer to this mozillaZine article.
Then, you'll need to manually copy a variety of files from your corrupt profile to the new one. This is, without a doubt, a major pain. One of the big reasons why I backup my profile is to avoid going through this process.
Next, before starting the new version Thunderbird, you should restart your computer if you're using Windows, or your desktop session if you're running Mac OS X or Linux. If you don't, chances are that when you try to start the new version of Thunderbird, the only thing that will happen is that the icon will blink a time or two.
Did you do all that and the program still refuses to run? Chances are that your profile is corrupt.
In this case, use the Thunderbird Profile Manager to set up a profile with a new name. You'll then need to recreate your basic email settings and folders. It's now that you'll be glad that you have a backup profile, because you can simply copy it over.
You don't have a backup? Whoops! You've no choice, then, but to try to salvage your mail and settings from the old wrecked profile.
Search and rescue
To get your mail back, find the mbox files in your profile directories. Don't bother with any files with the ".msf" extension. These are "mail summary files." They don't hold any messages themselves. When Thunderbird restarts it will rebuild these files.
Then, you'll need to copy the mbox files to your new profile. Personally, this is when I find the old MS-DOS Norton Commander, and its Unix/Linux brother Midnight Commander invaluable. It makes copying or moving files between directories much easier than the various default file managers.
Mbox, in case you haven't met it before, is a very common mailbox format. It's used by many Unix and Linux email programs as well as such popular Windows and Mac programs as Eudora. With mbox, all messages for a folder are stored in one large file.
No matter the operating system, most programs don't give mbox files an extension. So, for example, in Thunderbird, your default inbox is named 'inbox." This is the file you'll need to copy. You don't need to worry with the inbox folder "inbox.sbd" or the aforementioned msf files.
Once the mbox file is in place in its new home, you should be able to open it and read your messages again. Now, things can go wrong here too, but if that's the case, I can only tell you to head to mozillaZine's Thunderbird knowledgebase or support forum. In my experience, mozillaZine does a better job of helping users get a handle on their Thunderbird problems than the official Mozilla help pages.
For bringing back your personal and collected address books, copy over the abook.mab and history.mab files. For your other address books, follow the instructions in: Moving address books between profiles.
You might be thinking right now that you could solve all your problems by simply copying everything, except the files you need to delete, from the old profile to the new one. Nope. It doesn't work. Some of the files contain absolute directory paths, and they will cause Thunderbird to blow up if you try using them.
Look ma, no messages!
Let's take a look at another common problem: You open up your email one day, and all your messages are missing. Isn't that a great way to start your day!
Thunderbird gets just a wee bit confused sometimes about keeping track of its messages. The root of this problem is that it doesn't do well with handling large numbers of mail messages. The program has gotten better, but it still happens often enough that it really ticks me off.
The first thing you should do is close Thunderbird and head to your Profile mail directory and sub-directories. Once there, delete all your ".msf" files. Then, restart Thunderbird. With luck, you'll be back in business.
One way to avoid problems is to avoid using Thunderbird's default mail account. The program has an annoying habit of losing track of its "default" mail profile. Don't ask me why -- it's beyond me.
Usually, the first time you run into this is when you start up Thunderbird and -- what's this? -- you see the new account window instead of the application. You can usually get things back to normal, by closing out of the new account dialog and using Profile Manager to make Thunderbird start with the default profile.
Better still, when you first create your Thunderbird account, create your profile with a unique name. I, for example, use sjvn. Thunderbird will not lose track of this unique name. Or, at least, it hasn't yet on any of the machines I've set up with unique user names!
While, you're at it, if you're running Windows, why not do yourself a favor and create a top-level directory under My Documents for your Thunderbird profile with Windows Explorer, Norton Commander, or your file manager of choice. That way, it will be a lot easier to find when something goes wrong.
Then, you can use that folder for your profile when you run the Create Profile Wizard. It will make your life a lot easier.
Compact those folders!
Another must technique for avoiding Thunderbird annoyances is to run the command: File > Compact Folders. You see, when Thunderbird deletes email messages, it doesn't really delete anything. It's just hiding them from you. It's only when you run Compact Folders that the messages actually get wiped.
If you don't run Compact Folders, you accumulate this deleted crud, and Thunderbird will eventually stall out in one annoying way or another -- leaving you wondering what the heck happened.
Every time I look in on the Thunderbird support forums, the number of ways that uncompacted folders can make your life miserable keeps going up. If you don't do anything else with Thunderbird, run Compact Folders at least weekly on your inbox and any other folders you might have where you're frequently deleting or moving files.
Trust me, it's worth the trouble.
Getting Thunderbird and anti-virus programs to cooperate
Finally, if you're running an anti-virus program -- and you absolutely must, if you're running Windows -- make sure that when it handles a virus it won't delete your entire inbox.
Sound unlikely? Think again, remember that mbox stores all your messages in one file. If your anti-virus software is set to delete virus-carrying messages and that message is already in your inbox, guess what happens? That's right. Bye-bye inbox.
You can set Thunderbird 1.5 or higher, to first drop new messages into a temporary file before bringing them to the inbox. The command is Tools > Options > Privacy > Antivirus." Once there, check the "Allow anti-virus clients to quarantine individual incoming messages" box. I highly recommend this.
For more on Thunderbird and anti-virus issues, read the mozillaZine article, "Antivirus software."
After all this, I think you can see why I prefer Evolution. Still, Thunderbird is getting better, and if you keep a close eye on it, it's a fine personal email program for Linux, Mac OS or Windows users.
-- Steven J. Vaughan-Nichols
Do you have comments on this story?
NOTE: Please post your comments regarding our articles using the above link. Be sure to use this article's title as the "Subject" in your posts. Before you create a new thread, please check to see if a discussion thread is already running on the article you plan to comment on. Thanks!
(Click here for further information)