Whitebeam is a complete rapid development Web application server integrating Apache, Posgresql, Mozilla's SpiderMonkey JavaScript engine with it's own powerful XML/XPath based secure application framework.
The Postfix http map type allows you to hook up Postfix to a server with HTTP protocol, such as apache lighttpd nginx, etc. You need to write a CGI with C CPP Perl PHP etc, to complete the HTTP protocol to your database proprietary protocol conversion.