Struggling with Thunderbird

Although I migrated from KMail to Thunderbird, I have been proverbially “holding my breath” with the program.

Thunderbird does not fully support maildir. I am able to use maildir with my email accounts but not local folders. Seems local folders only support mbox.

Or so I thought. I will share my “light bulb moment” further in this post.

I decided I could live with the maildir/mbox mixture. Several speed bumps hampered my trust.

I was unable to get filters working correctly. Upon receipt mails should move automatically from the email account to the filtered local folder. Never happens. Yet when I select the mail account and manually apply the filters, the mails all move to the desired local folder.

Even after manually applying filters and the mails move to the desired folders, the original folder remains blue colored. I expect the blue color only for the folder with the new mail.

Sometimes emails mysteriously appear in an account’s Draft folder. The mails are not viewable. The subject header indicates the mails are mails I sent previously. I am guessing the Draft folder is not being correctly flushed and updated when I actually send the mail.

Something seems broken with mbox maintenance. Many of my local folders are configured to not expire mails. Yet several times I have opened a folder only to find most or all of the mails deleted. Fortunately I have a robust backups and I am able to restore the files.

Yet every time I restore the files Thunderbird again deletes the mails. The Mozilla Thunderbird Knowledge Base has a long article about addressing mbox corruption issues. The mere existence of the article is sufficient indication that Thunderbird is broken in this respect. Not a confidence builder.

My cure to restoring the deleted files from backups is:

  • Restore the mbox folder files.
  • Copy the mails to one of my maildir account folders.
  • Delete the local folders.
  • Create new local folders.
  • Copy the files to the mbox folder.

This seems to fix the mbox corruption.

At least with respect to compacting. Manually running the Repair Folder option sees all Hell breaking loose and I lose the files.

I have compacting configured to the lowest level possible: to save 1 MB of space. I prefer to see an option to compact when starting or closing Thunderbird.

In the end I created additional folders in the mail account folder. Like the parent folders the new folders are maildir. I experience no corruption or deletion issues. With maildir there is nothing to compact.

This new folder structure does not match my work flow. I can live with this work-around, but not ideal.

With all of this happening I wondered whether I had become my own worst enemy — PEBKAC. Browsing the web seemed to indicate that I should be able to use maildir with all local folders. System mail too.

Digging deeper I saw a dim light. While I had configured Thunderbird to use maildir, I had not done so early enough in the configuration process.

For testing purposes I created a new profile. I canceled the annoying never-ending wizard dialog asking me to create a new account. Contrary to my original stumblings, there is indeed a GUI control to change the preferred storage type. In Preferences -> Advanced -> General, I changed the Message Store Type for new accounts to maildir.

Thereafter I created my local system mail account.

I opened a file manager and saw that all local folders and the system mail account were using maildir folders.

The solution for using maildir everywhere is to configure maildir before creating any account.

Originally when I migrated from KMail I had first created my local system mail account before changing to maildir. The Local Folders are created immediately after creating the first account. Not configuring for maildir before creating an account results in all local folders being created as mbox.

In hindsight I see how this happened. Local system mails are stored in mbox format. I presumed Thunderbird mimics that when configuring a local system mail account. Further, because of me being a Thunderbird noob, I did not understand that Local Folders are created when creating the first account. When the local folders are created they automatically inherit the default Message Store Type configuration.

There is a “pecking order” at play here.

No harm done. To err is human. Hardly the first time I stubbed my toes. My toes usually are black and blue at the end of each day. Life is a single word meaning “lessons learned.” Onward and upward.

How to convert the existing mbox folders to maildir? I did not want to fiddle with recreating all email accounts. I did not want to fiddle with importing mails to a new profile.

I found no easy automated method. For the local system mail account I

  • Closed Thunderbird.
  • Edited the user prefs.js file from msgstore/berkeleystore to msgstore/maildirstore.
  • Copied the new profile folder structure for localhost.

From a terminal I sent myself a local email. I launched Thunderbird. The message appeared in the system mail Inbox. I browsed the folders with a file manager to confirm. So far so good.

Converting all of the Local Folders mbox folders was more time consuming. There are no context menu options for moving folders when selecting the folder. There is a Move option when selecting all mails but not for the folders. I used drag-and-drop to copy each mbox folder to one of my maildir accounts. I repeated this process for all mbox folders.

The slow part about this process is Thunderbird would perform only one copy per session. I had to perform each individual copy and restart Thunderbird.

I compared the contents of the original and copied folders. Satisfied, I deleted the mbox folders. I restarted Thunderbird. So far so good.

I exited Thunderbird and repeated the prefs.js exercise by changing msgstore/berkeleystore to msgstore/maildirstore for Local Folders. Then I copied the Local Folders directory structure from the new profile to the current profile. I started Thunderbird and all was well.

Then I reversed the original folder copying by copying folders back to the Local Folders parent folder.

The grunting and groaning took about an hour and half. I now was using only maildir.

I wondered whether part of the filtering problem was caused by the original mbox/maildir mixture. I do not know. Does filtering now work as expected? Sending myself some emails seem to filter okay. I waited several days for other people to send me emails. At that point I concluded that filtering was working better than previously, but a few filters still were not working as I expected.

Yet seems I can’t win with Thunderbird. After reading a mail and closing Thunderbird, the next time I opened Thunderbird the mail is marked as not read. This was particularly irksome because I had deleted the mail and emptied the trash.

Worse, sometimes when sending a mail Thunderbird would abruptly terminate. Starting Thunderbird from a terminal only revealed a segmentation fault.

Classic WTF with broken software.

Back to holding my breath. I backed up the files and deleted all *.msf files. No luck. Read mails reappeared in the Inbox as unread despite moving to the trash.

Disabling all add-ons seemed to halt the reappearing mails. The culprit revealed to be MinimizeToTray revived. I checked I had the latest version. Testing the add-on with a new profile resulted in the same bug.

How does minimizing an app to the tray affect the Read/Unread status of mails?

I have no idea. I then wondered whether the spontaneous appearance of mails in the Draft folders were related.

Disabling the add-on is hardly the end of the world, but many people want to minimize their mail client to the system tray.

I manually ran the Repair Folder option on most of the mail folders. That seemed to help with the abrupt crashing.

For the moment Thunderbird seems to be more stable, but I am now a tad skeptical. I am looking at other mail clients but maildir is not well supported with GUI clients. I do not want to use a console client. I will not use a cloud-based client.

Evolution is too heavy an app and is not supported in Slackware. The only other options seem to be Claws Mail and Sylpheed, which use the MH format. The MH format is a forerunner of maildir and uses single files for each mail. While not the end of the world, Claws Mail and Sylpheed do not support rich text formatting (HTML mail).

While not bugs, the direct lack of system tray support, minimizing to tray, and a system tray method of indicating unread mails is frustrating with Thunderbird. I do not want a popup. I want a system tray indicator for when I return to the computer I can see at a glance whether new mails arrived while I was absent. These are fundamental features of a mail client. Why this support is lacking is a mystery.

The FireTray add-on does the same as MinimizeToTray revived and does not replicate the unread message bug. The web page indicates the add-on is discontinued. While I am able to use the minimize function I am unable to get the tray icon to display the unread mail or new mail count.

The sad part is I remain holding my breath with Thunderbird. That means I do not trust the program with my mails. Nobody should fear their data being destroyed.

Posted: Category: Usability Tagged: General, Migrate, Thunderbird

Next: Isolating Untrusted Virtual Machines — 1

Previous: Not Quite Older Than Dirt