Ghost Apple Mail Messages: “Show in Mailbox”

January 3rd, 2010

I ended up with thousands of these ghost messages after moving from Eudora to Apple Mail with the help of Andreas Amann's brilliant Eudora Mailbox Cleaner. I didn't worry too much about it, as the messages were there in duplicate.

But after a while I got tired of seeing double messages when searching the old archives. I couldn't find any way to scare away these ghosts. Rebuilding the mailboxes didn't help. Nor did running duplicate message scanners.

Even the fantastic vacuum command line cleanup routine wouldn't get rid of the ghost messages with their "Show in Mailbox" in the top right corner. But vacuum did get speed up Apple Mail (highly recommended).

sqlite3 ~/Library/Mail/Envelope Index vacuum;

But finally I found the solution on a long dead Omni mailing list archive.

Here's how to stop the haunting. The issue is with the Envelope index. It needs to be deleted. Steps:

  1. Quit Apple Mail
  2. Open up ~/Library/Mail
  3. Delete Envelope Index
  4. Restart Apple Mail
  5. Sit back and wait as the full index is rebuilt

Don't do this if you are in a hurry. For my 270,000 messages, it takes about twenty minutes to index them all (pretty spiffy coding Apple Mail Team, getting through that many messages that quickly).

But when it's done, your messages will all still be in place, but your index will be a whole lot faster. I don't know why vacuum only partially cleans and why Apple Mail doesn't have an effective built-in cleaning mechanism. But I'm happy that all systems are go again. Now that you know this trick to, you won't have to care either.

As a footnote, I should say that I was initially a reluctant switcher from the poor departed Eudora (the most robust and configurable email client ever). But Apple Mail handles my huge database of messages astonishingly well and looks quite a bit better doing it.

IT | Comments | Trackback

del.icio.us Digg Ma.gnolia StumbleUpon Technorati Jump to the top of this page

 

3 comments on “Ghost Apple Mail Messages: “Show in Mailbox””

  1. 01

    Thanks Alec – this fixed the same problem I was having, and helped me retrieve an important message!

    (I’ve linked to this post from my blog: http://haizdesign.com/blog/mac-osx/show-in-mailbox/ )

    Stuart Haiz at August 17th, 2010 around 3:54 am
    Jump to the top of this page
  2. 02

    Glad it helped you Stuart! The “Show in Mailbox” issue drove me batty for about six months before I figured out the cure.

    alec at August 17th, 2010 around 7:24 pm
    Jump to the top of this page
  3. 03

    Thank you very much, just had that happen to me and its fixed now. Thanks a ton. it was very annoying

    Brian at October 19th, 2011 around 7:02 pm
    Jump to the top of this page

Leave a Reply

  •  
  •  
  •  

You can keep track of new comments to this post with the comments feed.