I recently setup several IMAP accounts in Leopard’s Mail.app and noticed that when I tried to quit Mail, it would “hang”. This seems to be a common problem and I found a fix which may work for you too.
Continue reading Tip: Leopard Mail.app won’t quit with IMAP