Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.5: Force Spotlight to index old Mail messages Apps
I'm not sure if this is a 10.4 problem as well as 10.5, but it's something I've only just noticed.

I installed OS X from scratch, after backing-up my data. I then imported my old mailboxes into Leopard's Mail program using the Import feature.

So far so good. But when I used Spotlight (or even Mail's own search box) to look for an old message I knew was there, it didn't show up. Only a new message I'd just received showed up. In fact, my tests showed all imported messages slip under Spotlight's radar, even after I used MainMenu to rebuild Spotlight's index.

The solution was to use the Rebuild function under the Mailbox menu in Mail. Hey presto -- everything is now indexed, and old messages can be searched for. I assume that this forced Mail to reprocess the messages, thus allowing Spotlight to, erm, spot them.
    •    
  • Currently 2.25 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[15,696 views]  

10.5: Force Spotlight to index old Mail messages | 5 comments | Create New Account
Click here to return to the '10.5: Force Spotlight to index old Mail messages' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Force Spotlight to index old Mail messages
Authored by: jwz on Jan 30, '08 12:23:31PM
There's a much faster way to make Spotlight re-index all of your email: just run "mdimport -f" on each file like so:

find "$HOME/Library/Mail/Mailboxes" -name '*.mbox' -exec mdimport -f '{}' ;

Failing that, you can tell Spotlight to re-index the entire drive by doing:

mdutil -E /


[ Reply to This | # ]
10.5: Force Spotlight to index old Mail messages
Authored by: jwz on Jan 30, '08 12:25:02PM

(There should be a backslash before that final semicolon -- I typed it, but the comment form ate it.)



[ Reply to This | # ]
10.5: Force Spotlight to index old Mail messages
Authored by: ProfGumby on Jan 31, '08 08:50:44PM

what was the -f option for mdimport intended to do??

when trying it it says it's obsoleted and does nothing.
man mdimport says the -f switch is obsolete in leopard and beyond, and not finding anything on the 'net about it;
just wondered if I should/could use a different option instead but don't know what it was for;
thanks;



[ Reply to This | # ]
10.5: Force Spotlight to index old Mail messages
Authored by: pediger on Jan 31, '08 09:49:07PM

From the 10.4.11 man page:

-f Force mdimport to scan the files, bypassing path filtering rules.

I'm afraid I'll have to leave it to someone else to explain exactly what it does. (Ignore Privacy exclusions???)



[ Reply to This | # ]
10.5: Force Spotlight to search MAIL
Authored by: popser on Feb 10, '08 08:15:00AM

In my MAIL 3.1 which came with my new Mac (OS10.5.1) I can search mail using FROM, TO, and SUBJECT, but it will not search a folder or all folders using ENTIRE MESSAGE, nor will Spotlight search MAIL. I tried rebuilding mailboxes--no luck. I tried the advice to use Terminal and insert (find "$HOME/Library/Mail/Mailboxes" -name '*.mbox' -exec mdimport '{}' \;). No luck. Spotlight still could not find text within MAIL messages, nor could MAIL itself. Any other ideas? I really need the search function which worked fine in 10.2, 10.4, but not in 10.5.1.



[ Reply to This | # ]