head 1.3;
access;
symbols
pkgsrc-2013Q2:1.3.0.42
pkgsrc-2013Q2-base:1.3
pkgsrc-2012Q4:1.3.0.40
pkgsrc-2012Q4-base:1.3
pkgsrc-2011Q4:1.3.0.38
pkgsrc-2011Q4-base:1.3
pkgsrc-2011Q2:1.3.0.36
pkgsrc-2011Q2-base:1.3
pkgsrc-2009Q4:1.3.0.34
pkgsrc-2009Q4-base:1.3
pkgsrc-2008Q4:1.3.0.32
pkgsrc-2008Q4-base:1.3
pkgsrc-2008Q3:1.3.0.30
pkgsrc-2008Q3-base:1.3
cube-native-xorg:1.3.0.28
cube-native-xorg-base:1.3
pkgsrc-2008Q2:1.3.0.26
pkgsrc-2008Q2-base:1.3
pkgsrc-2008Q1:1.3.0.24
pkgsrc-2008Q1-base:1.3
pkgsrc-2007Q4:1.3.0.22
pkgsrc-2007Q4-base:1.3
pkgsrc-2007Q3:1.3.0.20
pkgsrc-2007Q3-base:1.3
pkgsrc-2007Q2:1.3.0.18
pkgsrc-2007Q2-base:1.3
pkgsrc-2007Q1:1.3.0.16
pkgsrc-2007Q1-base:1.3
pkgsrc-2006Q4:1.3.0.14
pkgsrc-2006Q4-base:1.3
pkgsrc-2006Q3:1.3.0.12
pkgsrc-2006Q3-base:1.3
pkgsrc-2006Q2:1.3.0.10
pkgsrc-2006Q2-base:1.3
pkgsrc-2006Q1:1.3.0.8
pkgsrc-2006Q1-base:1.3
pkgsrc-2005Q4:1.3.0.6
pkgsrc-2005Q4-base:1.3
pkgsrc-2005Q3:1.3.0.4
pkgsrc-2005Q3-base:1.3
pkgsrc-2005Q2:1.3.0.2
pkgsrc-2005Q2-base:1.3
pkgsrc-2005Q1:1.2.0.12
pkgsrc-2005Q1-base:1.2
pkgsrc-2004Q4:1.2.0.10
pkgsrc-2004Q4-base:1.2
pkgsrc-2004Q3:1.2.0.8
pkgsrc-2004Q3-base:1.2
pkgsrc-2004Q2:1.2.0.6
pkgsrc-2004Q2-base:1.2
pkgsrc-2004Q1:1.2.0.4
pkgsrc-2004Q1-base:1.2
pkgsrc-2003Q4:1.2.0.2
pkgsrc-2003Q4-base:1.2
netbsd-1-6-1:1.1.1.1.0.6
netbsd-1-6-1-base:1.1.1.1
netbsd-1-6:1.1.1.1.0.8
netbsd-1-6-RELEASE-base:1.1.1.1
pkgviews:1.1.1.1.0.4
pkgviews-base:1.1.1.1
buildlink2:1.1.1.1.0.2
buildlink2-base:1.1.1.1
netbsd-1-5-PATCH003:1.1.1.1
netbsd-1-5-PATCH001:1.1.1.1
pkgsrc-base:1.1.1.1
TNF:1.1.1;
locks; strict;
comment @# @;
1.3
date 2005.03.26.05.19.20; author christos; state dead;
branches;
next 1.2;
1.2
date 2003.10.11.14.18.58; author grant; state Exp;
branches;
next 1.1;
1.1
date 2001.03.10.17.06.37; author wiz; state Exp;
branches
1.1.1.1;
next ;
1.1.1.1
date 2001.03.10.17.06.37; author wiz; state Exp;
branches;
next ;
desc
@@
1.3
log
@Switch to the host program from Greg Woods. This one is supported and more
featurefull.
@
text
@$NetBSD: patch-ad,v 1.2 2003/10/11 14:18:58 grant Exp $
--- rblookup.orig 1999-01-26 16:50:22.000000000 -0800
+++ rblookup 2003-03-19 14:18:44.000000000 -0800
@@@@ -12,8 +12,8 @@@@
# of the Mail Abuse Prevention System. See: http://maps.vix.com/rbl
#
# Syntax:
-# rblookup hostname
-# rblookup -i dottedquad
+# rblookup hostname ...
+# rblookup -i dottedquad ...
#
# Returns:
# zero if the given host was found on the blacklist.
@@@@ -45,24 +45,71 @@@@
# ----------------------------------------------------------------------
# This is where the ``host'' executable lives.
-BINDIR=/usr/local/bin
+BINDIR=@@PREFIX@@/bin
-PATH=${BINDIR}:/bin:/usr/bin:/usr/ucb ; export PATH
+PATH=${BINDIR}:/bin:/usr/bin ; export PATH
cmd=`basename $0`
-options="[-maps] [-orbs] [-i] [-v]"
-usage="Usage: $cmd $options hostname"
+options="[-dul] [-maps] [-orbs] [-relays] [-i] [-v]"
+usage="Usage: $cmd $options hostname|IP# ..."
# ----------------------------------------------------------------------
-# Configuration.
+# RBLs:
# ----------------------------------------------------------------------
-MAPSROOT="rbl.maps.vix.com"
+# MAPS RBL: Mail Abuse Protection System Realtime Blackhole List
+#
+#
+# This listing is human-operated, and is one of the most popular
+# blacklists of spam-originating systems. Originally started by Paul
+# Vixie, this is the original "RBL" system.
+#
+MAPSROOT="blackholes.mail-abuse.org"
+ALLRBLS="${MAPSROOT} ${ALLRBLS}"
+
+# MAPS DUL: Mail Abuse Protection System Dial-up User List
+#
+#
+# This list was started from a list compiled by "Afterburner" (the
+# head-honcho abuse guy at Erols Internet), and extended to be easily
+# added to over time. This service was originally called the ORCA
+# DUL, and was operated at "dul.orca.bc.ca". The MAPS project invited
+# Al Iverson, the then-current DUL maintainer, to host it on their
+# systems.
+#
+DULROOT="dialups.mail-abuse.org"
+ALLRBLS="${DULROOT} ${ALLRBLS}"
+
+# ORBS: Open Relay Behaviour-modification System
+#
+#
+# This is an listing of IP addresses that have been submitted by spam
+# victims and others and have been automatically tested and proven to
+# be the output ports of SMTP servers that will transmit at least one
+# message to any system for anyone (an "open email relay").
+# Administrators of listed servers can request re-testing and
+# automated systems will remove those that have proven to close their
+# relays. Input points of multi-level relays can be submitted too,
+# but only the output point is listed in the DNS RBL.
+#
ORBSROOT="relays.orbs.org"
+ALLRBLS="${ORBSROOT} ${ALLRBLS}"
+
+# RSS: MAPS Relay Spam Stopper
+#
+#
+# This is a list of e-mail relays which have been verified to have
+# been used to send spam. They supposedly have archives of the spam
+# they received through these relays. They do not list multi-level
+# relays (and thus miss a vast number of the actively exploited
+# systems out there -- I really hope they change this policy)!
+#
+RELAYSROOT="relays.mail-abuse.org"
+ALLRBLS="${RELAYSROOT} ${ALLRBLS}"
# ----------------------------------------------------------------------
-# Exit codes from
+# Exit codes from , just in case we are called from a mailer
# ----------------------------------------------------------------------
EX_OK=0
@@@@ -85,8 +132,11 @@@@
# ----------------------------------------------------------------------
verbose=
-reverse=
-orbs=
+reverse=false
+orbs=false
+dul=false
+maps=false
+relays=false
skip=
for i
@@@@ -95,7 +145,9 @@@@
case "$i" in
-orbs) orbs=true ;;
- -maps) orbs= ;;
+ -dul) dul=true ;;
+ -maps) maps=true ;;
+ -relays) relays=true ;;
-i) reverse=true ;;
-v) verbose="-v" ;;
-d) exec=echo ;;
@@@@ -105,28 +157,10 @@@@
shift
done
-# ----------------------------------------------------------------------
-# Process arguments.
-# ----------------------------------------------------------------------
-
-name="$1"
-
-[ "X$name" = "X" ] && fatal "$usage"
-
-# Remove trailing dots.
-name=`echo $name | sed 's/\.*$//'`
-
-if [ $reverse ]
-then
- # Assume this is already a dotted quad.
- addresslist="$name"
-else
- # Try to resolve domain name into dotted quad.
- addresslist=`host "$name" | awk '$2 == "A" {print $3}'`
-fi
+[ $# -lt 1 ] && fatal "$usage"
# ----------------------------------------------------------------------
-# Auxiliary routines.
+# More routines.
# ----------------------------------------------------------------------
invalid ()
@@@@ -180,20 +214,42 @@@@
exitstat=$EX_UNAVAILABLE
-for address in $addresslist
+for name in ${1+$@@}
do
+ # Remove trailing dots.
+ name=`echo $name | sed 's/\.*$//'`
+
+ if $reverse
+ then
+ # Assume this is already a dotted quad.
+ address="$name"
+ else
+ # Try to resolve domain name into dotted quad.
+ address=`host "$name" | awk '$2 == "A" {print $3}'`
+ fi
+
# Swap dotted quad labels.
invert
- # Construct proper name in map.
- [ $orbs ] && map="$ORBSROOT" || map="$MAPSROOT"
- name="$reversed.$map"
-
- echo "--- $name ---"
- $exec host $verbose -t A $name
- found=$?
- [ $found -eq $EX_OK ] && exitstat=$EX_OK
- [ $found -eq $EX_OK ] && $exec host $verbose -t TXT $name
+ rbllist=""
+ $orbs && rbllist="$ORBSROOT $rbllist"
+ $dul && rbllist="$DULROOT $rbllist"
+ $maps && rbllist="$MAPSROOT $rbllist"
+ $relays && rbllist="$RELAYSROOT $rbllist"
+
+ [ -z "$rbllist" ] && rbllist="$ALLRBLS"
+
+ for rbl in $rbllist
+ do
+ # Construct proper name in map.
+ name="$reversed.$rbl"
+
+ echo "--- $name ---"
+ $exec host $verbose -t A $name
+ found=$?
+ [ $found -eq $EX_OK ] && exitstat=$EX_OK
+ [ $found -eq $EX_OK ] && $exec host $verbose -t TXT $name
+ done
done
exit $exitstat
@
1.2
log
@fix some patches to eliminate fuzz.
patch from Jeremy C. Reed in PR pkg/20810.
@
text
@d1 1
a1 1
$NetBSD$
@
1.1
log
@Initial revision
@
text
@d3 2
a4 2
--- rblookup.orig Wed Jan 27 01:50:22 1999
+++ rblookup
d16 1
a16 2
@@@@ -44,25 +44,72 @@@@
# Setup environment.
d95 1
a95 1
@@@@ -85,8 +134,11 @@@@
d109 1
a109 1
@@@@ -95,7 +147,9 @@@@
d120 1
a120 1
@@@@ -105,28 +159,10 @@@@
d151 1
a151 1
@@@@ -180,20 +216,42 @@@@
@
1.1.1.1
log
@host-991529 -- powerful replacement for host(1).
Package provided by Greg A. Woods in pkg/12056, modified by me.
@
text
@@