SmtpRC is a program that can be used to scan entire networks for open mail

relays. It is multithreaded so it runs very fast and it is fully
configurable so it can be adjusted to suit any need. With more and more
broadband customers connecting to the internet everyday a great deal of
them are unknowingly running mail servers that are open to abuse from
spammers. SmtpRC was written to enable Systems Administrator to easily
detect those customers and take the appropriate action.
This commit is contained in:
Adrian Portelli 2003-10-05 19:05:55 +00:00
parent aa3b55088a
commit 109b75e944
10 changed files with 158 additions and 0 deletions

32
smtprc-gui/Makefile Normal file
View file

@ -0,0 +1,32 @@
# $NetBSD: Makefile,v 1.1.1.1 2003/10/05 19:06:39 adrian_p Exp $
.include "../../wip/smtprc/Makefile.common"
PKGNAME= ${DISTNAME:S/-/-gui-/}
COMMENT= Open relay scanner Tk GUI
USE_BUILDLINK2= YES
DEPENDS+= smtprc-[0-9]*:../../wip/smtprc
NO_CONFIGURE= YES
NO_BUILD= YES
USE_PERL5= YES
PKGDIR= ${.CURDIR}/../../wip/smtprc
PLIST_SRC= ${.CURDIR}/PLIST
REPLACE_PERL= gsmtprc
pre-install:
@${SED} -e 's#@PREFIX@#${PREFIX}#g' \
-e 's#@PKG_SYSCONFDIR@#${PKG_SYSCONFDIR}#g' \
< ${WRKSRC}/gsmtprc > ${WRKSRC}/gsmtprc.new
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/gsmtprc.new ${PREFIX}/bin/gsmtprc
${INSTALL_MAN} ${WRKSRC}/gsmtprc.1 ${PREFIX}/man/man1
.include "../../x11/p5-Tk/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"

3
smtprc-gui/PLIST Normal file
View file

@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2003/10/05 19:06:39 adrian_p Exp $
bin/gsmtprc
man/man1/gsmtprc.1

5
smtprc-gui/distinfo Normal file
View file

@ -0,0 +1,5 @@
$NetBSD: distinfo,v 1.1.1.1 2003/10/05 19:06:39 adrian_p Exp $
SHA1 (smtprc-0.9.7.tgz) = 4cca603733626d73f93a4221d490b8ae8d167017
Size (smtprc-0.9.7.tgz) = 41581 bytes
SHA1 (patch-aa) = d5af3b2e50ec37517f42ef5cab537ea99f8f6973

View file

