Resynching Mail.app with mutt and IMAP accounts

Feb 21, '03 10:03:00AM

Contributed by: shawga

I was accessing a Linux mail server with IMAPs and mail.app. I was also periodically accessing the same server with Mutt. I found that after accessing with Mutt, mail.app would sometimes get confused and show me the header for a message, but the body would be from email from months previous. To fix, I blew away the old mailbox information found in ~/Library -> Mail -> IMAP:account@hostname. Get out of Mail, and try the following to force Mail.app to re-sync from scratch:

 % cd ~/Library/Mail/IMAP:account@hostname/
 % rm -rf Deleted Messages.imapmbox INBOX.imapmbox Junk.imapmbox
At that point, I got back into mail.app, it re-synced and everything looked normal. The only thing that I can figure out is that some signature matched between old, deleted email and new email. Perhaps mutt was confusing it. Regardless, I lost nothing, but messages now make sense.

[robg adds: Although probably not necessary given the intent of the hint is to remove them, you might wish to create a backup of the three directories before you rm -rf them ... just in case!]

Comments (7)


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