Ni!Mail is a webmail connecting to an IMAP server and using python/nevow/twisted to provide a clean and fast interface. It uses nevow livepage, a library that uses XMLHTTPRequest, to make it very dynamic.
IMAP4 server working on top of SQL database (currently PostgreSQL but Oracle may work too). It has some unique features like elimination of duplicate messages throughout the whole system, possibility of clustering or load balancing etc.