has anyone noodled the idea? spamhaus provides a dns server that
that can identify if an ip address is a known spammer[1]. i was thinking
either directly in /sys/src/cmd/upas/smtp/spam.c or through a cs like
program (parsing binary in shell?)
cpue% whatis spammers
fn spammers {@ {for(i in `{callers}){echo `{revip $i}^.zen.spamhaus.org
ip}}|>[2]/dev/null aux/rdwr /net.alt/dns}
cpue% whatis callers
fn callers {netstat -n /net.alt|awk '$5 == "25" && $NF ~ /.*\..*\..*\./ {print
$NF}'}
cpue% whatis revip
fn revip {@ {ifs=(.^'
');i=`{echo $1};echo $i(4)^.^$i(3)^.^$i(2)^.^$i(1)}}
cpue% spammers | grep 127
cpue% spammers | sed 10q
>
cpue% spammers
>
>
> 5.174.83.189.zen.spamhaus.org ip 127.0.0.11
>
>
>
> 16.6.16.123.zen.spamhaus.org ip 127.0.0.10
> 38.67.98.71.zen.spamhaus.org ip 127.0.0.10
...
[1] http://www.spamhaus.org/faq/answers.lasso?section=DNSBL%20Usage#202