diff options
author | ehaupt <ehaupt@FreeBSD.org> | 2006-04-28 01:30:45 +0800 |
---|---|---|
committer | ehaupt <ehaupt@FreeBSD.org> | 2006-04-28 01:30:45 +0800 |
commit | 8ed18dca5610180ea70d752f38d419e47c696916 (patch) | |
tree | 2d67ca21e5ddae88f21369759df99a622ef86c5a /mail/mailscanner | |
parent | b7b27cae751c86f3f4115307cbb75303c9ee2b2f (diff) | |
download | freebsd-ports-gnome-8ed18dca5610180ea70d752f38d419e47c696916.tar.gz freebsd-ports-gnome-8ed18dca5610180ea70d752f38d419e47c696916.tar.zst freebsd-ports-gnome-8ed18dca5610180ea70d752f38d419e47c696916.zip |
- Fix bug in mta.sh
- Fix rc.subr reference in update_phishing_sites.cron and
update_virus_scanners.cron
- Patch for changed queue file format of Exim 4.61
- Mark IGNORE for PERL_LEVEL < 500600 which is required by databases/p5-DBI
(dependency)
PR: 96351
Submitted by: Jan-Peter Koopmann <j.koopmann@seceidos.de> (maintainer)
Diffstat (limited to 'mail/mailscanner')
-rw-r--r-- | mail/mailscanner/Makefile | 11 | ||||
-rw-r--r-- | mail/mailscanner/files/CHANGES.port | 10 | ||||
-rw-r--r-- | mail/mailscanner/files/mta.sh.in | 2 | ||||
-rw-r--r-- | mail/mailscanner/files/patch-bin:cron:update_phishing_sites.cron | 2 | ||||
-rw-r--r-- | mail/mailscanner/files/patch-bin:cron:update_virus_scanners.cron | 2 | ||||
-rw-r--r-- | mail/mailscanner/files/patch-lib-MailScanner-Exim.pm | 92 |
6 files changed, 113 insertions, 6 deletions
diff --git a/mail/mailscanner/Makefile b/mail/mailscanner/Makefile index ad83732903f5..f10307709c82 100644 --- a/mail/mailscanner/Makefile +++ b/mail/mailscanner/Makefile @@ -7,6 +7,7 @@ PORTNAME= MailScanner PORTVERSION= 4.52.2 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/tar/ DISTNAME= ${PORTNAME}-install-${PORTVERSION}-${PATCHLEVEL} @@ -63,6 +64,10 @@ MLINKS= MailScanner.8 mailscanner.8 \ .include <bsd.port.pre.mk> +.if ${PERL_LEVEL} < 500600 +IGNORE= dependency requires newer Perl +.endif + .if defined(WITH_SPAMASSASSIN) RUN_DEPENDS+= spamassassin:${PORTSDIR}/mail/p5-Mail-SpamAssassin PLIST_SUB+= SPAMASSASSIN="" @@ -146,7 +151,8 @@ do-build: ${WRKSRC}/bin/update_virus_scanners ${PERL} -pi -e \ 's,/bin/bash,${LOCALBASE}/bin/bash,g; \ - s,/opt/MailScanner/bin,${PREFIX}/libexec/MailScanner,g;' \ + s,/opt/MailScanner/bin,${PREFIX}/libexec/MailScanner,g; \ + s,%%RC_SUBR%%,${RC_SUBR},g;' \ ${WRKSRC}/bin/cron/update_virus_scanners.cron ${PERL} -pi -e \ 's,/bin/bash,${LOCALBASE}/bin/bash,g; \ @@ -154,7 +160,8 @@ do-build: ${WRKSRC}/bin/update_phishing_sites ${PERL} -pi -e \ 's,/bin/bash,${LOCALBASE}/bin/bash,g; \ - s,/opt/MailScanner/bin,${PREFIX}/libexec/MailScanner,g;' \ + s,/opt/MailScanner/bin,${PREFIX}/libexec/MailScanner,g; \ + s,%%RC_SUBR%%,${RC_SUBR},g;' \ ${WRKSRC}/bin/cron/update_phishing_sites.cron ${PERL} -pi -e \ 's,/etc/MailScanner/MailScanner.conf,${PREFIX}/etc/MailScanner/MailScanner.conf,g;' \ diff --git a/mail/mailscanner/files/CHANGES.port b/mail/mailscanner/files/CHANGES.port index f14ee0d16302..a7ca3d438d8c 100644 --- a/mail/mailscanner/files/CHANGES.port +++ b/mail/mailscanner/files/CHANGES.port @@ -1,6 +1,14 @@ +Version 4.52.2_1 +================= +- fixed bug in mta.sh script +- fixed rc.subr reference in update_phishing_sites.cron and + update_virus_scanners.cron --> now dynamically rewritten to correct + location +- Exim 4.61 changed queue file format which was incompatible with 4.52.2 --> patched + Version 4.52.2 ================= -- Upgrade to MailScanenr 4.52 +- Upgrade to MailScanner 4.52 Version 4.51.5 ================= diff --git a/mail/mailscanner/files/mta.sh.in b/mail/mailscanner/files/mta.sh.in index 106cbea52232..759020deba41 100644 --- a/mail/mailscanner/files/mta.sh.in +++ b/mail/mailscanner/files/mta.sh.in @@ -69,7 +69,7 @@ if [ \( "$_mta_osversion" -lt "600101" \) -o \ \( \( $_mta_osversion -ge 700000 \) -a \ \( $_mta_osversion -lt 700007 \) \) ] then - $_mta_rc_script="{$_mta_rc_script}.sh" + _mta_rc_script="${_mta_rc_script}.sh" fi load_rc_config $name diff --git a/mail/mailscanner/files/patch-bin:cron:update_phishing_sites.cron b/mail/mailscanner/files/patch-bin:cron:update_phishing_sites.cron index 7b1d955a9ebd..245eaa5747f2 100644 --- a/mail/mailscanner/files/patch-bin:cron:update_phishing_sites.cron +++ b/mail/mailscanner/files/patch-bin:cron:update_phishing_sites.cron @@ -15,7 +15,7 @@ +# order to spread virus updates round the clock. 1800 seconds = 30 minutes. +# Set this to 0 to disable it + -+. /usr/local/etc/rc.subr ++. %%RC_SUBR%% + +name="mailscanner" +rcvar=`set_rcvar` diff --git a/mail/mailscanner/files/patch-bin:cron:update_virus_scanners.cron b/mail/mailscanner/files/patch-bin:cron:update_virus_scanners.cron index 59141df27b00..b370d9508f9f 100644 --- a/mail/mailscanner/files/patch-bin:cron:update_virus_scanners.cron +++ b/mail/mailscanner/files/patch-bin:cron:update_virus_scanners.cron @@ -15,7 +15,7 @@ +# order to spread virus updates round the clock. 1800 seconds = 30 minutes. +# Set this to 0 to disable it + -+. /usr/local/etc/rc.subr ++. %%RC_SUBR%% + +name="mailscanner" +rcvar=`set_rcvar` diff --git a/mail/mailscanner/files/patch-lib-MailScanner-Exim.pm b/mail/mailscanner/files/patch-lib-MailScanner-Exim.pm new file mode 100644 index 000000000000..d5167594397b --- /dev/null +++ b/mail/mailscanner/files/patch-lib-MailScanner-Exim.pm @@ -0,0 +1,92 @@ +--- ../MailScanner-install-4.52.2.orig/lib/MailScanner/Exim.pm Wed Apr 26 09:25:10 2006 ++++ lib/MailScanner/Exim.pm Wed Apr 26 09:26:00 2006 +@@ -251,7 +251,7 @@ + + my %metadata; + my($InHeader, $InSubject, $InDel, @headers, $msginfo, $from, @to, $subject); +- my($ip, $sender, @acl, $line); ++ my($ip, $sender, @acl, @aclc, @aclm, $line, $acltype); + + # Seek to the start of the file in case anyone read the file + # between me opening it and locking it. +@@ -287,13 +287,24 @@ + #$line eq "" and $metadata{"dv_$1"} = 1, next; + #$metadata{"dv_$1"} = $line; + #$metadata{dashvars}{$1} = 1; +- if($1 eq "acl") { ++ # ACLs can be -acl or -aclc or -aclm. ++ $acltype = $1; ++ if($acltype =~ /^acl[cm]?$/) { + # we need to handle acl vars differently + if($line =~ /^(\d+) (\d+)$/) { + my $buf; + my $pos = $1; + my $len = $2; +- $acl[$pos]=[]; ++ if ($acltype eq "acl") { ++ $acl[$pos]->[0] = []; ++ } elsif ($acltype eq "aclc") { ++ $aclc[$pos]->[0] = []; ++ } elsif ($acltype eq "aclm") { ++ $aclm[$pos]->[0] = []; ++ } else { ++ # invalid format ++ last; ++ } + (read($RQf, $buf, $len + 1)==$len+1) or last; + if($buf =~ /\n$/) { + chomp $buf; +@@ -301,7 +312,16 @@ + # invalid format + last; + } +- $acl[$pos]->[0] = $buf; ++ if ($acltype eq "acl") { ++ $acl[$pos]->[0] = $buf; ++ } elsif ($acltype eq "aclc") { ++ $aclc[$pos]->[0] = $buf; ++ } elsif ($acltype eq "aclm") { ++ $aclm[$pos]->[0] = $buf; ++ } else { ++ # invalid format ++ last; ++ } + } else { + # this is a weird format, and we're not sure how to handle it + last; +@@ -315,6 +335,8 @@ + next; + } + $metadata{aclvars} = \@acl; ++ $metadata{aclcvars} = \@aclc; ++ $metadata{aclmvars} = \@aclm; + + # If it was an invalid queue file, log a warning and tell caller + unless (defined $line) { +@@ -1059,11 +1081,24 @@ + + # ACLs patch starts here + # Add the separate ACL Vars +- my @acl = @{$metadata->{aclvars}}; +- for($i=0; $i<=$#acl; $i++) { ++ my @acl = @{$metadata->{aclvars}}; ++ my @aclc = @{$metadata->{aclcvars}}; ++ my @aclm = @{$metadata->{aclmvars}}; ++ my $greatestacl = $#acl; ++ $greatestacl = $#aclc if $#aclc > $greatestacl; ++ $greatestacl = $#aclm if $#aclm > $greatestacl; ++ for($i=0; $i<=$greatestacl; $i++) { + if($acl[$i]) { + $Qfile .= "-acl " . $i . " " . length($acl[$i]->[0]) . "\n"; + $Qfile .= $acl[$i]->[0] . "\n"; ++ } ++ if($aclc[$i]) { ++ $Qfile .= "-aclc " . $i . " " . length($aclc[$i]->[0]) . "\n"; ++ $Qfile .= $aclc[$i]->[0] . "\n"; ++ } ++ if($aclm[$i]) { ++ $Qfile .= "-aclm " . $i . " " . length($aclm[$i]->[0]) . "\n"; ++ $Qfile .= $aclm[$i]->[0] . "\n"; + } + } + |