FreeBSD Bugzilla – Attachment 79513 Details for
Bug 114214
[MAINTAINER] mail/MailScanner: update to 4.61.7
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
MailScanner-4.61.7.patch
MailScanner-4.61.7.patch (text/plain), 14.74 KB, created by
Jan-Peter Koopmann
on 2007-07-02 13:20:03 UTC
(
hide
)
Description:
MailScanner-4.61.7.patch
Filename:
MIME Type:
Creator:
Jan-Peter Koopmann
Created:
2007-07-02 13:20:03 UTC
Size:
14.74 KB
patch
obsolete
>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,@files,$entity); >-+ # Build a list of attachment entities >-+ my($file,@files,$entity,@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); >- } >- } >-
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 114214
: 79513