I've used SquirrelMail and it works with both IMAP and POP3. It's pretty good, simple and functional. However it does lack more advanced featuressuchs as threading, searching, etc. I personally wish it had.
SquirrelMail supports threading, if you use it against an imap server that supports it.
I use it with courier imap on an openbsd box and it works great./jtm