summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorcube <cube>2006-09-11 21:26:04 +0000
committercube <cube>2006-09-11 21:26:04 +0000
commitbd187ea00b4baa0715ddcd8a7ebc72a2435f6aec (patch)
tree5d56fa7442fc683a9821edb2fa86eac96532b3a1 /mail
parent07b6e3625e38d179161f0df1a36866cd844df6a2 (diff)
downloadpkgsrc-bd187ea00b4baa0715ddcd8a7ebc72a2435f6aec.tar.gz
Update to version 1.5, by Shaun Amott in PR#34492.
Changes since 1.4: * Converted to automake/autoconf for configuration, which should make it easier to extend portability. * Added support for checking multiple addresses in one invokation. * Added support for reading addresses to check from standard input, by specifying an argument of '-'. * Changed rbl.dorkslayers.com to relays.orbs.org, due to a change in management.
Diffstat (limited to 'mail')
-rw-r--r--mail/rblcheck/Makefile14
-rw-r--r--mail/rblcheck/PLIST11
-rw-r--r--mail/rblcheck/distinfo11
-rw-r--r--mail/rblcheck/patches/patch-aa111
4 files changed, 62 insertions, 85 deletions
diff --git a/mail/rblcheck/Makefile b/mail/rblcheck/Makefile
index 153066c8ceb..b47e9bbe27e 100644
--- a/mail/rblcheck/Makefile
+++ b/mail/rblcheck/Makefile
@@ -1,22 +1,24 @@
-# $NetBSD: Makefile,v 1.13 2006/03/04 21:30:02 jlam Exp $
+# $NetBSD: Makefile,v 1.14 2006/09/11 21:26:04 cube Exp $
-DISTNAME= rblcheck-1.4
+DISTNAME= rblcheck-1.5
CATEGORIES= mail
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=rblcheck/} \
- http://www.xnet.com/%7Eemarshal/rblcheck/
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=rblcheck/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://rblcheck.sourceforge.net/
COMMENT= Command-line interface to Paul Vixie's RBL filter
-DOCS= BUGS CHANGES CREDITS INSTALL PLATFORMS TODO
+USE_TOOLS+= gmake
+GNU_CONFIGURE= yes
+
+DOCS= README NEWS docs/rblcheck.ps
INSTALLATION_DIRS= bin
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/rblcheck ${PREFIX}/bin
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/rblcheck
- cd ${WRKSRC}/docs && \
+ cd ${WRKSRC} && \
${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/rblcheck
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/rblcheck/PLIST b/mail/rblcheck/PLIST
index 21d9ea92f0f..514b5fac418 100644
--- a/mail/rblcheck/PLIST
+++ b/mail/rblcheck/PLIST
@@ -1,9 +1,6 @@
-@comment $NetBSD: PLIST,v 1.1 2001/11/01 01:01:17 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2006/09/11 21:26:04 cube Exp $
bin/rblcheck
-share/doc/rblcheck/BUGS
-share/doc/rblcheck/CHANGES
-share/doc/rblcheck/CREDITS
-share/doc/rblcheck/INSTALL
-share/doc/rblcheck/PLATFORMS
-share/doc/rblcheck/TODO
+share/doc/rblcheck/NEWS
+share/doc/rblcheck/README
+share/doc/rblcheck/rblcheck.ps
@dirrm share/doc/rblcheck
diff --git a/mail/rblcheck/distinfo b/mail/rblcheck/distinfo
index f89670d48d9..41648afafa1 100644
--- a/mail/rblcheck/distinfo
+++ b/mail/rblcheck/distinfo
@@ -1,7 +1,6 @@
-$NetBSD: distinfo,v 1.3 2005/02/24 09:59:28 agc Exp $
+$NetBSD: distinfo,v 1.4 2006/09/11 21:26:04 cube Exp $
-SHA1 (rblcheck-1.4.tar.gz) = b4a5b1b13b7b469ca8a6a34775ba47b7ac3095fa
-RMD160 (rblcheck-1.4.tar.gz) = e0aab76a1cc41a446a20c6b51772e69a2343afbc
-Size (rblcheck-1.4.tar.gz) = 20646 bytes
-SHA1 (patch-aa) = 1bdd4b8f49f9431a148f39e42ee86acba416df8d
-SHA1 (patch-ab) = 4ca0d8de6705d9336bdd42e634ff5c2c09353932
+SHA1 (rblcheck-1.5.tar.gz) = 395e4bde8c2d3ec350e81a0af64cb63f82c4cdb3
+RMD160 (rblcheck-1.5.tar.gz) = 82dd687151175084d74958090877311d9d2e8f23
+Size (rblcheck-1.5.tar.gz) = 150395 bytes
+SHA1 (patch-aa) = 3c3ded88623fe118e020b36e68683a7cd2ab2f3d
diff --git a/mail/rblcheck/patches/patch-aa b/mail/rblcheck/patches/patch-aa
index 122075e9263..c3daaf7b58e 100644
--- a/mail/rblcheck/patches/patch-aa
+++ b/mail/rblcheck/patches/patch-aa
@@ -1,16 +1,19 @@
-$NetBSD: patch-aa,v 1.4 2001/02/14 06:02:44 itojun Exp $
+$NetBSD: patch-aa,v 1.5 2006/09/11 21:26:04 cube Exp $
---- rblcheck.c.orig Thu Aug 20 14:47:03 1998
-+++ rblcheck.c Wed Feb 14 15:01:20 2001
-@@ -79,6 +79,7 @@
+--- rblcheck.c.orig Thu Nov 8 14:05:27 2001
++++ rblcheck.c Wed May 1 08:19:16 2002
+@@ -28,8 +28,10 @@
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
+#include <arpa/inet.h>
#include <resolv.h>
#include <netdb.h>
++#include <unistd.h>
-@@ -203,7 +204,7 @@
+ /*-- PORTABILITY ------------------------------------------------------------*/
+
+@@ -184,7 +186,7 @@
* domain. If "txt" is non-zero, we perform a TXT record lookup. We
* return the text returned from a TXT match, or an empty string, on
* a successful match, or NULL on an unsuccessful match. */
@@ -19,7 +22,7 @@ $NetBSD: patch-aa,v 1.4 2001/02/14 06:02:44 itojun Exp $
{
char * domain;
char * result = NULL;
-@@ -214,12 +215,15 @@
+@@ -195,12 +197,15 @@
const u_char * cend;
const u_char * rend;
int len;
@@ -36,7 +39,7 @@ $NetBSD: patch-aa,v 1.4 2001/02/14 06:02:44 itojun Exp $
/* Make our DNS query. */
res_init();
-@@ -261,8 +265,8 @@
+@@ -242,8 +247,8 @@
cp = answer + sizeof( HEADER );
while( *cp != '\0' )
{
@@ -47,7 +50,7 @@ $NetBSD: patch-aa,v 1.4 2001/02/14 06:02:44 itojun Exp $
cp++;
}
-@@ -277,8 +281,8 @@
+@@ -258,8 +263,8 @@
cp += ( NS_INT16SZ * 2 ) + NS_INT32SZ;
/* Get the length and end of the buffer. */
@@ -58,7 +61,7 @@ $NetBSD: patch-aa,v 1.4 2001/02/14 06:02:44 itojun Exp $
/* Iterate over any multiple answers we might have. In
this context, it's unlikely, but anyway. */
-@@ -286,10 +290,10 @@
+@@ -267,10 +272,10 @@
rend = result + RESULT_SIZE - 1;
while( cp < cend && rp < rend )
{
@@ -73,73 +76,49 @@ $NetBSD: patch-aa,v 1.4 2001/02/14 06:02:44 itojun Exp $
{
if( *cp == '\n' || *cp == '"' ||
*cp == '\\' )
-@@ -308,23 +312,30 @@
- char **argv;
+@@ -289,22 +294,39 @@
+ * RBL listing, handling output of results if necessary. */
+ int full_rblcheck( char * addr )
{
- extern int optind;
- int a, b, c, d;
-+ extern char *optarg;
+ struct hostent *ent;
+ struct in_addr a;
- int quiet = 0;
- int txt = 0;
- int rblfiltered = 0;
+ int count = 0;
++ int rblchecking = 0;
char * response;
- struct rbl * rblsites = NULL;
struct rbl * ptr;
+ int fail;
+ int c;
- /* Add more sites you want in the default list of RBL-alike
- systems here. ### An easier way to change this is needed. ### */
-- rblsites = togglesite( "rbl.maps.vix.com", rblsites );
-- rblsites = togglesite( "rbl.dorkslayers.com", rblsites );
-+ rblsites = togglesite( "blackholes.mail-abuse.org", rblsites );
-+ rblsites = togglesite( "inputs.orbs.org", rblsites );
-+ rblsites = togglesite( "outputs.orbs.org", rblsites );
-+ rblsites = togglesite( "dialups.mail-abuse.org", rblsites );
-+ rblsites = togglesite( "relays.mail-abuse.org", rblsites );
-
- progname = argv[ 0 ];
-
-- while( ( a = getopt( argc, argv, "qtls:c?hv" ) ) != EOF )
-- switch( a )
-+ while( ( c = getopt( argc, argv, "qtls:c?hv" ) ) != EOF )
-+ switch( c )
- {
- case 'q':
- /* Quiet */
-@@ -372,10 +383,20 @@
- return -1;
- }
-
-- if( sscanf( argv[ optind ], "%d.%d.%d.%d", &a, &b, &c, &d ) != 4 ||
-- a < 0 || a > 255 || b < 0 || b > 255 || c < 0 || c > 255 ||
-- d < 0 || d > 255 )
-- {
-+ fail = 0;
-+ if (ent = gethostbyname(argv[optind])) {
-+ memcpy(&a, ent->h_addr_list[0], sizeof(a));
-+ if (ent->h_addr_list[1]) {
-+ fprintf(stderr, "%s resolved to mutiple addresses: ",
-+ argv[optind]);
-+ }
-+ fprintf(stderr, "checking %s\n", inet_ntoa(a));
-+ } else {
-+ if (!inet_aton(argv[optind], &a))
-+ fail++;
-+ }
-+
-+ if (fail) {
- fprintf( stderr, "%s: invalid IP address\n", progname );
- usage();
- return -1;
-@@ -383,7 +404,7 @@
-
for( ptr = rblsites; ptr != NULL; ptr = ptr->next )
{
+- if( sscanf( addr, "%d.%d.%d.%d", &a, &b, &c, &d ) != 4
+- || a < 0 || a > 255 || b < 0 || b > 255 || c < 0 || c > 255
+- || d < 0 || d > 255 )
+- {
++ fail = 0;
++ if ((ent = gethostbyname(addr)) != NULL) {
++ memcpy(&a, ent->h_addr_list[0], sizeof(a));
++ if (ent->h_addr_list[1]) {
++ if (!quiet && rblchecking == 0)
++ fprintf(stderr,
++ "%s resolved to mutiple addresses: ",
++ addr);
++ }
++ if (!quiet && rblchecking++ == 0)
++ fprintf(stderr, "checking %s\n", inet_ntoa(a));
++ } else {
++ if (!inet_aton(addr, &a))
++ fail++;
++ }
++
++ if (fail) {
+ fprintf( stderr, "%s: warning: invalid address `%s'\n",
+ progname, addr );
+ return 0;
+ }
- response = rblcheck( a, b, c, d, ptr->site, txt );
+ response = rblcheck( a, ptr->site, txt );
- printf( "%s%s%s%s%s%s", !quiet && !response ? "not " : "",
- !quiet ? "RBL filtered by " : "", !quiet ? ptr->site : "",
- txt && response && strlen( response ) && !quiet ? ": " : "",
+ if( !quiet || response )
+ printf( "%s %s%s%s%s%s%s", addr,
+ ( !quiet && !response ? "not " : "" ),