Hi all, just to mention that file permissions may interfere with indexing. Can't remember right now details how I fixed this some while ago (not with lion), but it was related to file owner and group. So must have done a brute force chown -R and chgrp -R. Isn't there some utility in the hidden restore partition of Lion that helps fix all this? I'm talking about user permission, not the usual disk utility repair (more useful to fix the system). I suspect it could also be related to ACL and/or extended attributes, that can be fixed with chown -N and xattr -c. Hope these leads can help.
Hey there. Just for the record, I experienced this again. I was working on a client's machine. She has been using Apple Mail for several years, and has many emails from me. I searched for emails from me while she was on Snow Leopard (last week) and they appeared. Subsequently, we upgraded her to Lion. We went back, opened Mail, then let Mail update. Then, we restarted the computer.
After restart we went to that user side and opened Mail. I did a search for emails from me, and none came up. What?!? So, I reindexed the HD in spotlight prefs. Should fix it, right? Nope. I repaired permissions and then let spotlight reindex again. Restarted, just to be sure. Searched for emails from me in Mail, and none... none came up.
So, clearly something - *something* - either corrupts or is simply in the wrong place or in the wrong syntax when an existing iteration of Mail from Snow Leopard or previous is upgraded into the Lion series of OSes. The only fix is to create the account again in a new user. We can talk about why that should or shouldn't happen, or why it doesn't make sense, but that seems useless since it is happening. With millions of lines of code, it's no wonder not everything makes sense. Regardless, that's what my data show: with myself, with this client, and (in hindishgt) with a couple others now.
Thought I'd throw in that I'm having the exact same problem. I upgraded to Mountain Lion from Lion Server, and wonder if something to do with permissions is to blame. My MacBook Pro searches Mail and Contacts just fine, with the same configuration as far as I can tell.
Guess I'll need to figure out either how to recreate the account as a new user, or do a clean install of Mountain Lion.
turns out this problem was triggered by update 10.7.5. This was established by useless fixing file privileges, disk checks etc. and several reinstall of Lion.
Apple knows. Not clear what they're doing: they released a patch for 10.7.5 and 10.8.2, but that's probably not the end of the story.
On my computer things settled as I reinstalled Lion and updated up to 10.7.4, not allowing update to 10.7.5. Things work fine now, just waiting for a fixed 10.7.5 or 10.7.6.
Best of luck, I hope you won't loose a several days, like I did.
After much research, I traced the problem down to Lion Server. I noticed a "_spotlight" entry in permissions under my home folder, which I promptly removed.
Fixing permissions, even booting into the resetpassword panel, didn't fix it, so I reinstalled Mountain Lion over the current installation.
That didn't fix it either, so I wiped the drive and did a clean install of Mountain Lion, and now everything works as it should.
I suppose Server gets its hooks deep into the OS, and can never be fully extricated.
Can I just say a huge, massive, gigantic THANK YOU! I have been toiling with this problem for months and it's been driving me up the wall. And then I noticed, like Bill here, that I'd followed every step to re-index spotlight as so many articles and people have suggested, but nothing would happen. I kept assuming it was indexing really fast, but realized that spotlight wasn't working right either when I tried searching for simple things that weren't coming up.
So I clicked the link of that article after I discovered that my spotlight was disabled from the command you provided, and followed the commands and it became enabled again. Then the re-indexing started! I searched in spotlight and mail first thing this morning and everything works perfectly as it used to. Hallelujah!! I've never been so frustrated over a problem and the solution was so simple in the end.
But how on earth did it become disabled in the first place? I wouldn't have a clue how to do that and would never want to, so how does that just happen? I'm just so glad I finally discovered this thread after months of on and off searching for answers. Thank you both so much!
Hi Glenn, I need your help! My mac email search and also the spotlight stopped working. I've read through the trails but am still a bit confused with what to do. The preferences side does have all the checked categories and the privacy tab is empty so I assume spotlight has access to search all. Mail searches on the other hand come up completely empty!
Also, I am suddenly getting work emails on my gmail. I have gotten some messages saying the server for my work email cannot be found but they say it is completely unrelated to their servers because I am getting other emails.
Any ideas on any of these two issues?
Thank you so much for your time.
Just to give you a quick reply. I have been busy and going out of town tomorrow, so I haven't been keeping up with the board for a while now. I wanted to suggest to you to just go ahead and post your own questions for both topics you mentioned so other will be able to help you.
A quick mention on the first problem. A better way might be for you to download ONYX.
You should go to the Maintenance tab, check the boxes for Spotlight Index and Mail Envelope Index and execute. That may take care of your search problem.
For you second problem, if the incoming server was the problem, you wouldn't be getting any messages for that account unless they were forwarded to your other account. The only way I can see that you would be getting your work emails in your gmail account is that you first sent a message out from you computer, it used the gmail SMTP server instead of the work SMTP server to send from because of a SMTP failure for that account, and the messages were recieved from the wrong account. Then the reply would have come back to the gmail account.
Open Mail's preferences and select the Account's tab. Highlight the work account and make sure the correct server is listed in the outgoing server list. If it isn't, select the correct one from the list and check the box to use only that server with that account. You can do the same for the other accounts you have.
Once that's done, if for any reason the SMTP server for that account fails, you will get a notification and an option to use a different server. That way you will know there is a problem instead of it just automatically selecting another server in the list when the one listed for the account fails.
Glenn suggestion worked for me!
My searches in Apple Mail were unable to find mail in the Sent Mail folder.
He suggested using ONYX.
Maintenance tab, then Rebuild sub-tab, check the boxes for Spotlight Index and Mail 's Mailboxes.
Problem solved for me!