I'm honestly surprised that there isn't yet any open-source software (client and server) that mimics Gmail but works with any IMAP service.
If there is room for many email apps (Sparrow, Apple Mail, Mutt, Outlook, Thunderbird), there should be a market for many web-based email backends and there should be room for an open-source Gmail analogue that be people can extend and improve.
Someone ought to make a web-mutt.