I fixed my issue, though it took hours of trial and error.
First, check Console (Applications/Utilities/Console) and click on All Messages in the left sidebar. I had a message about permission denied to copy a file during the upgrade. I manually moved that file to the desktop. After that the message migration finished, and Mail launched. Hurray I thought! But on reboot, Mail would not launch. It just hung. This time there weren't any helpful messages in Console to be found.
I read over these threads for the tips:
As best I can remember (it's been a long night), this was my process:
(Force) Quit Mail
Navigate to userI/Library/Mail folder
Move the entire Mail folder elsewhere, like your desktop
Launch Mail. At this point it should be be prompting you for info.
If you don't have anything on your machine only, just put in your info and download everything from your server from scratch. You're done! If however you have my problem with 164,000 messages stored locally, read on…
Back in user/Library there's a new Mail folder.
One by one, move the items from the old Mail folder to the new one and launch Mail. Make sure to move the user/library/mail/v2/maildata/accounts.plist first so it stops prompting you for account info. Make sure to quit Mail between every file move. If you don't see a v2 folder, or a v2-temp folder, it means the migration hasn't happened yet. Just keep moving things over until it does, cause the migration changes the directory structure of the Mail folder.
At the point you move your old archived messages over, the next Launch Apple will import and migrate all the messages. This can take anywhere from 2 minutes to 45 depending on how many messages it needs to cull through.
I ended up moving everything but the RSS folder items back, and Mail is once again stable.
At some point I also booted into Lion Recovery partition (hold Command + R at boot) and ran Disk Utility to repair permissions. However I don't believe that actually helped.
Thanks to Shenyard for the helpful tips, which certainly saved me hours more of Mail misery.
Who knows what part of these instructions did the trick, but my Mail has been working perfectly since I executed them.
Migration Assistant had ported over 500 MB+ of Mail mailboxes, from a G5 running Leopard 10.5.8, and did not provide seamless transfer, although other applications and files came over just fine.
Probably, it was the recommended review of Console messages and lifting out one or more named files that seemed related to Mail, that made things work.
*** Additional insurance for anybody venturing into Preferences and Libraries folder: I always keep a folder on my desktop where I move questionable files or preferences, and I label folders progressively, so I can find items I have moved, in case I need to reinstate them or revert to a previous Mail state.
This post saved me a call to Apple, which I could have done earlier since my 27" iMac is brand new-- but I seem to like beating my head against an operating system until one of us bleeds, before I make that rescue call.
If you find the Envelope Index file and delete it, this should force Mail to rebuild everything. It's found at this location:
This has fixed a lot of problems my clients who have a large amount of stored email. As always, make sure you have a full back of everything before doing any major upgrades, especially before upgrading to Lion. With Mountain Lion on the way, this is especially important since we don't know yet what changes are coming with the new Mail app.
I had this problem twice (two different computers). The first time I fixed it was a total pain. This time because of shenyard post about looking in Console I found an error file (or folder in my case) - removed it and presto - fixed the problem. Wish I had found this post the first time.