ports/114214: [MAINTAINER] mail/MailScanner: update to 4.61.7

Jan-Peter Koopmann j.koopmann at seceidos.de
Mon Jul 2 12:20:04 UTC 2007


>Number:         114214
>Category:       ports
>Synopsis:       [MAINTAINER] mail/MailScanner: update to 4.61.7
>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:   Mon Jul 02 12:20:03 GMT 2007
>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.61.7

2/7/2007 New in Version 4.61.7-2
================================
* New Features and Improvements *
1 Direct support for the "clamd" virus scanner -- now talks directly to the
  clamd daemon without any overhead of calling clamd-wrapper or clamdscan.
  As a result, this should be faster than the previous clamd support.
  It also has a much smaller memory footprint than the "clamavmodule" scanner.
  This is all thanks to Rick Cooper who wrote the original code.
  New configuration options are
  - Clamd Port = 3310
  - Clamd Socket = /tmp/clamd
  - Clamd Lock File = /var/lock/subsys/clamd
  - Clamd Use Threads = no
  The use of these settings is explained in the MailScanner.conf file.
2 Changed session handling in direct clamd virus scanner support.
3 'MailScanner --lint' now finds clamd virus scanner.
3 Made clamd subsys lock file blank by default, so it works on non-Linux
  systems.
3 Added another example to the Allowed Sophos Error Messages setting for
  password-protected files.
4 Renamed "sa-update" command and cron job to "update_spamassassin".
4 Added ability to easily disable update_virus_scanners script.
4 Added conditional call to sa-compile to update_spamassassin cron job.
4 Added to $PATH in update_phishing_sites for Solaris 10 locations.
5 Watermarking functionality has had to be withdrawn due to patent issues.
  Sorry about this, but it would cause huge problems in the USA where
  software patents are legally enforceable and it would cause problems with
  including patented code in GPL software too.
6 Added facility to change SpamAssassin's temporary working files directory,
  using the new option 'SpamAssassin Temporary Dir'. By default this is put
  under the Incoming Work Dir location, as that is (hopefully) mounted using
  tmpfs. If an attempt to use this directory fails, it reverts to /tmp.
7 Fixed bug in finding PERL5LIB in installers. Thanks to Sean Coleman.

* Fixes *
2 Fixed bug in auto-zip feature with a message containing 2 attachments with
  the same filename.
2 Fixed bug in auto-zip feature that would allow zipping of an attachment
  which had been cleaned out of the message.
3 Fixed "identified/found" bug in AVG parser.
3 Fixed bugs in Panda and AVG parsers courtesy of Rick Cooper.
3 Fixed bug in Postfix handler which caused a problem with empty messages.
4 Fixed bug in SuSE init.d script stopping MailScanner reload working properly.
4 Changed method for getting MCP to decode binary attachments (the interesting
  ones have "application" in their MIME type). New patch for SpamAssassin 3.2.1
  Util.pm required now. No other SpamAssassin patches required at all.
4 Added definition of "noticesizeinfected" to languages.conf.
4 Added speedup (courtesy of Glenn Steen) to the new Postfix milter support.
4 Fixed rare bug in Postfix milter header support (from Glenn Steen).
5 Fixed problems with /usr/sbin/update_spamassassin not calling sa-update.


Added file(s):
- files/patch-bin-cron-update_spamassassin.cron
- files/patch-bin-update_spamassassin

Removed file(s):
- files/patch-bin-cron-sa-update.cron
- files/patch-lib-MailScanner-Message.pm

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

--- MailScanner-4.61.7.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/mailscanner/Makefile,v
retrieving revision 1.64
diff -u -r1.64 Makefile
--- Makefile	4 Jun 2007 20:52:13 -0000	1.64
+++ Makefile	2 Jul 2007 12:09:55 -0000
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	MailScanner
-PORTVERSION=	4.60.8
-PORTREVISION=	2
+PORTVERSION=	4.61.7
 CATEGORIES=	mail
 MASTER_SITES=	http://www.mailscanner.info/files/4/tar/
 DISTNAME=	${PORTNAME}-install-${PORTVERSION}-${PATCHLEVEL}
@@ -167,9 +166,16 @@
 		${WRKSRC}/bin/cron/update_phishing_sites.cron
 	${PERL} -pi -e \
 		's,/bin/bash,${LOCALBASE}/bin/bash,g; \
-		s,/usr/bin/sa-update,${LOCALBASE}/bin/sa-update,g; \
+		s,/opt/MailScanner/bin,${PREFIX}/libexec/MailScanner,g; \
 		s,%%RC_SUBR%%,${RC_SUBR},g;' \
