I saw this post that mentions MailTags. This allows you to tag mail messages with metadata such as comments, due dates and other information. Once the messages are tagged, you can create Smart Mailboxes to automatically group these messages.
Unfortunately, it doesn't support IMAP mail boxes. Once this problem is solved, I will use it.