You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mojave upgrade has broken Spotlight index for Mail.app

Straight after upgrading to Mojave, I could see that Spotlight was stuck right at the beginning of the process (as shown on progress bar when you search it). Console showed a repeating message about mdworker denied access to my Mail folder.

Sandbox: mdworker(59214) System Policy: deny(1) file-read-data /Users/Jean/Library/Mail

Something must have gone wrong with the upgrade and failed to deploy a policy. Has anybody seen this problem? Any idea how one can manually adjust entitlements to allow mdworker to access my mail folder?

MacBook Pro with Retina display, OS X Mavericks (10.9.1)

Posted on Oct 16, 2018 4:14 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 5, 2018 12:47 AM

I had exactly the same problem after upgrading to Mojave and I have found a solution that hopefully should help you and others.


The problem here is likely caused by one or more obsolete Spotlight plugins. In particular, I had an old plugin installed called "_TagsMail.mdimporter" from CASEapps that was causing the mdworker task to crash when it tried to index the ~/Library/Mail folder. When I removed the plugin and restarted my Mac, the Spotlight indexing started working again. I suspect the mdworker tasks are now sandboxed in Mojave and the old plugin doesn't work correctly with sandboxing.


The steps to follow are:

1. Remove any obsolete plugins from ~/Library/Spotlight - especially "_TagsMail.mdimporter" if it's there

2. Also check /Library/Spotlight for any old plugins that haven't been updated recently

3. Restart your Mac

4. Now if you enable Spotlight indexing it should work


After I found the cause I searched and found this same issue described on Matthias Nott's blog:

https://www.mnott.de/_tagsmail-mdimporter-prevents-spotlight-in-mojave-to-finish /


I hope this solution works for you!

Similar questions

9 replies
Question marked as Top-ranking reply

Nov 5, 2018 12:47 AM in response to JeanMeanMachean

I had exactly the same problem after upgrading to Mojave and I have found a solution that hopefully should help you and others.


The problem here is likely caused by one or more obsolete Spotlight plugins. In particular, I had an old plugin installed called "_TagsMail.mdimporter" from CASEapps that was causing the mdworker task to crash when it tried to index the ~/Library/Mail folder. When I removed the plugin and restarted my Mac, the Spotlight indexing started working again. I suspect the mdworker tasks are now sandboxed in Mojave and the old plugin doesn't work correctly with sandboxing.


The steps to follow are:

1. Remove any obsolete plugins from ~/Library/Spotlight - especially "_TagsMail.mdimporter" if it's there

2. Also check /Library/Spotlight for any old plugins that haven't been updated recently

3. Restart your Mac

4. Now if you enable Spotlight indexing it should work


After I found the cause I searched and found this same issue described on Matthias Nott's blog:

https://www.mnott.de/_tagsmail-mdimporter-prevents-spotlight-in-mojave-to-finish /


I hope this solution works for you!

Nov 8, 2018 2:28 AM in response to JeanMeanMachean

My Spotlight has also been ruined since upgrading to Mojave. So far Apple had had me repair all my permissions, I've re-indexed in every possible way, I have removed all the old plugins from my spotlight library, I have unchecked the Bookmarks & History box on the Spotlight preferences and I have also reinstalled Mojave.

Spotlight still only works intermittantly. Something keeps breaking it.


Has anyone got any idea at all about what to do next!

Nov 8, 2018 3:28 AM in response to JeanMeanMachean

I suspect this is probably caused by a hidden setting that allows the full path to be displayed in the title bar of Finder windows. You might have previously used a utility like TinkerTool (https://www.bresink.com/osx/TinkerTool.html) to change this? If so, downloading TinkerTool is probably the easiest way to change it back. See the "Show selected path in window title" setting on the Finder page.


The setting can also be changed from the command line in Terminal - see this web page: https://www.tekrevue.com/tip/show-path-finder-title-bar/


Hope that helps!

Nov 8, 2018 3:52 AM in response to silversun-lordmelbury

While the original issue in this thread related specifically to the Mail app, it sounds like you have a more general problem with Spotlight? What is it that you are seeing that is only working intermittently? More specifics about the problem would help.


In general the first step is to understand whether the Spotlight index is being built successfully.


1. If you click on the Spotlight menu and type in some text, do any results show up?

2. When you type in some text, is there an Indexing progress bar at the top of the top of the Spotlight results window? (Similar to http://www.extensions.in.th/amitiae/2014/prefs/images/spot_1.png)


If the index has finished building successfully there should be no indexing progress bar and there should be multiple results found in different categories.


Depending on the answers I may be able to suggest further things to check.

Nov 8, 2018 5:24 AM in response to afs707

My problem is that spotlight will work fine for a bit but then stops working normally. If you then search for something it can take about 2 minutes before the searches come back. During that time the spotlight search bar displays no results and has a greyed out no parking type sign on the right hand side. Never used to do anything like that before Mojave upgrade....

Mojave upgrade has broken Spotlight index for Mail.app

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.