-		${WRKSRC}/bin/cron/sa-update.cron
+		${WRKSRC}/bin/cron/update_spamassassin.cron
+	${PERL} -pi -e \
+		's,/bin/bash,${LOCALBASE}/bin/bash,g; \
+                s,/etc/init.d/MailScanner,${LOCALBASE}/etc/rc.d/mailscanner,g; \
+		s,/etc/mail/,${LOCALBASE}/etc/mail/,g; \
+		s,/usr/bin/sa-compile,${LOCALBASE}/bin/sa-compile,g; \
+		s,/usr/bin/sa-update,${LOCALBASE}/bin/sa-update,g;' \
+                ${WRKSRC}/bin/update_spamassassin
 	${PERL} -pi -e \
 		's,/etc/MailScanner/MailScanner.conf,${PREFIX}/etc/MailScanner/MailScanner.conf,g;' \
 		${WRKSRC}/bin/clean.SA.cache
@@ -226,8 +232,10 @@
 		${PREFIX}/libexec/MailScanner/update_virus_scanners
 	${INSTALL_SCRIPT} ${WRKSRC}/bin/cron/update_virus_scanners.cron \
 		${PREFIX}/libexec/MailScanner/update_virus_scanners.cron
-	${INSTALL_SCRIPT} ${WRKSRC}/bin/cron/sa-update.cron \
-		${PREFIX}/libexec/MailScanner/sa-update.cron
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/update_spamassassin \
+		${PREFIX}/libexec/MailScanner/update_spamassassin
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/cron/update_spamassassin.cron \
+		${PREFIX}/libexec/MailScanner/update_spamassassin.cron
 	#
 	# Step 3: Install etc files
 	#
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/mail/mailscanner/distinfo,v
retrieving revision 1.43
diff -u -r1.43 distinfo
--- distinfo	4 Jun 2007 13:21:44 -0000	1.43
+++ distinfo	2 Jul 2007 12:09:55 -0000
@@ -1,3 +1,3 @@
-MD5 (MailScanner-install-4.60.8-1.tar.gz) = 3d7a9b877fa908fe103e8190afd0ed77
-SHA256 (MailScanner-install-4.60.8-1.tar.gz) = ae8257a412989e27c3ea85575d869cd0e53be7c6868b9edce8ded03f26be7ec1
-SIZE (MailScanner-install-4.60.8-1.tar.gz) = 7705484
+MD5 (MailScanner-install-4.61.7-1.tar.gz) = 62b4af78e735a1708bb30bdbd6a0c908
+SHA256 (MailScanner-install-4.61.7-1.tar.gz) = 1917f06684a5ba26302224f0d786911ec248384cb5c4c607965bd0ad9541d837
+SIZE (MailScanner-install-4.61.7-1.tar.gz) = 7712590
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/mail/mailscanner/pkg-plist,v
retrieving revision 1.34
diff -u -r1.34 pkg-plist
--- pkg-plist	4 Jun 2007 09:59:58 -0000	1.34
+++ pkg-plist	2 Jul 2007 12:09:55 -0000
@@ -60,7 +60,8 @@
 libexec/MailScanner/update_phishing_sites.cron
 libexec/MailScanner/update_virus_scanners
 libexec/MailScanner/update_virus_scanners.cron
-libexec/MailScanner/sa-update.cron
+libexec/MailScanner/update_spamassassin
+libexec/MailScanner/update_spamassassin.cron
 libexec/MailScanner/antivir-autoupdate.sample
 libexec/MailScanner/antivir-wrapper.sample
 libexec/MailScanner/avast-wrapper.sample
@@ -72,7 +73,6 @@
 libexec/MailScanner/bitdefender-wrapper.sample
 libexec/MailScanner/clamav-autoupdate.sample
 libexec/MailScanner/clamav-wrapper.sample
-libexec/MailScanner/clamd-wrapper.sample
 libexec/MailScanner/command-wrapper.sample
 libexec/MailScanner/css-autoupdate.sample
 libexec/MailScanner/css-wrapper.sample
