I have an iMac and a MBP that are synced as portable home directories. Since I upgraded to Lion, when I switch machines (after syncing, of course), Mail always indicates that the index is broken and needs to be repaired. A process that takes 15 minutes at least.
I'm a bit at a loss because the portable home sync runs without errors...
Thanks for helping out.
Here's the solution (it's a bit drastic, but it works).
In wokgroup manager, exclude from preference sync the folder ~/Library/Mail/V2 altogether.
In order for this to work, the "Match" criteria should be set to "Starts with", otherwise (apparently) any downstream folders keep on getting synchronized.
Since I have done this, I have experienced no more problems switching between the 2 machines that share the same portable home directory.
Drawbacks: if you change anything to your accounts, signatures, smart mailboxes, you will have to duplicate this effort on the other machine (or at least copy over the relevant plist files in the ~/Library/Mail/V2/MailData folder), since these data will now no longer be synced.
Thanks to everyone who helped me out on this one!