Tortoise Mail is a POP3 and SMTP E-Mail Client written in PHP. By using PEAR Package DB, it supports many SQL-Based Databases (dbase, fbsql, ibase, ifx, msql, mssql, mysql, oci8, odbc, pgsql, sqlite, sybase). It is also PHP 5.x compatible.
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.