Index: files/CHANGES.port
===================================================================
RCS file: /home/ncvs/ports/mail/mailscanner/files/CHANGES.port,v
retrieving revision 1.17
diff -u -r1.17 CHANGES.port
--- files/CHANGES.port	4 Jun 2007 20:52:13 -0000	1.17
+++ files/CHANGES.port	2 Jul 2007 12:09:55 -0000
@@ -1,3 +1,10 @@
+Version 4.61.7
+==============
+- Upgrade to 4.61.7
+- Attention: update_spamassassin and update_spamassassin.cron are rewritten to fit
+  FreeBSD. Untestet. If you are using non-standard directories or FreeBSD < 6 you will
+  have to tweck update_spamassassin.
+
 Version 4.60.8_2
 ================
 - Fixed error in auto-zip: If a message contained 2 different attachments 
Index: files/patch-bin-cron-sa-update.cron
===================================================================
RCS file: files/patch-bin-cron-sa-update.cron
diff -N files/patch-bin-cron-sa-update.cron
--- files/patch-bin-cron-sa-update.cron	5 May 2006 10:38:02 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,41 +0,0 @@
---- ../MailScanner-install-4.53.7.orig/bin/cron/sa-update.cron	Thu May  4 07:40:53 2006
-+++ bin/cron/sa-update.cron	Thu May  4 07:42:12 2006
-@@ -1,22 +1,27 @@
- #!/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
-+# 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
-+
-+. %%RC_SUBR%%
-+
-+name="mailscanner"
-+rcvar=`set_rcvar`
-+
-+load_rc_config $name
-+
-+: ${mailscanner_updatemaxdelay="600"}
-+
- SAUPDATE=/usr/bin/sa-update
--if [ -f /etc/sysconfig/MailScanner ] ; then
--        . /etc/sysconfig/MailScanner
--fi
--export UPDATEMAXDELAY
- export SAUPDATE
- 
- [ -x $SAUPDATE ] || exit 0
--if [ "x$UPDATEMAXDELAY" = "x0" ]; then
-+if [ "x${mailscanner_updatemaxdelay}" = "x0" ]; then
-   :
- else
--  logger -p mail.info -t sa-update Delaying cron job up to $UPDATEMAXDELAY seconds
--  perl -e "sleep int(rand($UPDATEMAXDELAY));"
-+  logger -p mail.info -t sa-update Delaying cron job up to ${mailscanner_updatemaxdelay} seconds
-+  perl -e "sleep int(rand(${mailscanner_updatemaxdelay}));"
- fi
- exec $SAUPDATE
- exit 0
Index: files/patch-bin-cron-update_spamassassin.cron
===================================================================
RCS file: files/patch-bin-cron-update_spamassassin.cron
diff -N files/patch-bin-cron-update_spamassassin.cron
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-bin-cron-update_spamassassin.cron	2 Jul 2007 12:09:55 -0000
@@ -0,0 +1,42 @@
+--- ../MailScanner-install-4.61.7.orig/bin/cron/update_spamassassin.cron	Mon Jul  2 12:34:52 2007
++++ bin/cron/update_spamassassin.cron	Mon Jul  2 12:50:12 2007
+@@ -11,23 +11,28 @@
+   exit;
+ fi
+ 
+-# 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
++# Add the following line to /etc/rc.conf to configure a maximum delay in
++# order to spread spamassassin updates round the clock. 1800 seconds = 30 minutes.
++# Set this to 0 to disable it
++
++. %%RC_SUBR%%
++
++name="mailscanner"
++rcvar=`set_rcvar`
++
++load_rc_config $name
++
++: ${mailscanner_sa_updatemaxdelay="3600"}
++
+ SAUPDATE=/opt/MailScanner/bin/update_spamassassin
+-if [ -f /etc/sysconfig/MailScanner ] ; then
+-        . /etc/sysconfig/MailScanner
+-fi
+-export UPDATEMAXDELAY
+ export SAUPDATE
+ 
+ [ -x $SAUPDATE ] || exit 0
+-if [ "x$UPDATEMAXDELAY" = "x0" ]; then
++if [ "x${mailscanner_sa_updatemaxdelay}" = "x0" ]; then
+   :
+ else
+-  logger -p mail.info -t update_spamassassin Delaying cron job up to $UPDATEMAXDELAY seconds
+-  perl -e "sleep int(rand($UPDATEMAXDELAY));"
++  logger -p mail.info -t update_spamassassin Delaying cron job up to ${mailscanner_sa_updatemaxdelay} seconds
++  perl -e "sleep int(rand(${mailscanner_sa_updatemaxdelay}));"
+ fi
+ exec $SAUPDATE
+ exit 0
Index: files/patch-bin-update_spamassassin
===================================================================
RCS file: files/patch-bin-update_spamassassin
diff -N files/patch-bin-update_spamassassin
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-bin-update_spamassassin	2 Jul 2007 12:09:55 -0000
@@ -0,0 +1,31 @@
+--- ../MailScanner-install-4.61.7.orig/bin/update_spamassassin	Mon Jul  2 12:34:52 2007
++++ bin/update_spamassassin	Mon Jul  2 12:53:22 2007
+@@ -14,26 +14,17 @@
+   exit;
+ fi
+ 
+-# 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
+ SAUPDATE=/usr/bin/sa-update
+ SACOMPILE=/usr/bin/sa-compile
+ if [ -f /etc/sysconfig/MailScanner ] ; then
+         . /etc/sysconfig/MailScanner
+ fi
+-export UPDATEMAXDELAY
+ export SAUPDATE
+ export SACOMPILE
+ 
+ [ -x $SAUPDATE ] || exit 0
+-if [ "x$UPDATEMAXDELAY" = "x0" ]; then
+-  :
+-else
+-  logger -p mail.info -t sa-update Delaying cron job up to $UPDATEMAXDELAY seconds
+-  perl -e "sleep int(rand($UPDATEMAXDELAY));"
+-fi
++logger -p mail.info -t sa-update Delaying cron job up to $UPDATEMAXDELAY seconds
++perl -e "sleep int(rand($UPDATEMAXDELAY));"
+ 
+ # Update SpamAssassin rules
+ $SAUPDATE
Index: files/patch-lib-MailScanner-Message.pm
===================================================================
RCS file: files/patch-lib-MailScanner-Message.pm
diff -N files/patch-lib-MailScanner-Message.pm
--- files/patch-lib-MailScanner-Message.pm	4 Jun 2007 20:52:13 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,148 +0,0 @@
---- ../MailScanner-install-4.60.8.orig/lib/MailScanner/Message.pm	Mon Jun  4 21:52:14 2007
-+++ lib/MailScanner/Message.pm	Mon Jun  4 21:52:31 2007
-@@ -2,7 +2,7 @@
- #   MailScanner - SMTP E-Mail Virus Scanner
- #   Copyright (C) 2002  Julian Field
- #
--#   $Id: Message.pm 3920 2007-05-28 17:20:11Z sysjkf $
-+#   $Id: Message.pm 3948 2007-06-04 18:25:09Z sysjkf $
- #
- #   This program is free software; you can redistribute it and/or modify
- #   it under the terms of the GNU General Public License as published by
-@@ -57,7 +57,7 @@
- use vars qw($VERSION);
- 
- ### The package version, both in 1.23 style *and* usable by MakeMaker:
--$VERSION = substr q$Revision: 3920 $, 10;
-+$VERSION = substr q$Revision: 3948 $, 10;
- 
- # Attributes are
- #
-@@ -126,6 +126,7 @@
- # %alltypes		set by CombineReports
- # %entity2parent	set by CreateEntitiesHelpers
- # %entity2file		set by CreateEntitiesHelpers
-+# %entity2safefile	set by CreateEntitiesHelpers
- # %file2entity		set by CreateEntitiesHelpers (maps original evil names)
- # %file2safefile	set by CreateEntitiesHelpers (evil==>safe)
- # %safefile2file	set by CreateEntitiesHelpers (safe==>evil)
-@@ -1528,14 +1529,17 @@
-   $regexp = join('|', @escaped);
-   print STDERR "Regexp is \"$regexp\"\n";
- 
--  # Build a list of attachment filenames
--  my($file, at files,$entity);
-+  # Build a list of attachment entities
-+  my($file, at files,$entity, at entitylist);
-+  $this->ListLeafEntities($this->{entity}, \@entitylist);
-+
-   my $totalsize = 0; #  Track total size of all attachments added to zip
--  while (defined($file = $dir->read)) {
--    next if $file =~ /^\.+$/;
-+  foreach $entity (@entitylist) {
-+    $file = $this->{entity2safefile}{$entity};
-     next unless -f "$explodeinto/$file";
-     print STDERR "Possibly adding file $file\n";
--    $entity = $this->{file2entity}{$this->{safefile2file}{$file}};
-+    print STDERR "Nasty filename is " . $this->{entity2file}{$entity} . "\n";
-+    #$entity = $this->{file2entity}{$this->{safefile2file}{$file}};
-     print STDERR "Entity is $entity\n";
-     next unless $entity;
-     # Don't add the file if it's the winmail.dat file
-@@ -1589,6 +1593,7 @@
- 
-   # Create all the Helpers for the new attachment
-   $this->{entity2file}{$newentity} = $newzipname;
-+  $this->{entity2safefile}{$newentity} = $safezipname;
-   $this->{entity2parent}{$newentity} = 0;
-   $this->{file2entity}{$newzipname} = $newentity;
-   $this->{name2entity}{scalar($newentity)} = $newentity;
-@@ -1597,12 +1602,12 @@
- 
-   # Delete the old attachments' entities
-   my($attachfile, $attachentity);
--  foreach $file (@files) {
--    $attachfile = $this->{safefile2file}{$file};
--    $attachentity = $this->{file2entity}{$attachfile};
--    $this->DeleteEntity($entity, $attachentity);
-+  foreach $entity (@entitylist) {
-+    $attachfile = $this->{entity2safefile}{$entity};
-+    #$attachentity = $this->{file2entity}{$attachfile};
-+    $this->DeleteEntity($this->{entity}, $entity);
-     # And the files themselves
--    unlink("$explodeinto/$file");
-+    unlink("$explodeinto/$attachfile");
-   }
- 
- }
-@@ -1890,6 +1895,27 @@
-     if $workarea->{changeowner};
- }
- 
-+sub ListLeafEntities {
-+  my($message, $entity, $entitylist) = @_;
-+
-+  my(@parts, $part);
-+
-+  # Fallen off the tree?
-+  return unless $entity && defined($entity->head);
-+
-+  # Found a leaf node
-+  if ($entity && !$entity->parts) {
-+    push @$entitylist, $entity;
-+    return;
-+  }
-+
-+  # Walk down each sub-tree
-+  @parts = $entity->parts;
-+  foreach $part (@parts) {
-+    ListLeafEntities($message, $part, $entitylist);
-+  }
-+}
-+
- # Delete a given entity from the MIME entity tree.
- # Have to walk the entire tree to do this.
- # Bail out as soon as we've found it.
-@@ -2860,6 +2886,7 @@
- 
-   # Put something useless in the 2 hashes so that they exist.
-   $this->{entity2file}{""} = 0;
-+  $this->{entity2safefile}{""} = 0;
-   $this->{entity2parent}{""} = 0;
-   $this->{file2entity}{""} = $this->{entity}; # Root of this message
-   $this->{name2entity}{""} = 0;
-@@ -2870,6 +2897,7 @@
-                                  $this->{file2safefile},
-                                  $this->{safefile2file},
-                                  $this->{entity2file},
-+                                 $this->{entity2safefile},
-                                  $this->{name2entity});
-   #print STDERR "In CreateEntitiesHelpers, this = $this\n";
-   #print STDERR "In CreateEntitiesHelpers, this entity = " .
-@@ -2903,7 +2931,7 @@
- # This is recursive. This is a class function, not a normal method.
- sub BuildFile2EntityAndEntity2File {
-   my($entity, $file2entity, $file2safefile, $safefile2file, $entity2file,
--     $name2entity) = @_;
-+     $entity2safefile, $name2entity) = @_;
- 
-   # Build the conversion hash from scalar(entity) --> real entity object
-   # Need to do this as objects cannot be hash keys.
-@@ -2929,6 +2957,7 @@
-   if ($headfile) {
-     $file2entity->{$headfile} = $entity if !$file2entity->{$headfile};
-     $file2safefile->{$headfile} = $path;
-+    $entity2safefile->{$entity} = $path;
-     $safefile2file->{$path}     = $headfile;
-     #print STDERR "File2SafeFile (\"$headfile\") = \"$path\"\n";
-   }
-@@ -2937,7 +2966,8 @@
-   @parts = $entity->parts;
-   foreach $part (@parts) {
-     BuildFile2EntityAndEntity2File($part, $file2entity, $file2safefile,
--                                   $safefile2file, $entity2file, $name2entity);
-+                                   $safefile2file, $entity2file,
-+                                   $entity2safefile, $name2entity);
-   }
- }
- 
--- MailScanner-4.61.7.patch ends here ---

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



More information about the freebsd-ports-bugs mailing list