2

I'm trying to delete obvious (virus, spam, scam) email anyway from Apple's Mail.app.

Getting error: File 7936.emlx could not be opened, because the file doesn't exist.

That's rough translate from the Finnish error I get. However, when I click that mail in trash I can see it warning from trashmail.

I'm using Avira but disabling it didn't help, also avira can not remove it because of the same error, however avira shows it as quarantined thread as well...

OSX El Capitan 10.11.6 and Apple Mail 9.3 (3124)

  • I'd guess you have to persuade Avira to give it back; Mail's lost it because it's in quarantine, but still thinks it's there because Avira did the job badly. – Tetsujin Sep 9 '16 at 9:54
  • I removed avira after removing all items from quarantine (could not restore them because they don't exist), but no luck – Diamonte Sep 9 '16 at 10:12
  • maybe try an index rebuild - see apple.stackexchange.com/a/161504/85275 though note that El Capitan now has a V3 folder too. Slightly different version of the same thing at apple.stackexchange.com/a/174732/85275 – Tetsujin Sep 9 '16 at 10:15
  • the last one did the trick, I had to manually delete the Envelope Index files, then it took a while to do stuff like "import" mails etc... – Diamonte Sep 9 '16 at 12:56
  • Glad you got it:) Let me drop that across as an answer, as it's not really a duplicate of the other question, so might be easier for future Googlers to find. – Tetsujin Sep 9 '16 at 12:58
2

One big change since El Capitan - Mail is now in V3
Earlier OSes used the V2 folder.

Try clearing the saved state, rebuilding & reindexing the database...

Clear Saved State

  • Switch to Finder, Cmd ⌘ N for a new window, then Cmd ⌘ Shift ⇧ G for Go To...
  • copy/paste ~/Library/Saved Application State/com.apple.mail.savedState then Enter ⌅
  • This is an alias to the real location, so Right-click & Show Original
  • Delete the entire com.apple.mail.savedState folder.

Rebuild; Re-index

Source: How to fix Apple Mail by rebuilding and reindexing the Mailbox

Step 1: Rebuild
Rebuilding a Mailbox in Mail sounds daunting but it really isn't.

  • Launch Mail, select one of your mailboxes and click on the Mailbox menu. At the bottom of the pane choose the Rebuild option. If you have a large mailbox, you can expect the process to take a few hours.
  • You must repeat this step for each one of your Mailboxes.
  • While the process takes place, you may experience system performance lag, as it can consume a lot of system resources and memory.

Another caveat, if you use IMAP or Exchange with any of the accounts, the process will redownload every message from the server, so you'll use a lot of bandwidth.

Now that you've completed these steps, work with Mail a little longer. If you are still having issues, or Mail fails to launch, you should try a manual reindex.

Step 2: Re-index

Manual reindexing of Mail messages is the only way to go if the application has become so unresponsive it barely works at all, search is not functioning correctly or the app won't launch.

Mail will automatically attempt to reindex your messages if it detects problems with the mailboxes, but sometimes a manual reindex is the best option. If you are still having problems with Mail after following step one, try manual reindexing.

  • Quit Mail if it’s open.
    To get to your home Library folder, hold down the Option key, then in the Finder choose Go > Library.
  • In ~/Library/Mail/V3/MailData, delete any file that begins with “Envelope Index,” such as Envelope Index or Envelope Index-shm. (Before you actually delete the files, it makes sense to copy them to a folder on your desktop.)
  • Launch Mail and the app will build new Envelope Index files -- this can take a long time if there are numerous messages to go through.
  • If everything seems to be working correctly, you can now delete the copies of the "Envelope Index" files from your desktop.

In most cases, these two tips should solve most Mail problems

My own answer copied from Mail.app crashes constantly, even after deleting mail profile and cache as they are not really duplicates

  • I think that some (most) of the Mail.app searching is done by the Spotlight system, and just rebuilding the "Envelope" indexes will not get the Spotlight index rebuilt like support.apple.com/en-ca/HT201716 or using something like Onyx titanium.free.fr/onyx.html – j-beda Sep 10 '16 at 17:07
  • Presumably, if it's doing its job, it will see things have changed & re-index it. It fixed the OP's issue anyway. – Tetsujin Sep 10 '16 at 17:37
  • I just thought that since your solution said it was applicable if "search is not functioning correctly" that adding info about Spotlight re-indexing would be good. Mail.app does not index message contents, so having Mail.app rebuild its indexes will not have Spotlight rebuild the content searching indexes. – j-beda Sep 12 '16 at 11:31

You must log in to answer this question.

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