@ -0,0 +1,25 @@
$NetBSD: patch-aa,v 1.1.1.1 2003/10/05 19:06:39 adrian_p Exp $
--- gsmtprc.orig Sat Apr 19 17:19:44 2003
+++ gsmtprc Sun Oct 5 20:55:54 2003
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!@PREFIX@/bin/perl -w
use strict;
use Tk;
@@ -59,10 +59,10 @@
# Variables to be used for scanning
my $var = {
- 'smtprc_bin' => "/usr/local/bin/smtprc",
- 'rcheck_config_file' => "/usr/local/etc/smtprc/rcheck.conf",
- 'email_template_file' => "/usr/local/etc/smtprc/email.tmpl",
- 'output_html_file' => "/www/htdocs/res.html",
+ 'smtprc_bin' => "@PREFIX@/bin/smtprc",
+ 'rcheck_config_file' => "@PKG_SYSCONFDIR@/rcheck.conf",
+ 'email_template_file' => "@PKG_SYSCONFDIR@/email.tmpl",
+ 'output_html_file' => "@PREFIX@/share/httpd/htdocs/res.html",
'ip_list_file' => "",
'ip_range' => "195.157.194.72-79",
'email_address' => "smtprc\@irc.warg.co.uk",

7
smtprc/DESCR Normal file
View file

@ -0,0 +1,7 @@
SmtpRC is a program that can be used to scan entire networks for open mail
relays. It is multithreaded so it runs very fast and it is fully
configurable so it can be adjusted to suit any need. With more and more
broadband customers connecting to the internet everyday a great deal of
them are unknowingly running mail servers that are open to abuse from
spammers. SmtpRC was written to enable Systems Administrator to easily
detect those customers and take the appropriate action.

36
smtprc/Makefile Normal file
View file

@ -0,0 +1,36 @@
# $NetBSD: Makefile,v 1.1.1.1 2003/10/05 19:05:55 adrian_p Exp $
.include "Makefile.common"
COMMENT= Open relay scanner
USE_BUILDLINK2= YES
ALL_TARGET= freebsd
PTHREAD_OPTS= require
CONF_FILES= ${PREFIX}/share/examples/smtprc/auto.conf \
${PKG_SYSCONFDIR}/auto.conf
CONF_FILES+= ${PREFIX}/share/examples/smtprc/email.tmpl \
${PKG_SYSCONFDIR}/email.tmpl
CONF_FILES+= ${PREFIX}/share/examples/smtprc/rcheck.conf \
${PKG_SYSCONFDIR}/rcheck.conf
pre-build:
@${SED} -e 's#@PREFIX@#${PREFIX}#g' \
< ${WRKSRC}/Makefile > ${WRKSRC}/Makefile.new
@${CP} ${WRKSRC}/Makefile.new ${WRKSRC}/Makefile
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/smtprc
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/smtprc
${INSTALL_PROGRAM} ${WRKSRC}/smtprc ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/auto.conf ${PREFIX}/share/examples/smtprc
${INSTALL_DATA} ${WRKSRC}/email.tmpl ${PREFIX}/share/examples/smtprc
${INSTALL_DATA} ${WRKSRC}/rcheck.conf ${PREFIX}/share/examples/smtprc
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/smtprc
${INSTALL_DATA} ${WRKSRC}/FAQ ${PREFIX}/share/doc/smtprc
${INSTALL_MAN} ${WRKSRC}/smtprc.1 ${PREFIX}/man/man1
.include "../../mk/pthread.buildlink2.mk"
.include "../../mk/bsd.pkg.mk"

15
smtprc/Makefile.common Normal file
View file

@ -0,0 +1,15 @@
# $NetBSD: Makefile.common,v 1.1.1.1 2003/10/05 19:05:55 adrian_p Exp $
DISTNAME= smtprc-0.9.7
PKGNAME= smtprc-0.9.7b
WRKSRC= ${WRKDIR}/smtprc
CATEGORIES= net mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=smtprc/}
EXTRACT_SUFX= .tgz
MAINTAINER= adrianp@stindustries.net
HOMEPAGE= http://irc.warg.co.uk/smtprc-website/index.html
USE_BUILDLINK2= YES
USE_PKGINSTALL= YES
PKG_SYSCONFSUBDIR= smtprc

5
smtprc/PLIST Normal file
View file

@ -0,0 +1,5 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2003/10/05 19:05:55 adrian_p Exp $
bin/smtprc
man/man1/smtprc.1
share/doc/smtprc/FAQ
share/doc/smtprc/README

5
smtprc/distinfo Normal file
View file

@ -0,0 +1,5 @@
$NetBSD: distinfo,v 1.1.1.1 2003/10/05 19:05:55 adrian_p Exp $
SHA1 (smtprc-0.9.7.tgz) = 4cca603733626d73f93a4221d490b8ae8d167017
Size (smtprc-0.9.7.tgz) = 41581 bytes
SHA1 (patch-aa) = 2961631c71c36cf4f901479e73365fc0a8bd50ae

25
smtprc/patches/patch-aa Normal file
View file

@ -0,0 +1,25 @@
$NetBSD: patch-aa,v 1.1.1.1 2003/10/05 19:05:55 adrian_p Exp $
--- Makefile.orig Thu Oct 2 16:17:39 2003
+++ Makefile Thu Oct 2 16:19:10 2003
@@ -5,7 +5,8 @@
INSTALL_PROG=install -c
MKDIR=mkdir -p
REMOVE=rm -rf
-LIBS=-lsocket -lnsl -lrt -lpthread
+LIBS=-L@PREFIX@/lib -Wl,-R@PREFIX@/lib -lpthread
+INCLUDE=-I@PREFIX@/include
all: freebsd
@@ -44,8 +45,8 @@
@echo " "
freebsd_build: parse_funcs.o relay_funcs.o connect.o func.o parse_args2.o display_results.o main.o relay_check2.o
- ${CC} $(CFLAGS) -c parse_funcs.c relay_funcs.c connect.c func.c parse_args2.c display_results.c main.c relay_check2.c -pthread
- ${CC} -o smtprc parse_funcs.o relay_funcs.o connect.o func.o parse_args2.o display_results.o main.o relay_check2.o -pthread
+ ${CC} $(CFLAGS) $(INCLUDE) -c parse_funcs.c relay_funcs.c connect.c func.c parse_args2.c display_results.c main.c relay_check2.c
+ ${CC} -o smtprc parse_funcs.o relay_funcs.o connect.o func.o parse_args2.o display_results.o main.o relay_check2.o $(LIBS)
freebsd_install_start:
${INSTALL_PROG} smtprc /usr/local/bin/smtprc