As first noted by Edward Marczak (Google cached version) Leopard Mail crashes when it tries to synchronize any changes you made to an IMAP mailbox while you were offline.
If you are stuck with a crashing Mail application and want to get back to work, quit Mail (if it didn’t do so on its own), go to ~/Library/Mail/ and move the IMAP-$your-account-name@imap-server folder that matches your offline-changed IMAP account to some other folder. Then, restart Mail. It will resync your local copy from your IMAP server. Of course, your changes are not in there. To find them, go into the folder you moved out and dig around :-).
This is not a solution to the problem. It is only a hint to get back to a working Mail quickly.
This helped me solve my exact problem. First hit on Google too. Thanks.