Sunday, May 25, 2008

Thunderbird does not integrate to Spotlight

Updated 30 May 2008: Link to previous instructions on how to install the mdimporter

I think I am going to give up integrating Thunderbird into spotlight on Leopard. I have encountered so many problems!

First, the problems that can be found on both Tiger and Leopard:
  • The mail.spotlight.enable option in Thunderbird is not implemented correctly. If your mail folder names have a spacing in-between (e.g. "Good Food"), clicking on the result of the search will not bring you to the email. It will just bring you to a blank screen.

  • Thunderbird implements the spotlight search by creating mozeml files in your mail profile per email. That means if you have 10,000 emails, you're going to get 10,000 mozeml files that contain the exact same information as the main inbox that Thunderbird uses.

    This only proves that Thunderbird v2.0.0.x is not designed to integrate to spotlight, and it uses up harddisk space unnecessarily.

Problems found on Leopard (in addition to the problems above):
  • mail.spotlight.enable option in Thunderbird does not index all your emails. I found that it only indexes a few emails within all my existing mail folders. It seems that it has hit some error, and refuses to index further. I find this weird because I have no such problems in Tiger.

    However, new emails that comes in after the option is enabled, have no such problems.

  • mozeml files from Tiger does not seem to work on Leopard. Clicking on the mozeml files will produce some weird behaviour. You will need to regenerate the mozeml files, and you will face the problem above.

  • Spotlight in Leopard no longer index System Files. The mozeml files generated by Thunderbird are actually system files. They are all tagged as plist (property list) files. Therefore, no matter where you place your emails in Leopard, Spotlight results will not show because it is already tagged as System Files.

    You can force spotlight to index System Files by creating your own search in the Finder, and choosing the Search to search only for System Files. However, you will face the problems above.

    I can make it such that the command mdfind is able to search through the emails, but it is of no use because I cannot open up the email.

I was on it for a month because I thought there should be some way. I'm giving up!

Until Thunderbird comes out with a new version, I think I am going to disable this spotlight integration. I will use the internal search provided in Thunderbird. Just click on the Local Folders, and the Search messages option.

For those who wish to try out integrating Thunderbird into spotlight, refer to my previous post here.



Rick Hamell said...

Glad to know I'm not the only one having this exact same problem. I've spent many frustrating hours on it.

It's particularly annoying because Entourage gets indexed fine.

chantc said...

I just hope that the new Thunderbird (maybe v3) will have inbuilt integration to spotlight, or at the very least, spotlight friendly.

Other than the search though, I still prefer Thunderbird than Mail, especially the lightning plugin for Thunderbird.

Bruno G said...

I guess most if the issue comes from the (hard-coded?)list of directories Leopard Spotlight ignores.

I had Thunderbird 2.0 and Leopard Spotlight work satisfactorily.... at least it is good enough for me but it is still far from the kind of integration you get between and Spotlight.

Here are the numerous steps I took to get it working (I use two GMail accounts managed via IMAP)

1- get the Thunderbird.mdimporter from Double clicking on it should install it in /Library/Spotlight/.

2- in Thunderbird Preferences -> Advanced -> General -> Configuration Editor. Set mail.spotlight.enable to true

3- reboot your mac and verify that the Thunderbird.mdimporter is registered by checking the output of /usr/bin/mdimport -L

4- create a Thunderbird.emails directory in ~/Documents/

5- make sure Thunderbird is not running and copy the ~/Library/Thunderbird/files/xxx.default/ImapMail directory in your newly created Thunderbird.emais directory. If you are adventurous and short on disk space, you cant try a move, but you are on your own and a symbolic link does not do the job.

6 - kill the network, start Thunderbird and go to Account Preferences. For each account, change the Local Folder setting under Server Setting to point to the new corresponding directory under ~/Documents/Thunderbird.emails/ImapMail/.

7- restart Thunderbird, start the network and make sure everything is working.

8- delete the ~/Library/Thunderbird/files/xxx.default/ImapMail directory

Spotlight searches should return your emails under the Documents category.

a- Generation of .mozeml files by Thunderbird takes very long and follows its own logic. Be patient. You can check the live progress of their creation by typing mozeml in the search textbox of the Spotlight window
b- Generating those mozeml files
- defeat the purpose of IMAP if you use IMAP to avoid a local copy of your emails.
-significantly increase the HD space requirements. each mozeml file is 4K and some are 8 times that size.


chantc said...

Thanks for your explanation. For your information, the link to the mdimporter is not the latest. Refer to my other post for the latest link.

I notice that you're using IMAP other than POP3, though. I'm not sure if it matters but I did roughly the same process as you for my mail accounts, including shifting it to Documents, but it never did work for me in Leopard (Based on 10.5.2).

My 10,000+ old emails were never indexed again. However, every new email that comes in after I enabled spotlight was indexed, but not searchable in spotlight.

I think I'll take my chance with waiting for Thunderbird v3 before I try again. Been too busy lately at work to do this "experiment".

Once again, thanks for sharing and detailing the steps that you did. :)

Visit Rhinestic's Knick Knacks @ Etsy for handmade goods and supplies!

Related Posts Plugin for WordPress, Blogger...