Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Feb 2006 08:51:37 +0100 (CET)
From:      Jan-Peter Koopmann <j.koopmann@seceidos.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/93420: [MAINTAINER] mail/MailScanner: update to 4.50.15 Rev 1
Message-ID:  <200602160751.k1G7pb59070051@services.intern.seceidos.de>
Resent-Message-ID: <200602160800.k1G80NhC015920@freefall.freebsd.org>

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

>Number:         93420
>Category:       ports
>Synopsis:       [MAINTAINER] mail/MailScanner: update to 4.50.15 Rev 1
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 16 08:00:23 GMT 2006
>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:
- Update to 4.50.15 Revision 1

Added file(s):
- files/CHANGES.port
- files/patch-bin:cron:update_phishing_sites.cron
- files/patch-bin:cron:update_virus_scanners.cron

Changes: See CHANGES.port 
Mainly introduced a few more maintanence scripts but also fixed a bug in rc-start script for MailScanner.


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

--- MailScanner-4.50.15_1.patch begins here ---
diff -ruN --exclude=CVS /server-root/ports/mail/mailscanner--/Makefile /server-root/ports/mail/mailscanner/Makefile
--- /server-root/ports/mail/mailscanner--/Makefile	Wed Feb 15 11:46:59 2006
+++ /server-root/ports/mail/mailscanner/Makefile	Thu Feb 16 08:17:44 2006
@@ -7,6 +7,7 @@
 
 PORTNAME=	MailScanner
 PORTVERSION=	4.50.15
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/tar/
 DISTNAME=	${PORTNAME}-install-${PORTVERSION}-${PATCHLEVEL}
@@ -38,9 +39,9 @@
 	${SITE_PERL}/Time/Zone.pm:${PORTSDIR}/devel/p5-TimeDate
 
 RUN_DEPENDS=	${BUILD_DEPENDS} \
