Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 May 2004 15:23:07 +0200 (CEST)
From:      Jan-Peter Koopmann <j.koopmann@seceidos.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/66282: [NEW PORT] mail/p5-Mail-Vispan: PERL script which analyses the mail log file to produce useful stats
Message-ID:  <200405051323.i45DN74A009357@services.intern.seceidos.de>
Resent-Message-ID: <200405051330.i45DUIvV090418@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         66282
>Category:       ports
>Synopsis:       [NEW PORT] mail/p5-Mail-Vispan: PERL script which analyses the mail log file to produce useful stats
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 05 06:30:17 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Jan-Peter Koopmann
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
>Environment:
System: FreeBSD services.intern.seceidos.de 4.9-STABLE FreeBSD 4.9-STABLE #0: Mon Jan  5 10:56:46 CET
>Description:
Vispan is a PERL script which analyses the mail log file to produce 
useful statistics. It requires MailScanner to provide the necess
ary log file entries. At the moment the virus list is dependent on the 
virus scanner you have installed.

In order to detect the spam correctly it is strongly recommended to use 
SpamAssassin with MailScanner

The script can also use heuristics in the senders of the spam emails and 
can then automatically add them to the sendmail access file which will 
cause further mails to be rejected. After a definable period of time they 
will be removed from the access file and once again allowed to send mail 
to you.

I believe that this is superior to the RBLs that are maintained since 
you have control over them and it is specific to the behaviour of your 
particular mail server

The script produces the necessary output for MRTG and then calls MRTG 
to produce the graphs. This is configurable in the script.

Author:	david.while@uce.ac.uk
WWW:	http://www.while.homeunix.net/mailstats/

Generated with FreeBSD Port Tools 0.50
>How-To-Repeat:
>Fix:

