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.imapmboxAt 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.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20030218124955274