Fix Mail.app indexing issues under 10.3

Aug 02, '04 09:44:00AM

Contributed by: kaih

This is an update to the Reduce mailbox sizes in Mail hint published last year, by deleting the index files and letting Mail.app recreate them. Now, under 10.3, everything's different...

In ~/Library/Mail, you will see various folders, like POP-user@host.domain.com, and another folder called Mailboxes, where all the rest of the mail is stored on your Mac. As you drill down into the folders, you will see that each .mbox package contains the following files:

Now, of all these files, only the mbox file is essential, the rest will all be rebuilt if they don't exist. If you have problems with the actual mbox file itself, there are utilities out there that can work with these files. If the mbox file is OK, but one (or more) of the other files are corrupt, you can delete them (quit Mail first), and Mail will happily rebuild them the next time you view that mailbox.

I was having some weird problems with Mail hanging with 100% CPU usage, and trying to retrieve messages that I'd already deleted, so I took the shotgun approach (after backing everything up) and did the following ... *WARNING - THIS WILL DELETE FILES ON YOUR COMPUTER*. Quit Mail first, then open the Terminal, and type:
% cd ~/Library/Mail
% find . -name '.index.ready' -delete
% find . -name 'content_index' -delete
% find . -name 'table_of_contents' -delete
This series of commands went through and deleted all the indexes and table of contents from all my Mail folders. Upon launching Mail again, each time I opened up a mailbox (simply by viewing it), the status area in Mail would show me that it was re-indexing all the messages. I then went through and marked everything as read, and it's all OK now.

Comments (6)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20040729192248562