Leopard's Spotlight isn't searching email messages. I made a clean install of 10.5, and have two POP accounts. The message files are right there under ~/Library/Mail/... . I rebuilt the index for the system volume by adding and then removing the volume from the Privacy zone in Spotlight preferences. I also tried some of the command-line suggestions posted elsewhere for this problem. I recently added my backup volume to the privacy zone, but other than that the zone is empty.
But the problem remains. Outside Mail.app, Spotlight never comes back with search results that are mail messages. Inside Mail.app, searching "entire message" returns 0 results. Does anyone know how to diagnose this problem? Can I see if a particular file is included in the metadata index?
I'm seeing that too actually. When I manually index my messages (see my coming post below), I have to select All Mailboxes + Entire Message for it to work.
This lets me search mail in Spotlight and inside Mail (as long as I select All Mailboxes). But I don't know why INBOX.mbox isn't being treated correctly by the Spotlight importer. (See previous messages for how to find out if your INBOX.mbox is being imported wrong.)
so you have the same root cause of the problem, only that you are not able to resolve it by just deleting the additional Mail.app as i was able to. Hm. I'm assuming you did re-login and also restarted your machine to try to force the UTIs to get claimed properly?
If mdimport -d1 ~/Library/Mail still gets you the wrong dynamic UTIs for .mbox there is properly another email application on your system claiming these? Does not need to be Apple only! Keep searching, I think you are near to the solution.
In the meantime the following command (from my first post) eases your import:
You must copy the command exactly like that, including the space-backslash-semicolon in the end. With that you do not need to specify your Mailboxes maually one by one.
There must also be a way to question the system which application is claiming which UTI. I just can't remember. Try searching macosxhints.com. I'll try too if I find the time.
Ecke, I tried removing one application that might have done something funny (a programming language app) and restarted, with no luck. If there is some app that is causing problems, it's hard to know what it is. The only things I've installed are Factor (that programming language app), StuffIt, a Samsung printer driver, and the Apple developer tools.
OK. But I took your advice and went to look for hints at macosxhints.com. They have a blurb about rebuilding the launchservices database. Here's the command:
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
After running this command, my INBOX.mbox is the proper type! I can mdimport ~/Library/Mail and have it index my mail! This is progress. I don't know how to prove that the system is now properly watching and re-indexing new messages, aside from waiting, but this may have solved the problem for me!
Has any one found a fix for this?
I'm still doing manual imports of my mail boxes so I can search them.
If I don't do this I can't search contents of new emails.
I just started having this problem on my MacBook Pro laptop and it covered ALL user accts. Up until a few days ago, search 'Entire Message' worked just fine, but today, no results on any search. I tried all the hints in this list to no avail.
I finally got it to work but turning off Time Machine which was pointing to a remote drive connected to another Mac and mounted wirelessly. Note that it did take over 24 hours for the initial backup to complete which was early this AM. I noticed this evening that another index was running on the remote backup drive. I tried turning that off in the 'Privacy' tab of Spotlight, but even after a reboot, I still couldn't search in Mail.
Finally, turning off Time Machine AND rebooting magically fixed the problem. All searching in mail now works for all accounts and is fast as to be expected.
Thank you.
Turning TM off, rebooting then back on again has fixed it for me.
It will now index my mail, and new email coming in.
Search is now working on contents.
Thank you.
as a lot of other people, I am unable to search my mailboxes in Mail 3; I read the discussion and suggestions; I tried out the following one (after checking that I had only one Mail.app on my MacBook Pro and turing off TimeMachine:
I entered mdimport ~/Library/Mail in terminal and I got the following error message:
* Failed to decode 8bit data, treating as binary
No idea what all that means
OK, so I tried this "solution". My problem was not exactly the same as that described, in that I could search mail using All Mailboxes and Entire Message, but not individual mailboxes. I didn't get any font problem show up. Exported Mail and re-imported everything, let Spotlight re-index the whole drive. NOW I cannot get any kind of search in Mail at all!
Thank you, MikeW. I was having the same problem with Spotlight not indexing any of my mailboxes--they all showed as "package" instead of "Mail Mailbox". The following solution was suggested, and even though it seemed a bit scary, I tried it. And, it worked perfectly.
Enter these commands in Terminal--
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
mdimport ~/Library/Mail
This worked like a charm. It indexed all of my mailboxes, even nested as deep as three levels. Now, I can find specific phrases in both the Finder and Mail searches.