SquirrelMail. Yes, I know, it's written in PHP. I installed it on our
outside server at work so that we could read our mail when we are travelling. It has servered us well for three years now. I run it as a https site so that there is some protection for the IMAP login.
I have written a web-mail client in Perl, but this is far better (plus I don't have to do the support).