aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mailscanner
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2007-07-04 23:04:03 +0800
committermiwi <miwi@FreeBSD.org>2007-07-04 23:04:03 +0800
commit09f11a2aeb8063141f7dd66883ee34ea8889f8d9 (patch)
tree2e90fb29dbd743a38b216723c9122184a709ffdc /mail/mailscanner
parentba0fadf2287ef5366c473b58ac2d995285c0e39d (diff)
downloadfreebsd-ports-gnome-09f11a2aeb8063141f7dd66883ee34ea8889f8d9.tar.gz
freebsd-ports-gnome-09f11a2aeb8063141f7dd66883ee34ea8889f8d9.tar.zst
freebsd-ports-gnome-09f11a2aeb8063141f7dd66883ee34ea8889f8d9.zip
- Update to 4.61.7
PR: 114214 Submitted by: Jan-Peter Koopmann <j.koopmann@seceidos.de> (maintainer)
Diffstat (limited to 'mail/mailscanner')
-rw-r--r--mail/mailscanner/Makefile20
-rw-r--r--mail/mailscanner/distinfo6
-rw-r--r--mail/mailscanner/files/CHANGES.port7
-rw-r--r--mail/mailscanner/files/patch-bin-cron-sa-update.cron41
-rw-r--r--mail/mailscanner/files/patch-bin-cron-update_spamassassin.cron42
-rw-r--r--mail/mailscanner/files/patch-bin-update_spamassassin31
-rw-r--r--mail/mailscanner/files/patch-lib-MailScanner-Message.pm148
-rw-r--r--mail/mailscanner/pkg-plist4
8 files changed, 99 insertions, 200 deletions
diff --git a/mail/mailscanner/Makefile b/mail/mailscanner/Makefile
index 14e94f0c6217..a167a2b85fea 100644
--- a/mail/mailscanner/Makefile
+++ b/mail/mailscanner/Makefile
@@ -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 @@ do-build:
${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 @@ do-install:
${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
#
diff --git a/mail/mailscanner/distinfo b/mail/mailscanner/distinfo
index 57117dc68010..dc0e36269056 100644
--- a/mail/mailscanner/distinfo
+++ b/mail/mailscanner/distinfo
@@ -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
diff --git a/mail/mailscanner/files/CHANGES.port b/mail/mailscanner/files/CHANGES.port
index 7143079bb32d..c0bc32c64d36 100644
--- a/mail/mailscanner/files/CHANGES.port
+++ b/mail/mailscanner/files/CHANGES.port
@@ -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
diff --git a/mail/mailscanner/files/patch-bin-cron-sa-update.cron b/mail/mailscanner/files/patch-bin-cron-sa-update.cron
deleted file mode 100644
index 465acb851e4d..000000000000
--- a/mail/mailscanner/files/patch-bin-cron-sa-update.cron
+++ /dev/null
@@ -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
diff --git a/mail/mailscanner/files/patch-bin-cron-update_spamassassin.cron b/mail/mailscanner/files/patch-bin-cron-update_spamassassin.cron
new file mode 100644
index 000000000000..1433c570ff18
--- /dev/null
+++ b/mail/mailscanner/files/patch-bin-cron-update_spamassassin.cron
@@ -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
diff --git a/mail/mailscanner/files/patch-bin-update_spamassassin b/mail/mailscanner/files/patch-bin-update_spamassassin
new file mode 100644
index 000000000000..4c9424ca7c85
--- /dev/null
+++ b/mail/mailscanner/files/patch-bin-update_spamassassin
@@ -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
diff --git a/mail/mailscanner/files/patch-lib-MailScanner-Message.pm b/mail/mailscanner/files/patch-lib-MailScanner-Message.pm
deleted file mode 100644
index f3926a2be514..000000000000
--- a/mail/mailscanner/files/patch-lib-MailScanner-Message.pm
+++ /dev/null
@@ -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);
- }
- }
-
diff --git a/mail/mailscanner/pkg-plist b/mail/mailscanner/pkg-plist
index 3f176d8aecd2..5ea53d92705a 100644
--- a/mail/mailscanner/pkg-plist
+++ b/mail/mailscanner/pkg-plist
@@ -60,7 +60,8 @@ libexec/MailScanner/update_phishing_sites
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-autoupdate.sample
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