Courier-IMAP provides the IMAP support for Mozilla Thunderbird and in my case the backend for a webmail client like squirrelmail.
Filtering for your local user accounts can come from exim/postfix/sendmail or through procmail. In my setup, mail is received through exim, then handed off to procmail, which sorts and delivers my mail to ~/Maildir where my mail lives peacefully.
The IMAP server accesses the mail from that location and allows me to read, delete, etc it.
That sounds exactly like what I want to do. I guess I get confused because I often see procmail and exim mentioned in the same context...leading me to believe they do the same thing.
So, all I need to add is procmail. Currently, I guess exim sends the mail to my Maildir...and now I need to tell it to send to procmail instead. I'll read up on procmail and see how it might fit in.
Matt