From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <16cb46287d02e72db4f9dc496c6ac6e0@9netics.com> To: 9fans@9fans.net Date: Fri, 24 Sep 2010 14:27:34 -0700 From: Skip Tavakkolian <9nut@9netics.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] smtpd integration with spamhaus Topicbox-Message-UUID: 5a1e9d24-ead6-11e9-9d60-3106f5b1d025 oops! wasn't finished yet. i guess i'm getting the hang of "publish early and often" it should be easy, as my unfinished shell is showing. i'm not sure if i understand the behavior of spammers function when the output is piped to another program. any ideas? > 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