Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Samuel Gordon

macrumors member
Original poster
Aug 29, 2008
40
5
Czech Republic
Search in Mail.app doesn't work (it doesn't find anything), although I CAN find all mails through Spotlight. It didn't work 2 days ago and I was advised to rebuild the Spotlight index. It was a success and I thought that was the problem but it's broken again in Mail :(
 

phpmaven

macrumors 68040
Jun 12, 2009
3,466
522
San Clemente, CA USA
Search in Mail.app doesn't work (it doesn't find anything), although I CAN find all mails through Spotlight. It didn't work 2 days ago and I was advised to rebuild the Spotlight index. It was a success and I thought that was the problem but it's broken again in Mail :(

In Mail, do a Mailbox>Rebuild (from the menu) and see if that fixes it. If that doesn't work, call Apple, their support is great.
 

Samuel Gordon

macrumors member
Original poster
Aug 29, 2008
40
5
Czech Republic
Unfortunately, it didn't help :( And as for Apple support - I believe it's great in the USA but in the Czech Republic, there's only a support in English.
 

sidewinder

macrumors 68020
Dec 10, 2008
2,425
130
Northern California
Try this:

Quit the Mail app and go to this directory:

~/Library/Mail/V2/MailData/

Delete these files:

Envelope Index
Envelope Index-shm
Envelope Index-wal

Restart the Mail app. Don't freak out when you get the "Mail Message Import" dialog. Just hit "Continue".

Do your searches work now?

S-
 

Garrod

Suspended
Nov 13, 2008
194
105
UK
Search in Mail.app doesn't work (it doesn't find anything), although I CAN find all mails through Spotlight. It didn't work 2 days ago and I was advised to rebuild the Spotlight index. It was a success and I thought that was the problem but it's broken again in Mail :(

I had this earlier this morning. I just used Disk Utility and repaired the permissions on my main hard disk. That seemed to fix it a treat.
 

Samuel Gordon

macrumors member
Original poster
Aug 29, 2008
40
5
Czech Republic
sidewinder: No, it doesn't work. I think it does the same functionality as 'Rebuild'.

Garrod: Doesn't work either. To be honest, repairing disk permissions never worked for me as a solution :(

I really don't know, it's weird... I think you can't be of more help because I tried just everything.
 

laucutus

macrumors newbie
Aug 19, 2011
2
1
Eugene, OR
Quote:
Quit the Mail app and go to this directory:

~/Library/Mail/V2/MailData/

Delete these files:

Envelope Index
Envelope Index-shm
Envelope Index-wal

Restart the Mail app.



Sidewinder:
Thanks for the info; this worked for me, whereas rebuilding the mailboxes & turning on indexing on & on & on again didn't work.
I want to add that the ~/Library/Mail folder is hidden, and it took me a little while to realize that.
Thanks again,
Sam
 

ralphyy

macrumors newbie
Mar 4, 2012
1
0
Quote:
Quit the Mail app and go to this directory:

~/Library/Mail/V2/MailData/

Delete these files:

Envelope Index
Envelope Index-shm
Envelope Index-wal

Restart the Mail app.


Thanks for this.

The basic rebuild did nothing for me. But this delete files and rebuild did the trick.

(Why is buying a new computer such a pain in the a**?)

Thanks again.
 

Nord

macrumors member
Apr 28, 2010
80
7
Hi there people.

I have the same problem as Samuel, Mail search in Lion is inexistent. It finds nothing. Not even in Spotlight in my case. I've tried rebuild the Mail, to re-index spotlight, repair permissions, nothing. On iCloud.com directly, search takes minutes to find anything, while it took only a split second before; it's a pain.

I'll try to flush the files described to sidewinder and I'll come back to keep you in touch., but I think iCloud has to do something about it as well.
 

Nord

macrumors member
Apr 28, 2010
80
7
Unfortunately, it didn't work either. I even tried to un-checkbox and re-chebox the Mail in iCloud system preferences in vain. I'm out of ideas. I'm simply unable to search for anything in Mail and I have >8000 E-mails across 3 years, some are very important and I have to search them manually or flag them... Since I'm always on the move, Export is no option and it shouldn't be by an IMAP Mail.

It worked on Snow Leopard, Could iCloud and/or Lion be the problem ? Also, I find Spotlight to be very slow in comparison to Snow Leopard's. Spotlight could be the problem according to this blog:

http://blog.campodoro.org/?p=154

I'm trying this solution as a last option, but it's simply reindexing using the terminal, I've already done this with Onyx, so I doubt this will work.
 

sidewinder

macrumors 68020
Dec 10, 2008
2,425
130
Northern California
Nord,

Just do what the article says. Nothing it has you do is destructive. It wouldn't hurt to erase and rebuilt the index using this command:

sudo mdutil -E /

I always have the Mail.app keep messages and attachments local. Disk space is cheap and I like fast access.

S-
 

Nord

macrumors member
Apr 28, 2010
80
7
Thanks for the support sidewinder.

Strangely, this last command did work for me, where all other failed !
I have mail search back as it was.

You should try it Samuel !

Thanks. :)
 

