aboutsummaryrefslogtreecommitdiff
path: root/mail/mailscanner
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2004-02-24 17:03:43 +0000
committerGreg Lewis <glewis@FreeBSD.org>2004-02-24 17:03:43 +0000
commitc2b87a9933d349881f60cc89fefa652f165261bf (patch)
tree336e40fb4afe200ca02b7b47a992f543e1edfdd3 /mail/mailscanner
parent7e7107ebd1e1dbc063438c63dcd532628637992f (diff)
downloadports-c2b87a9933d349881f60cc89fefa652f165261bf.tar.gz
ports-c2b87a9933d349881f60cc89fefa652f165261bf.zip
Notes
Diffstat (limited to 'mail/mailscanner')
-rw-r--r--mail/mailscanner/Makefile1
-rw-r--r--mail/mailscanner/files/patch-lib:MailScanner:Message.pm59
2 files changed, 56 insertions, 4 deletions
diff --git a/mail/mailscanner/Makefile b/mail/mailscanner/Makefile
index ef737b63b689..8042ee7a518e 100644
--- a/mail/mailscanner/Makefile
+++ b/mail/mailscanner/Makefile
@@ -7,6 +7,7 @@
PORTNAME= MailScanner
PORTVERSION= 4.26.8
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/tar/
DISTNAME= MailScanner-${PORTVERSION}-${PATCHLEVEL}
diff --git a/mail/mailscanner/files/patch-lib:MailScanner:Message.pm b/mail/mailscanner/files/patch-lib:MailScanner:Message.pm
index 38d787a773a9..b02e4b64fec9 100644
--- a/mail/mailscanner/files/patch-lib:MailScanner:Message.pm
+++ b/mail/mailscanner/files/patch-lib:MailScanner:Message.pm
@@ -1,5 +1,5 @@
---- ../MailScanner-4.26.8.orig/lib/MailScanner/Message.pm Fri Feb 13 09:31:30 2004
-+++ lib/MailScanner/Message.pm Fri Feb 13 09:38:35 2004
+--- ../MailScanner-4.26.8.orig/lib/MailScanner/Message.pm Mon Feb 23 17:37:26 2004
++++ lib/MailScanner/Message.pm Mon Feb 23 17:38:33 2004
@@ -2,7 +2,7 @@
# MailScanner - SMTP E-Mail Virus Scanner
# Copyright (C) 2002 Julian Field
@@ -170,7 +170,7 @@
#print STDERR "Adding file $file type $text\n";
$this->{alltypes}{$file} .= $text;
+ $types{$file} .= $text;
- }
++ }
+
+ # Now look for the reports we can't match anywhere and make them
+ # map to the entire message.
@@ -182,8 +182,59 @@
+ $this->{allreports}{""} .= $value;
+ $this->{alltypes}{""} .= $types{$key};
+ }
-+ }
+ }
+
#print STDERR "Finished combining reports\n";
}
+@@ -3309,6 +3405,50 @@
+ $index = $#{$self->{ME_Parts}} + 2 + $index if ($index < 0);
+ splice(@{$self->{ME_Parts}}, $index, 0, $part);
+ $part;
++}
++
++
++#
++# Over-ride a function in Mail::Header that parses the block of headers
++# at the top of each MIME section. My improvement allows the first line
++# of the header block to be missing, which breaks the original parser
++# though the filename is still there.
++#
++
++package Mail::Header;
++
++sub extract
++{
++ my $me = shift;
++ my $arr = shift;
++ my $line;
++
++ $me->empty;
++
++ # JKF Make this more robust by allowing first line of header to be missing
++ shift @{$arr} while scalar(@{$arr}) &&
++ $arr->[0] =~ /\A[ \t]+/o &&
++ $arr->[1] =~ /\A$FIELD_NAME/o;
++ # JKF End mod here
++
++ while(scalar(@{$arr}) && $arr->[0] =~ /\A($FIELD_NAME|From )/o)
++ {
++ my $tag = $1;
++
++ $line = shift @{$arr};
++ $line .= shift @{$arr}
++ while(scalar(@{$arr}) && $arr->[0] =~ /\A[ \t]+/o);
++
++ ($tag,$line) = _fmt_line($me,$tag,$line);
++
++ _insert($me,$tag,$line,-1)
++ if defined $line;
++ }
++
++ shift @{$arr}
++ if(scalar(@{$arr}) && $arr->[0] =~ /\A\s*\Z/o);
++
++ $me;
+ }
+
+