As you can see from the screenshot, Mail has a problem with flagging emails. All emails in here were once flagged, but now only two of them actually are. Yet these emails persist in showing. Sometimes the total count is different to either number.

enter image description here

I have tried the basics: quit Mail, restarted my Mac. Any thoughts?

macOS 10.15.2

3 Answers 3


• Quit Mail if it’s open.

• In ~/Library/Mail/V7/MailData, delete any file that begins with “Envelope Index,” such as Envelope Index or Envelope Index-shm.

• Your home Library folder is hidden by default. To display it, choose Finder > “Go to Folder” and then enter “~/Library

• Open Mail.

• Mail creates new Envelope Index files. This process may take a few minutes, depending on how many messages Mail is reindexing.

• It will fix your issue.

"Message Import": Message Import

  • 1
    Does this imply that the indexing was broken? would a spotlight re-indexing solve also the problem?
    – seralouk
    Commented Nov 3, 2020 at 13:29
  • 1
    Great, this deleted all my flags, not only the ones that are wrong. Would have been very useful to have a statement about that in your answer. Really annoying situation for me now... It seems I can't replace the newly created Envelope Index files with the ones moved to trash anymore. :-( Commented Dec 18, 2020 at 13:06
  • 3
    UPDATE: I'm sorry, it indeed re-created the flags after a while, so my previous comment is not true. All good, just have some patience after starting Mail.app. :-) Commented Dec 18, 2020 at 13:53
  • 1
    This worked. It took about 18 minutes for Mail to reimport my [106,000+] emails.
    – bitFlipper
    Commented Jun 17, 2021 at 4:29
  • Worked for me in 2023. The directory was "Mail 10" instead of "Mail 7". It took about 3 minutes to import 177k emails after deleting the files on my 400Mbps internet connection. Then it took several more minutes after opening Mail for the flagged messages to be correct. Commented Aug 3, 2023 at 15:19

I had the same problem on MacOS Ventura 13.4. None of the proposed solutions mentioned in this and other threads worked (quit Mail / restart in safe mode / Rebuild mailboxes / ...) This, however, is very simple and worked:

  1. Go in Mail / Accounts
  2. Disable the email accounts
  3. Re-enable the email accounts
  • At least in Ventura 13.4.1 (22F82), this seems to be the way and not the accepted solution. Thanks!
    – lpuerto
    Commented Jul 9, 2023 at 19:16
  • This worked for similar problems with "unread" count as well. Commented Oct 17, 2023 at 0:13

Two things to try:

  • Find out which account they belong to, select it in the sidebar and rebuild the mailbox using Mailbox Menu. You would temporarily lose all attachments, and they'll be downloaded again.

  • If all the flagged emails have one color, select them all, and assign them a new flag.

You must log in to answer this question.

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