
Mtpolicyd is a modular policy daemon for postfix written in perl. It has support for virtual hosts, session caching, per-user configuration and is easily extensible thru plugins.
It already ships with a lot of plugins:
RBL - query DNS IP black/whitelists DBL - query DNS domain black/whitelists SqlList - use SQL query as black/whitelist CtIpRep - use Commtouch IP reputation GeoIP - use location of sending IP Fail2ban - block spammers with fail2ban/iptables Greylist - greylisting SPF - Sender Policy Framework Accounting - collect SMTP-level accounting information Quota - apply quota limits based on Accounting data and more... (see Documentation)