- 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)
This commit is contained in:
parent
8d09b3b47b
commit
763c2f907a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=160604
6 changed files with 113 additions and 6 deletions
|
@ -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;' \
|
||||
|
|
|
@ -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
|
||||
=================
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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`
|
||||
|
|
|
@ -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`
|
||||
|
|
92
mail/mailscanner/files/patch-lib-MailScanner-Exim.pm
Normal file
92
mail/mailscanner/files/patch-lib-MailScanner-Exim.pm
Normal file
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue