As simple as Mail.app > mailbox > rebuild

March 26, 2008 by jerome

Since a few days I had quite some troubles to get my emails right… they were were all mixed up: when clicking on an email of Damien for some quick modifications on a project we did recently, I was accessing an email, from my mother, which I received just after. Not a really practical situation to read and answer emails.

My first fear was a corruption on the IMAP server, but Mail.app on other computers were syncing email header, title and email content correctly so it was not a server side issue. There was definitely a corruption in the SQLite file on my local Mail.app and I was wondering about radical best practice to get things back to normal, like un-installing/cleaning/installing the mail folders. I’ve read a few articles about how to flush the SQLite database.

Mail.app extensively use SQLite to store emails, it is a C library that implements a self-contained, embeddable, zero-configuration SQL database engine, it is driven toward fast performance and embed-ability in local application.

Finally, thinking there was a simpler solution (because there is always a simpler solution) I stumbled upon the Rebuild item inside the Mailbox menu. If it is greyed, it might be because you did not select a Mailbox first. Upon selection, Rebuild will re-fetch the emails headers, and re do the caching - this can take some time before it’s completed.

email-rebuild.png

And Shazam!
All emails are back with their correct header/title/content …


No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment