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.
I run roundcube on my server for webmail access. It's a web-based IMAP client. I'm not sure what you want from a server that isn't already available in the existing open source IMAP servers.
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.