Postfix header_checks using tcp_table and checkdbl.pl script
Postfix implements the header_checks as built-in content inspection classes while receiving mail. Usually the best performance is obtained with pcre (Perl Compatible Regular Expression) tables or slower regexp (POSIX regular expressions). Googling on the net, i’ve found tiny perl script that can queries to dbl.spamhaus.org, multi.surbl.org, black.uribl.com. ( Sahil Tandon wrote it, based on João Gouveia perl script, i think..)
first download the script
# cd /etc/postfix # wget http://people.freebsd.org/~sahil/scripts/checkdbl.pl.txt
Rename and make it executable
# mv checkdbl.pl.txt checkdbl.pl # chmod 755 checkdbl.pl
Edit master.cf add this two lines
127.0.0.1:2526 inet n n n - 0 spawn user=nobody argv=/etc/postfix/checkdbl.pl
Make preliminary test, to ensure checkdb.pl sih really spawned and answering our queries
# postfix reload # telnet 127.0.0.1 2526