I made a clean install of Lion, configured Mobile Me in System Preferences.

So, when I opened Mail, my Mobile Me account was already configured and it started downloading my mails.

Everything worked fine except search. I can't search among every mails. The only search I can do using is "from" or "to" a contact of my address book.

Searching the web, I discovered some potential solutions that I tried unsuccessfully. Here's a list of what I already done :

  • repairing permissions
  • disabling Spotlight and re-enabling Spotlight for my whole disk (via the preference pane & via the terminal)
  • deleting the "envelope-index" file and get mail re-index all my mails
  • rebuilding each mailboxes
  • deleting ~/Library/Mail, ~/Library/Mail Downloads, ~/Library/Preferences/com.apple.mail.* in order to start over
  • starting again from my ~/Library/Mail folder from my Snow Leopard installation.
  • starting again without configuring Mobile Me in system preferences but directly in Mail (as different computer user)

None of these actions fixed my problem.

Have you got any ideas?

Edit :

I made a new clean install of Lion on an external hard drive, configured my Mobile Me account directly when opening Mail.app and everything worked fine. I tried to copy Mail.app-related files to my main installation of Lion, but that didn't work. My latest solution would be install Lion again on my internal hard drive, but I would prefer not to do so. I'm still hoping there's another solution.

  • What happens when you try a search? Are there erros? Do no results show up? – Nathan Greenstein Aug 5 '11 at 17:22
  • No error, no result. However, I think a "token" should be created and it is not. When I search for a contact, it creates a token. When I search among all content, it doesn't create any token. As I didn't try Lion on any other computer, I am not sure how things should be. If a screenshot would be helpful, please let me know what you would like to see. Thank you ! – olivier Aug 5 '11 at 17:32
  • I would restore a copy of your Snow Leopard mail folders from ~/Library/Application Support to a new user on your Lion to see if it just needs a fresh attempt at rebuilding the database for Lion. You can do this while the network is off to avoid contamination / confusion. (and if spotlight sees into none of the mail files - then you have deeper spotlight privacy or corruption issues) – bmike Aug 5 '11 at 17:55
  • I have no solution for you, but wanted to chime in that I have the same problem and would be very happy indeed if someone did have a solution. (What is even weirder is that I can search for keywords in Spotlight, but not Mail.) – user9940 Aug 16 '11 at 6:22
  • A Spotlight search was also working for me. I solved my problem by reinstalling Lion, but you should look at my question to see every things I tried, maybe one of them will work for you. – olivier Aug 16 '11 at 10:09

I had the same problem and it turned out the index was broken.

A rebuild didn't work for me so I had to quit Mail and type (in the terminal):

cd ~/Library/Mail/V2/MailData/
rm -rf Envelope\ Index Envelope\ Index-shm  Envelope\ Index-wal

After that, reopening the Mail app took some time for the index to rebuild but it fixed the search index.

Thanks to MacRumors for the answer

  • I already did that, see my question. Also, I reinstalled Lion and it worked well, see my answer. Thanks anyway. – olivier Aug 25 '11 at 7:41

I don't know if we are having the same problem but I initially thought we did until I fixed it. For some reason I had the "Mail" folder under the Privacy tab in Spotlight in System Preferences.

Removing the folder from the and Mail worked fine again.

I doubt you did the same but I can't hurt mentioning this..


Does restoring a copy of your Snow Leopard mail folders from ~/Library/Application Support to a new user in Lion have the same problem? That's saved me in the past when an upgrade didn't work so well in mail.

  • I'm sorry to answer you so late but I didn't got the chance to try before now. I just tried and it didn't work, unfortunately. Thanks anyway ! – olivier Aug 10 '11 at 8:34
  • Wow - that's unfortunate - the remaining potential culprits are going to be hard to test / fix. OS level issues or some data specific bug are the worst to troubleshoot. – bmike Aug 10 '11 at 15:51
  • Unfortunate it is ! I tried a new clean install and it worked (see "edit" section in my question). Something goes wrong on my main install, but what ? – olivier Aug 10 '11 at 20:50
  • Ugh. Would you try moving the folder ~/Library/Mail/V2 to the desktop or the trash while Mail is quit? You might be able to get it to re-download the content rather than reinstalling Lion. – bmike Aug 10 '11 at 20:56
  • Still no luck… :( I'll probably reinstall this weekend. Thank you for your advices ! – olivier Aug 11 '11 at 9:21

Doing a clean install of Lion again and configuring Mail.app before the Mobile Me preferences pane solved the problem for me.

(this didn't work as a new user on my old installation)

That's probably overkill, but I tried everything I could without success, so…


Go to Mail preferences > Accounts > MobileMe account > Advanced tab. Look for a setting labeled "Keep copies of messages for offline viewing", and make sure it is set to keep copies of messages, otherwise Spotlight can't populate its index with your message contents.

  • I already checked that and it keeps local copies of messages. Unfortunately, this won't be the solution to my problem. Thanks anyway ! – olivier Aug 10 '11 at 8:36

I had a similar problem with my IMAP accounts and I could only search for keywords in new emails (= mails that arrived AFTER I upgraded to Lion). Rebuilding the index solved this problem for me.

Mailbox -> Rebuild

See also: http://docs.info.apple.com/article.html?path=Mail/2.0/en/ml1136.html

  • As I said in the question, I already tried to rebuild my mailboxes (more than once). In addition, the search in content never worked in my case (old or new mails). Thanks, though. – olivier Aug 13 '11 at 13:40

My solution was to delete the index files which Mail rebuilt unprompted:


  • I already did that, see my question. Also, I reinstalled Lion and it worked well, see my answer. Thanks anyway. – olivier Aug 25 '11 at 7:42
  • Welcome to Ask Different! Answers on Ask Different need to be more than just a link. It's okay to include a link, but please summarize or excerpt it in the answer. The idea is to make the answer stand alone. Please take a look at the FAQs for more info. Thanks. – Nathan Greenstein Jan 11 '12 at 16:05
  • The link is now broken, so this answer has become more or less worthless (especially since someone else has given intstructions on deleting index files in another answer) – drevicko Jan 27 '16 at 11:43

You should also try deleting the Spotlight index and forcing Spotlight to re-index your entire hard drive.

I'm sure there's a command line action for this, but I use the commercial utility MacPilot.

enter image description here

  • I already did that, see my question. Also, I reinstalled Lion and it worked well, see my answer. Thanks anyway. – olivier Aug 25 '11 at 7:42

My Mail and spotlight searching stopped working at some point in 10.7.2.

Re-Indexing Spotlight did not work nor rebuilding the Mail inboxes.

What just now seems to have worked though, is I notice there was a "_spotlight" user listed on my Users folders permissions. This I think is something to do with ACL. Doing a search, I found that you could try and get spotlight to index on attached AFP partition And the "_spotlight" user was involved.

Using apples server app I shared my Users folder. This re added the "_spotlight" with custom permissions. And I deleted the old one ("_spotlight" ) from the same user permissions pane.

I un-checked all share options. i.e afp smb.

Spotlight started indexing and I can now do searches in Mail and the finder.

If I Un-share again I cannot get search results. Switch sharing on again I can.

  • Thanks markhunte, I didn't correlate my Mac OS X Lion Mail search breaking with my installing the Lion Server tools. I saw that the Lion server started the File Sharing server for me, which I wasn't using. I removed all the share points and disabled the File Sharing server. Later I noticed that Mail search was broken, but your post is what put it together for me. Re-adding the /Users share point and re-enabling File Sharing in Server.app allowed Mail.app search to work again. – user17660 Jan 24 '12 at 5:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .