postfwd (short for Postfix Firewall Daemon) is a Postfix policy server
that is written in Perl. It allows to define flexible and complex rules
to block access to the mail system before the actual message has been
accepted. The ruleset configuration supports features like scoring,
grouping, date and time based dependencies together with DNSBL lookups
and policy delegation (e.g. postgrey).