9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Skip Tavakkolian <9nut@9netics.com>
To: 9fans@9fans.net
Subject: [9fans] smtpd integration with spamhaus
Date: Fri, 24 Sep 2010 14:16:13 -0700	[thread overview]
Message-ID: <afdad87fc500c991e1a929b127a1ba6b@9netics.com> (raw)

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




             reply	other threads:[~2010-09-24 21:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-24 21:16 Skip Tavakkolian [this message]
2010-09-24 21:23 ` erik quanstrom
2010-09-24 21:27 Skip Tavakkolian
2010-09-24 22:00 ` erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=afdad87fc500c991e1a929b127a1ba6b@9netics.com \
    --to=9nut@9netics.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).