Apple Mail search & smart mailboxes stopped working

Since I upgraded to macOS Catalina this weak, the following features of Apple Mail no longer work:

  • Search
  • Flagged Mail
  • Smart Mailboxes

I have tried reindexing everything using Spotlight and also rebuilding the mailboxes, but neither of these things works. What can I do? This seems like a real mess-up by Apple.


Solution 1:

In such events where a problem arises due to multiple reasons, answers look like troubleshoot efforts. Cleaning up the comments, here's what I did on Mojave for an IMAP account:

    • Back up the relevant folder under ~/Library/Mail/ and then delete the original folder associated with the troubling account.
    • Hide the ~/Library/Mail/ from Spotlight index using Spotlight Preferences -> Privacy and revealing hidden folders in Finder layover.

    Spotlight Privacy Folder Selection

    • Restart Mail and wait for all the mails to get downloaded. And remove the said folder from Privacy in Spotlight Preferences. Let the indexing be complete. If anything breaks, use the backup folder.
    • Do step one(backup) of above and take screenshots of Mail Preferences in case account specific settings like "rules" break down.

    • In Internet Accounts in System Preferences, remove the account. Wait for some reasonable time, and add it back.

    • Again if anything breaks(as OP says, smart mailboxes, not for me), replace the new folder under ~/Library/Mail/V6 with the backed up one.

Solution 2:

Annoyingly, this seems to have been a problem with the initial release of macOS Catalina that disappeared when I installed the just-released Catalina update and rebooted. I tried all the steps mentioned in @ankii's answer (some of which were formerly in the comments), and unfortunately they didn't work, although evidently they have worked for many people in the past for problems very similar to this. Perhaps Apple quietly fixed this issue with the latest Catalina update, or it was a combination of the update and some of the previously-attempted steps.

Hopefully between these two answers, others who come across this question should find their solution!