--- p5-Mail-Vispan-1.4.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	p5-Mail-Vispan
#	p5-Mail-Vispan/pkg-descr
#	p5-Mail-Vispan/Makefile
#	p5-Mail-Vispan/pkg-plist
#	p5-Mail-Vispan/distinfo
#	p5-Mail-Vispan/files
#	p5-Mail-Vispan/files/patch-Vispan.conf
#	p5-Mail-Vispan/files/patch-install.pl
#	p5-Mail-Vispan/pkg-message
#
echo c - p5-Mail-Vispan
mkdir -p p5-Mail-Vispan > /dev/null 2>&1
echo x - p5-Mail-Vispan/pkg-descr
sed 's/^X//' >p5-Mail-Vispan/pkg-descr << 'END-of-p5-Mail-Vispan/pkg-descr'
XVispan is a PERL script which analyses the mail log file to produce 
Xuseful statistics. It requires MailScanner to provide the necess
Xary log file entries. At the moment the virus list is dependent on the 
Xvirus scanner you have installed.
X
XIn order to detect the spam correctly it is strongly recommended to use 
XSpamAssassin with MailScanner
X
XThe script can also use heuristics in the senders of the spam emails and 
Xcan then automatically add them to the sendmail access file which will 
Xcause further mails to be rejected. After a definable period of time they 
Xwill be removed from the access file and once again allowed to send mail 
Xto you.
X
XI believe that this is superior to the RBLs that are maintained since 
Xyou have control over them and it is specific to the behaviour of your 
Xparticular mail server
X
XThe script produces the necessary output for MRTG and then calls MRTG 
Xto produce the graphs. This is configurable in the script.
X
XAuthor:	david.while@uce.ac.uk
XWWW:	http://www.while.homeunix.net/mailstats/
END-of-p5-Mail-Vispan/pkg-descr
echo x - p5-Mail-Vispan/Makefile
sed 's/^X//' >p5-Mail-Vispan/Makefile << 'END-of-p5-Mail-Vispan/Makefile'
X# New ports collection makefile for:	p5-Mail-Vispan
X# Date created:		2004-05-05
X# Whom:			services-root <root@services.intern.seceidos.de>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	Vispan
XPORTVERSION=	1.4
XCATEGORIES=	mail perl5
XMASTER_SITES=	http://www.while.homeunix.net/mailstats/
XPKGNAMEPREFIX=	p5-Mail-
XDISTNAME=	${PORTNAME}-${PORTVERSION}
X
XMAINTAINER=	j.koopmann@seceidos.de
XCOMMENT=	PERL script which analyses the mail log file to produce useful stats
X
XBUILD_DEPENDS=	\
X	${SITE_PERL}/Number/Format.pm:${PORTSDIR}/textproc/p5-Number-Format \
X	${SITE_PERL}/HTTP/Date.pm:${PORTSDIR}/www/p5-libwww \
X	${SITE_PERL}/Mail/Sendmail.pm:${PORTSDIR}/mail/p5-Mail-Sendmail \
X	${SITE_PERL}/Mail/SpamAssassin.pm:${PORTSDIR}/mail/p5-Mail-SpamAssassin \
X	${SITE_PERL}/mach/Geo/IP.pm:${PORTSDIR}/net/p5-Geo-IP \
X	mrtg:${PORTSDIR}/net-mgmt/mrtg \
X	${LOCALBASE}/lib/MailScanner/MailScanner.pm:${PORTSDIR}/mail/mailscanner
X
XPERL_CONFIGURE=	yes
X
XPKGMESSAGE=	${WRKDIR}/pkg-message
X
X.include <bsd.port.pre.mk>
X
Xpost-patch:
X	${PERL} -pi -e \
X		's,/usr/bin/mrtg,${PREFIX}/bin/mrtg,g; \
X		s,/var/www/html/mrtg,${PREFIX}/www/vispan,g;' \
X		${WRKSRC}/Vispan.conf
X	${PERL} -pi -e \
X		's,/etc,${PREFIX}/etc,g;' \
X		${WRKSRC}/install.pl
X	${PERL} -pi -e \
X		's,/etc,${PREFIX}/etc,g;' \
X		${WRKSRC}/bin/Vispan
X
Xpost-install:
X	${INSTALL_DATA} ${WRKSRC}/Vispan.conf ${PREFIX}/etc/Vispan.conf.sample
X	@${SED} -e 's,%%PREFIX%%,${PREFIX},' pkg-message > ${PKGMESSAGE}
X	@${CAT} ${PKGMESSAGE}
X	${MKDIR} ${PREFIX}/www/vispan
X	${MKDIR} ${PREFIX}/www/vispan/images
X	${MKDIR} ${PREFIX}/www/vispan/thumbs
X
X.include <bsd.port.post.mk>
END-of-p5-Mail-Vispan/Makefile
echo x - p5-Mail-Vispan/pkg-plist
sed 's/^X//' >p5-Mail-Vispan/pkg-plist << 'END-of-p5-Mail-Vispan/pkg-plist'
X@comment $FreeBSD$
Xbin/Vispan
Xetc/Vispan.conf.sample
X%%SITE_PERL%%/mach/auto/Vispan/.packlist
X%%SITE_PERL%%/install.pl
X%%SITE_PERL%%/Vispan/MRTG.pm
X%%SITE_PERL%%/Vispan/Mailscanner.pm
X%%SITE_PERL%%/Vispan/ProcessLog.pm
X%%SITE_PERL%%/Vispan/Config.pm
X%%SITE_PERL%%/Vispan/Stats.pm
X%%SITE_PERL%%/Vispan/Sendmail.pm
X%%SITE_PERL%%/Vispan/Print.pm
X%%SITE_PERL%%/Vispan/Setup.pm
X@dirrm www/vispan/images
X@dirrm www/vispan/thumbs
X@dirrm www/vispan
END-of-p5-Mail-Vispan/pkg-plist
echo x - p5-Mail-Vispan/distinfo
sed 's/^X//' >p5-Mail-Vispan/distinfo << 'END-of-p5-Mail-Vispan/distinfo'
XMD5 (Vispan-1.4.tar.gz) = 685add61d9e146c082506bb433ff47c3
XSIZE (Vispan-1.4.tar.gz) = 19301
END-of-p5-Mail-Vispan/distinfo
echo c - p5-Mail-Vispan/files
mkdir -p p5-Mail-Vispan/files > /dev/null 2>&1
echo x - p5-Mail-Vispan/files/patch-Vispan.conf
sed 's/^X//' >p5-Mail-Vispan/files/patch-Vispan.conf << 'END-of-p5-Mail-Vispan/files/patch-Vispan.conf'
X--- ../Vispan-1.4.orig/Vispan.conf	Wed May  5 12:48:51 2004
X+++ Vispan.conf	Wed May  5 12:49:18 2004
X@@ -39,7 +39,7 @@
X # Use the sendmail access list to block persistent spammers
X # This should be set to 0 if not using sendmail or if you do not want
X # to use the facility.
X-UseAccess = 1
X+UseAccess = 0
X 
X # Use MRTG to graph the results
X UseMRTG = 1
X@@ -58,7 +58,7 @@
X AccessList = /etc/mail/access
X 
X # Location of the makemap command only used if UseAccess above is set
X-Makemap = /usr/bin/makemap
X+Makemap = /usr/sbin/makemap
X 
X # Location of the MRTG program
X MRTG = /usr/bin/mrtg
X@@ -72,7 +72,7 @@
X tmpfile = /tmp/virtmpfile
X 
X # Working directory to store files
X-WorkDir = /var/cache/vispan
X+WorkDir = /var/spool/vispan
X 
X # Directory to contain the generated HTML pages
X HTMLDir = /var/www/html/mrtg
END-of-p5-Mail-Vispan/files/patch-Vispan.conf
echo x - p5-Mail-Vispan/files/patch-install.pl
sed 's/^X//' >p5-Mail-Vispan/files/patch-install.pl << 'END-of-p5-Mail-Vispan/files/patch-install.pl'
X--- ../Vispan-1.4.orig/install.pl	Wed May  5 13:07:53 2004
X+++ install.pl	Wed May  5 13:08:13 2004
X@@ -43,22 +43,10 @@
X # Copy the Config file
X my $ConfigFile = '/etc/Vispan.conf';
X 
X-if(! -e $ConfigFile){
X-	$val = `cp Vispan.conf /etc`;
X-} else {
X+if( -e $ConfigFile){
X 	$val = `cp /etc/Vispan.conf /etc/Vispan.conf.old`;
X 	Setup::UpgradeConfigFile($ConfigFile);
X 	print "Your old config file has been saved in the /etc directory\n";
X         print "with an extension of .old\n";
X }
X 
X-#Configure a Cron Job
X-
X-if ( -e "/etc/cron.d/vispan" )
X-{
X-  print "/etc/cron.d/vispan already exists, not creating.\n";
X-}
X-else
X-{
X-  system("/bin/cp vispan.cron /etc/cron.d/vispan") == 0 or die "Error copying vispan.cron to /etc/cron.d/vispan!  $!\n";
X-}
END-of-p5-Mail-Vispan/files/patch-install.pl
echo x - p5-Mail-Vispan/pkg-message
sed 's/^X//' >p5-Mail-Vispan/pkg-message << 'END-of-p5-Mail-Vispan/pkg-message'
X*************************************************************************
X	    _  _____ _____ _____ _   _ _____ ___ ___  _   _ 	
X	   / \|_   _|_   _| ____| \ | |_   _|_ _/ _ \| \ | |
X	  / _ \ | |   | | |  _| |  \| | | |  | | | | |  \| |
X	 / ___ \| |   | | | |___| |\  | | |  | | |_| | |\  |
X	/_/   \_\_|   |_| |_____|_| \_| |_| |___\___/|_| \_|
X							
X	Please adjust %%PREFIX%%/etc/Vispan.conf
X	A sample Vispan.conf.sample file has been provided at
X	%%PREFIX%%etc as well.
X
X	Moreover you need to run %%PREFIX%%/bin/Vispan
X	periodically from your crontab. The time interval must match
X	your setting in %%PREFIX%%/etc/Vispan.conf.
X
X	Be sure to create the spool directory referenced in 
X	Vispan.conf. The default is /var/spool/vispan
X
X*************************************************************************
X
END-of-p5-Mail-Vispan/pkg-message
exit
--- p5-Mail-Vispan-1.4.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405051323.i45DN74A009357>