-		${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash2 \
-		${LOCALBASE}/bin/tnef:${PORTSDIR}/converters/tnef \
-		${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget
+		bash:${PORTSDIR}/shells/bash \
+		tnef:${PORTSDIR}/converters/tnef \
+		wget:${PORTSDIR}/ftp/wget
 
 OPTIONS=	SPAMASSASSIN "Install SpamAssassin" on \
 		CLAMAV "Install ClamAV" on \
@@ -144,6 +145,21 @@
 		s,/opt/MailScanner/etc,${PREFIX}/etc/MailScanner,g;' \
 		${WRKSRC}/bin/update_virus_scanners
 	${PERL} -pi -e \
+		's,/bin/bash,${LOCALBASE}/bin/bash,g; \
+		s,/opt/MailScanner/bin,${PREFIX}/libexec/MailScanner,g;' \
+		${WRKSRC}/bin/cron/update_virus_scanners.cron
+	${PERL} -pi -e \
+		's,/bin/bash,${LOCALBASE}/bin/bash,g; \
+		s,/opt/MailScanner/etc,${PREFIX}/etc/MailScanner,g;' \
+		${WRKSRC}/bin/update_phishing_sites
+	${PERL} -pi -e \
+		's,/bin/bash,${LOCALBASE}/bin/bash,g; \
+		s,/opt/MailScanner/bin,${PREFIX}/libexec/MailScanner,g;' \
+		${WRKSRC}/bin/cron/update_phishing_sites.cron
+	${PERL} -pi -e \
+		's,/etc/MailScanner/MailScanner.conf,${PREFIX}/etc/MailScanner/MailScanner.conf,g;' \
+		${WRKSRC}/bin/clean.SA.cache
+	${PERL} -pi -e \
 		's,/opt/MailScanner/var/MailScanner.pid,/var/run/MailScanner.pid,g; \
 		s,/usr/lib/sendmail,/usr/sbin/sendmail,g; \
 		s,/opt/MailScanner/bin,${PREFIX}/bin,g; \
@@ -168,19 +184,36 @@
 .endfor
 
 do-install:
-	# Step 1: Install libexec files
+	#
+	# Step 1: Install bin files
+	#
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/MailScanner ${PREFIX}/sbin/mailscanner
+	${LN} -s ${LOCALBASE}/sbin/mailscanner ${PREFIX}/sbin/MailScanner
+	#
+	# Step 2: Install libexec files
 	#
 	${MKDIR} ${PREFIX}/libexec/MailScanner
 	${CHMOD} -R ${BINMODE} ${PREFIX}/libexec/MailScanner
-	${INSTALL_SCRIPT} ${WRKSRC}/bin/MailScanner ${PREFIX}/libexec/MailScanner
 	cd ${WRKSRC}/lib && ${FIND} * -name "*-wrapper" -exec \
 		${INSTALL_SCRIPT} {} ${PREFIX}/libexec/MailScanner/{}.sample \;
 	cd ${WRKSRC}/lib && ${FIND} * -name "*-autoupdate" -exec \
 		${INSTALL_SCRIPT} {} ${PREFIX}/libexec/MailScanner/{}.sample \;
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/analyse_SpamAssassin_cache \
+		${PREFIX}/libexec/MailScanner/analyse_SpamAssassin_cache
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/clean.SA.cache \
+		${PREFIX}/libexec/MailScanner/clean.SA.cache
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/clean.quarantine \
+		${PREFIX}/libexec/MailScanner/clean.quarantine
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/update_phishing_sites \
+		${PREFIX}/libexec/MailScanner/update_phishing_sites
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/cron/update_phishing_sites.cron \
+		${PREFIX}/libexec/MailScanner/update_phishing_sites.cron
 	${INSTALL_SCRIPT} ${WRKSRC}/bin/update_virus_scanners \
 		${PREFIX}/libexec/MailScanner/update_virus_scanners
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/cron/update_virus_scanners.cron \
+		${PREFIX}/libexec/MailScanner/update_virus_scanners.cron
 	#
-	# Step 2: Install etc files
+	# Step 3: Install etc files
 	#
 	${MKDIR} ${PREFIX}/etc/MailScanner
 	${CHMOD} ${BINMODE} ${PREFIX}/etc/MailScanner
@@ -200,7 +233,7 @@
 		${PREFIX}/etc/MailScanner/mcp/${FILE}.sample
 .endfor
 	#
-	# Step 3: Install files in share
+	# Step 4: Install files in share
 	#
 	@${MKDIR} ${DATADIR}
 	cd ${WRKSRC}/etc && ${FIND} reports -type d ! -name "*.old" -exec \
@@ -210,7 +243,7 @@
 		-o \( -type f ! -name "*.orig" -exec ${INSTALL_DATA} {} ${DATADIR}/{}.sample \; \)
 	${CHMOD} -R ${BINMODE} ${DATADIR}/reports
 	#
-	# Step 4: Install lib
+	# Step 5: Install lib
 	#
 	${MKDIR} ${PREFIX}/lib/MailScanner/MailScanner
 	${MKDIR} ${PREFIX}/lib/MailScanner/MailScanner/CustomFunctions
@@ -219,11 +252,12 @@
 	cd ${WRKSRC}/lib/MailScanner && ${FIND} * -type f ! -name "*.orig" -exec \
 		${INSTALL_SCRIPT} {} ${PREFIX}/lib/MailScanner/MailScanner/{} \;
 	#
-	# Step 5: Docs & Manpages
+	# Step 6: Docs & Manpages
 	#
 .if !defined(NOPORTDOCS)
 	${MKDIR} ${DOCSDIR}
 	${INSTALL_DATA} ${FILESDIR}/README.FreeBSD.port ${DOCSDIR}
+	${INSTALL_DATA} ${FILESDIR}/CHANGES.port ${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${DOC_FILES} ${DOCSDIR}
 	cd ${WRKSRC}/docs && \
 		${FIND} * -type d -exec ${MKDIR} ${DOCSDIR}/{} \; && \
diff -ruN --exclude=CVS /server-root/ports/mail/mailscanner--/files/CHANGES.port /server-root/ports/mail/mailscanner/files/CHANGES.port
--- /server-root/ports/mail/mailscanner--/files/CHANGES.port	Thu Jan  1 01:00:00 1970
+++ /server-root/ports/mail/mailscanner/files/CHANGES.port	Thu Feb 16 08:42:12 2006
@@ -0,0 +1,26 @@
+Version 4.50.15_1
+=================
+- The MailScanner binary is now put into /usr/local/sbin allowing for
+  easy use of the command-line options for debugging etc.
+- From this version on all ports will contain this Change Log.
+- The following scripts are now installed by the port as well (into
+  /usr/local/libexec/MailScanner):
+	- analyse_SpamAssassin_cache
+	- clean.SA.cache (use this for manual clean or in crontab)
+	- clean.quarantine (use this for manual clean or in crontab)
+	- update_phishing_sites (use this for manual updates)
+	- update_phishing_sites.cron (use this in crontab)
+	- update_virus_scanners.cron (ise this in crontab)
+- The latter two can/should be used in your crontab for updating those
+  components. These scripts introduce a random delay for updating (can
+  be configured in rc.conf).
+- Fixed a small bug in mailscanner.sh script. Status/Stop was not
+  always working.
+
+Version 4.50.15
+===============
+- Upgrade to MailScanner 4.50.15-1
+- Start/Stop scripts are now rc.subr compliant. Please adjust your config!
+- The port now optionally installs Spamassassin, ClamAV and Bitdefender.
+- make renew-wrapper, renew-autoupdate and renew-reports now depend on 
+  configure instead of on install allowing their usage after a portupgrade.
diff -ruN --exclude=CVS /server-root/ports/mail/mailscanner--/files/README.FreeBSD.port /server-root/ports/mail/mailscanner/files/README.FreeBSD.port
--- /server-root/ports/mail/mailscanner--/files/README.FreeBSD.port	Sun Aug  8 19:16:18 2004
+++ /server-root/ports/mail/mailscanner/files/README.FreeBSD.port	Thu Feb 16 08:40:35 2006
@@ -1,17 +1,14 @@
 The MailScanner port is using the original MailScanner tarball from 
-www.mailscanner.info. This tarball puts all the MailScanner files in 
-subdirectories
+www.mailscanner.info. Unfortunatly the tarball consists of MailScanner
+and perl modules etc. MailScanner depends on. The port is not using
+Julians install.sh or the provided modules. All modules that MailScanner
+depends on are installed via ports as well.
 
-bin	MailScanner binary / MailScanner start script etc.
-etc	MailScanner config files / rules / report templates
-lib	Virus wrapper and autoupdate scripts / MailScanner Perl libraries
-docs	Documentation
-var	pid file
-
-In order to make this FreeBSD compliant the port installs those files
+In order to make the installation FreeBSD compliant the port installs files
 in the following directories:
 
-/usr/local/libexec/MailScanner	MailScanner binary, virus wrapper/autoupdate
+/usr/local/sbin			MailScanner binary
+/usr/local/libexec/MailScanner	virus wrapper/autoupdate, cron-scripts etc.
 /usr/local/lib/MailScanner	MailScanner Perl libraries
 /usr/local/share/MailScanner	MailScanner report templates
 /usr/local/share/doc/MailScanner	Documentation
@@ -20,22 +17,23 @@
 
 The port installs two start/stop scripts in /usr/local/etc/rc.d:
 
-mailscanner.sh.sample
-mta.sh.sample
+mailscanner.sh
+mta.sh
 
-My suggestion is to use these scripts instead of the usual FreeBSD MTA startup
+My suggestion is to use mta.sh instead of the usual FreeBSD MTA startup
 process. This of course means that you will have to disable MTA startup 
 in rc.conf completely. Put this in your rc.conf:
 
 sendmail_enable="NONE"
 
-Then adjust sendmail.sh or exim.sh to your configuration. Have a look at the
-MailScanner manpage for MTA setup hints.
+Please have a look at the provided start scripts for settings you have to
+make in rc.conf.
 
 When upgrading the port it will try to look for new options/variables in
 MailScanner.conf using Julians upgrade_MailScanner_conf script. If it finds
 changes it will create a newly merged MailScanner.conf and copy it to
-/usr/local/etc/MailScanner/MailScanner.conf.new.PORTVERSION.
+/usr/local/etc/MailScanner/MailScanner.conf.new.PORTVERSION. Moreover the 
+port will try to update all your languages conf files.
 
 
 If you have suggestions for this port please let me know and drop me an e-mail at
diff -ruN --exclude=CVS /server-root/ports/mail/mailscanner--/files/mailscanner.sh.in /server-root/ports/mail/mailscanner/files/mailscanner.sh.in
--- /server-root/ports/mail/mailscanner--/files/mailscanner.sh.in	Wed Feb 15 11:47:00 2006
+++ /server-root/ports/mail/mailscanner/files/mailscanner.sh.in	Thu Feb 16 08:32:14 2006
@@ -23,7 +23,7 @@
 : ${mailscanner_configfile="%%PREFIX%%/etc/MailScanner/MailScanner.conf"}
 : ${mailscanner_pidfile="/var/run/MailScanner.pid"}
 
-command="%%PREFIX%%/libexec/MailScanner/MailScanner"
+command="%%PREFIX%%/sbin/mailscanner"
 pidfile=${mailscanner_pidfile}
 command_args="${mailscanner_configfile}"
 
@@ -36,6 +36,8 @@
 }
 
 start_precmd=_ms_start_precmd
+
+procname="MailScanner"
 
 run_rc_command "$1"
 
diff -ruN --exclude=CVS /server-root/ports/mail/mailscanner--/files/patch-bin:cron:update_phishing_sites.cron /server-root/ports/mail/mailscanner/files/patch-bin:cron:update_phishing_sites.cron
--- /server-root/ports/mail/mailscanner--/files/patch-bin:cron:update_phishing_sites.cron	Thu Jan  1 01:00:00 1970
+++ /server-root/ports/mail/mailscanner/files/patch-bin:cron:update_phishing_sites.cron	Wed Feb 15 20:15:31 2006
@@ -0,0 +1,38 @@
+--- ../MailScanner-install-4.50.15.orig/bin/cron/update_phishing_sites.cron	Wed Feb 15 20:02:33 2006
++++ bin/cron/update_phishing_sites.cron	Wed Feb 15 20:14:45 2006
+@@ -1,20 +1,24 @@
+ #!/bin/bash
+ 
+-# Insert a random delay up to this value, to spread virus updates round
+-# the clock. 1800 seconds = 30 minutes.
+-# Set this to 0 to disable it.
+-UPDATEMAXDELAY=3600
+-if [ -f /etc/sysconfig/MailScanner ] ; then
+-        . /etc/sysconfig/MailScanner
+-fi
+-export UPDATEMAXDELAY
++# Add the following line to /etc/rc.conf to configure a maximum delay in
++# order to spread virus updates round the clock. 1800 seconds = 30 minutes.
++# Set this to 0 to disable it
++
++. /usr/local/etc/rc.subr
++
++name="mailscanner"
++rcvar=`set_rcvar`
++
++load_rc_config $name
++
++: ${mailscanner_updatemaxdelay="600"}
+ 
+ [ -x /opt/MailScanner/bin/update_phishing_sites ] || exit 0
+-if [ "x$UPDATEMAXDELAY" = "x0" ]; then
++if [ "x${mailscanner_updatemaxdelay}" = "x0" ]; then
+   :
+ else
+-  logger -p mail.info -t update.phishing.sites Delaying cron job up to $UPDATEMAXDELAY seconds
+-  perl -e "sleep int(rand($UPDATEMAXDELAY));"
++  logger -p mail.info -t update.phishing.sites Delaying cron job up to ${mailscanner_updatemaxdelay} seconds
++  perl -e "sleep int(rand(${mailscanner_updatemaxdelay}));"
+ fi
+ exec /opt/MailScanner/bin/update_phishing_sites > /dev/null 2>&1
+ exit 0
diff -ruN --exclude=CVS /server-root/ports/mail/mailscanner--/files/patch-bin:cron:update_virus_scanners.cron /server-root/ports/mail/mailscanner/files/patch-bin:cron:update_virus_scanners.cron
--- /server-root/ports/mail/mailscanner--/files/patch-bin:cron:update_virus_scanners.cron	Thu Jan  1 01:00:00 1970
+++ /server-root/ports/mail/mailscanner/files/patch-bin:cron:update_virus_scanners.cron	Wed Feb 15 20:15:32 2006
@@ -0,0 +1,38 @@
+--- ../MailScanner-install-4.50.15.orig/bin/cron/update_virus_scanners.cron	Wed Feb 15 20:02:33 2006
++++ bin/cron/update_virus_scanners.cron	Wed Feb 15 20:11:17 2006
+@@ -1,20 +1,24 @@
+ #!/bin/bash
+ 
+-# Insert a random delay up to this value, to spread virus updates round
+-# the clock. 1800 seconds = 30 minutes.
+-# Set this to 0 to disable it.
+-UPDATEMAXDELAY=600
+-if [ -f /etc/sysconfig/MailScanner ] ; then
+-        . /etc/sysconfig/MailScanner
+-fi
+-export UPDATEMAXDELAY
++# Add the following line to /etc/rc.conf to configure a maximum delay in
++# order to spread virus updates round the clock. 1800 seconds = 30 minutes.
++# Set this to 0 to disable it
++
++. /usr/local/etc/rc.subr
++
++name="mailscanner"
++rcvar=`set_rcvar`
++
++load_rc_config $name
++
++: ${mailscanner_updatemaxdelay="600"}
+ 
+ [ -x /opt/MailScanner/bin/update_virus_scanners ] || exit 0
+-if [ "x$UPDATEMAXDELAY" = "x0" ]; then
++if [ "x${mailscanner_updatemaxdelay}" = "x0" ]; then
+   :
+ else
+-  logger -p mail.info -t update.virus.scanners Delaying cron job up to $UPDATEMAXDELAY seconds
+-  perl -e "sleep int(rand($UPDATEMAXDELAY));"
++  logger -p mail.info -t update.virus.scanners Delaying cron job up to ${mailscanner_updatemaxdelay} seconds
++  perl -e "sleep int(rand(${mailscanner_updatemaxdelay}));"
+ fi
+ exec /opt/MailScanner/bin/update_virus_scanners
+ exit 0
diff -ruN --exclude=CVS /server-root/ports/mail/mailscanner--/files/pkg-message.in /server-root/ports/mail/mailscanner/files/pkg-message.in
--- /server-root/ports/mail/mailscanner--/files/pkg-message.in	Tue May 10 19:26:44 2005
+++ /server-root/ports/mail/mailscanner/files/pkg-message.in	Wed Feb 15 20:51:54 2006
@@ -38,4 +38,7 @@
 	Sophos users: Please take a look at the Sophos install
 	script %%PREFIX%%/share/doc/MailScanner/Sophos.install.freebsd
 
+	Please also always look at the port changelog at
+	%%PREFIX%%/share/doc/MailScanner/CHANGES.port
+
 *************************************************************************
diff -ruN --exclude=CVS /server-root/ports/mail/mailscanner--/files/rcwarning.txt /server-root/ports/mail/mailscanner/files/rcwarning.txt
--- /server-root/ports/mail/mailscanner--/files/rcwarning.txt	Wed Feb 15 11:47:00 2006
+++ /server-root/ports/mail/mailscanner/files/rcwarning.txt	Thu Feb 16 08:45:00 2006
@@ -11,5 +11,8 @@
   To start mailscanner and your mta, please put the correct statements in 
   your rc.conf. For examples/syntax please look at mailscanner.sh and
   mta.sh in your rc.d directory.
+
+  Please: Also have a look at CHANGES.port in your MailScanner 
+  doc dir (see above).
  
 *************************************************************************
diff -ruN --exclude=CVS /server-root/ports/mail/mailscanner--/pkg-plist /server-root/ports/mail/mailscanner/pkg-plist
--- /server-root/ports/mail/mailscanner--/pkg-plist	Wed Feb 15 11:46:59 2006
+++ /server-root/ports/mail/mailscanner/pkg-plist	Thu Feb 16 08:17:58 2006
@@ -49,7 +49,13 @@
 lib/MailScanner/MailScanner/ZMDiskStore.pm
 lib/MailScanner/MailScanner/ZMailer.pm
 lib/MailScanner/MailScanner/notes.txt
-libexec/MailScanner/MailScanner
+libexec/MailScanner/analyse_SpamAssassin_cache
+libexec/MailScanner/clean.SA.cache
+libexec/MailScanner/clean.quarantine
+libexec/MailScanner/update_phishing_sites
+libexec/MailScanner/update_phishing_sites.cron
+libexec/MailScanner/update_virus_scanners
+libexec/MailScanner/update_virus_scanners.cron
 libexec/MailScanner/antivir-autoupdate.sample
 libexec/MailScanner/antivir-wrapper.sample
 libexec/MailScanner/avg-autoupdate.sample
@@ -92,9 +98,10 @@
 libexec/MailScanner/symscanengine-wrapper.sample
 libexec/MailScanner/trend-autoupdate.sample
 libexec/MailScanner/trend-wrapper.sample
-libexec/MailScanner/update_virus_scanners
 libexec/MailScanner/vexira-autoupdate.sample
 libexec/MailScanner/vexira-wrapper.sample
+sbin/mailscanner
+sbin/MailScanner
 %%DATADIR%%/reports/ca/rejection.report.txt.sample
 %%DATADIR%%/reports/ca/deleted.content.message.txt.sample
 %%DATADIR%%/reports/ca/deleted.filename.message.txt.sample
@@ -461,6 +468,7 @@
 %%PORTDOCS%%%%DOCSDIR%%/Book.Dec04-Aug05.pdf
 %%PORTDOCS%%%%DOCSDIR%%/COPYING
 %%PORTDOCS%%%%DOCSDIR%%/ChangeLog
+%%PORTDOCS%%%%DOCSDIR%%/CHANGES.port
 %%PORTDOCS%%%%DOCSDIR%%/FreeBSD.html
 %%PORTDOCS%%%%DOCSDIR%%/INSTALL
 %%PORTDOCS%%%%DOCSDIR%%/INSTALL.FreeBSD
--- MailScanner-4.50.15_1.patch ends here ---

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



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