So coincidentally I was just looking into this earlier this week. I just got a server to host the blog I've been working on and figured hey, why don't I try self-hosting my email while I'm at it.
Turns out there are plenty of good open source webmail frameworks: Roundcube, Mailpile, Zimbra and RainLoop are all freely available and ridiculously easy to set up.
The issue is that they're all just front-ends for the horribly complex and difficult to configure backend of a modern email server (SMTP/POP3/IMAP). You can configure them to hook into Google/Yahoo/Other smtp servers, but then why bother — you're back where you started.
I had no understanding of how broken email was until I tried to set up a simple SMTP + IMAP server using postfix + courier.