aaron wolfe blxpsargmailcom wed feb 27 2008 250 pm bob proulx wrote marc perkel wrote appears postfix dns blacklists whitelists going publish whitelist postfix instructions guess cant would better question postfixusers list probably way check_policy_service functionality permit action permit request havent created policy daemon though academically derived answer according manual policy delegation preferred method adding policies postfix bob heres hacked version postfixpolicyd uses results hostkarma rbl im sure improved upon works postfixpolicydspfperl httpwwwopenspforgsoftware version 2004 c 2007 scott kitterman c 2007 julian mehnle c 20032004 meng weng wong program free software redistribute andor modify terms gnu general public license published free software foundation either version 2 license option later version program distributed hope useful without warranty without even implied warranty merchantability fitness particular purpose see gnu general public license details received copy gnu general public license along program write free software foundation inc 51 franklin street fifth floor boston 021101301 usa hacked query hostkama aaron use strict use iohandle use iosocket use syssyslog qwdefault setlogsock use netaddrip use netdns use fcntl require etcepsconfigpl configuration adding handlers easy handlers name hostkarma_lookup code hostkarma_lookup verbose 0 default_response dunno syslogging options verbose mode fatal errors note comment syslog_socktype line syslogging work system syslog_socktype unix inet unix stream console syslog_facility mail syslog_options pid syslog_ident postfixhk_lookup use constant localhost_addresses map netaddripnew_ qw 1270008 ffff127000104 1 postfix ever say client_addressffff use constant relay_addresses map netaddripnew_ qw 6913218025 72357319332 add addresses qw separated spaces using cidr notation results_cache message instance dns netdnsresolvernew initialization log error abort sub fatal_exit syslogerr fatal_exit _ syslogwarning fatal_exit _ sysloginfo fatal_exit _ diefatal _ unbuffer standard output stdoutautoflush1 process runs daemon cant log terminal use syslog people actually see messages setlogsocksyslog_socktype openlogsyslog_ident syslog_options syslog_facility main receive bunch attributes evaluate policy send result attr chomp key value split _ 2 attrkey value next elsif length syslogwarning sprintfwarning ignoring garbage 100s _ next verbose sort keys attr syslogdebug attribute ss _ attr_ message_instance attrinstance cache definedmessage_instance results_cachemessage_instance action default_response foreach handler handlers handler_name handlername handler_code handlercode response handler_codeattr attr cache cache verbose syslogdebug handler handler_name response pick whatever response dunno response response dunnoi sysloginfo handler decisive handler_name action response last sysloginfo policy actions attrqueue_id action stdoutprintactionactionnn attr hostkarma lookup sub hostkarma_lookup local _ _ attr _attr result dunno color pink attrclient_address md13d13d13d13 laddr 4321hostkarmajunkemailfiltercom query dnsqueryladdr query foreach rr grep _type eq queryanswer rraddress eq 127001 whitelisted result ok color white elsif rraddress eq 127002 blacklisted result reject attrclient_address blacklisted hostkarmajunkemailfiltercom color black elsif rraddress eq 127003 yellow listed result prepend xhostkarma yellowlisted attrclient_address color yellow elsif rraddress eq 127004 brown listed result prepend xhostkarma brownlisted attrclient_address color brown sysloginfo hostkarma says listed attrqueue_id attrclient_address color returnresult thu 07 aug 2008 224447 0500 quick postfix question ot