MB-IMAP is a GPL'ed IMAP4rev1 server written in C that uses
a Relational Database (RDBMS) like PostgreSQL, SAPDB, ...
for message storage.
It makes heavy usage of Stored Procedures which makes the
server cleaner because most stuff is done by those procedures
whereas the server itself does not much more than calling
them with the right parameters.
Right now, the primary database target is PostgreSQL (most stored
procedures are already written) using its PL/PGSQL
My secondary database target will be SAP-DB
(full blown commercial SQL-Database, now GPL'ed).