harryal

macrumors newbie
Apr 3, 2012
4
0
Odd result with 'All' selected in Lion Mail search

Has anyone else had this one with Lion Mail search? It's missing one rather large mailbox when set to search 'All' mailboxes. Search of just that mailbox works fine. I get the same effect using a Smart Mailbox.

As we're just moving from Snow Leopard to Lion, with one installation of each just now, we can see that the SN Mail search of All mailboxes IS finding said mailbox - indeed this thing started because we noticed SN search was showing duplicate messages (but those duplicate pairs don't show up in Lion searches of 'All'). [The local mailboxes of both computers are identical, ultimately from a transfer of the same Entourage database contents into both copies of Mail.]

A rebuild of the 'missed' mailbox had no effect on this problem.
 

ArizonaLoco

macrumors newbie
Sep 16, 2011
4
0
Phoenix, AZ U.S.A.
Mail search in Lion not working

Try this:

Quit the Mail app and go to this directory:

~/Library/Mail/V2/MailData/

Delete these files:

Envelope Index
Envelope Index-shm
Envelope Index-wal

Restart the Mail app. Don't freak out when you get the "Mail Message Import" dialog. Just hit "Continue".

Do your searches work now?

S-

I tried this on my Lion 10.7.4 clean install and it didn't work for me. I'm going to try deleting the index and see if the rebuild helps.
 

ArizonaLoco

macrumors newbie
Sep 16, 2011
4
0
Phoenix, AZ U.S.A.
Nord,

Just do what the article says. Nothing it has you do is destructive. It wouldn't hurt to erase and rebuilt the index using this command:

sudo mdutil -E /

I always have the Mail.app keep messages and attachments local. Disk space is cheap and I like fast access.

S-

Unfortunately this also didn't work for me. Now I'm stumped. Looks like an all out web search is on for me.
 

McRCN

macrumors regular
Nov 19, 2010
144
3
Virginia
Nord,

Just do what the article says. Nothing it has you do is destructive. It wouldn't hurt to erase and rebuilt the index using this command:

sudo mdutil -E /

I always have the Mail.app keep messages and attachments local. Disk space is cheap and I like fast access.

S-

I had the same problem this morning and your advice fixed the problem.
 

pizzafootbal

macrumors member
Jul 24, 2010
53
0
Maybe you aren't searching correctly. If you are trying to search for someone who sent you something, make sure "from" is selected
 

rhawk301

macrumors newbie
Jul 31, 2012
1
0
Try this:

Quit the Mail app and go to this directory:

~/Library/Mail/V2/MailData/

Delete these files:

Envelope Index
Envelope Index-shm
Envelope Index-wal

Restart the Mail app. Don't freak out when you get the "Mail Message Import" dialog. Just hit "Continue".

Do your searches work now?

S-

worked for me! yeah!
 

pantaa.rheii

macrumors newbie
Nov 14, 2012
1
0
Hi,

I have a similar problem:

When searching for an email Mail will only search in the main mailboxes, not in any of the sub-mailboxes. I have three different email accounts (e.g. 'Account 1', 'Gmail', 'Account 3') and various mailboxes underneath each of them (e.g. '1 Actions pending', '2 Waiting for'). I have attached a screenshot.

I've tried the suggested solutions:
1) The rebuild function
2) Deleting the envelope files
3) Turning spotlight indexing on.
Nothing has changed.

Again, the search is working, but it doesn't include all my sub-mailboxes.

I would really appreciate any advice on this!
Thank you!
 

Attachments

  • mail screenshot.png
    mail screenshot.png
    265.6 KB · Views: 284

dramaticaudio

macrumors newbie
Jul 22, 2011
3
0
Just wanted to thank you guys for your information. Was having this problem, so I googled it and found the answer right here! :)
 

skafia

macrumors 6502
Apr 4, 2010
277
1
SOCAL
I've been having a similar issue and I accidentally added my main hard drive to the "do not search" list in Spotlight. Removing the hard drive and I'm able to search from mail again in Spotlight AND in the mail app.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.