the misteake is in sub fillSpamfiles not in sub mallogfilename
sub mallogfilename already had the check for '$MaxAllowedDups'
if ( $UseSubjectsAsMaillogNames
&& $sub
&& $discarded
&& $isspam == 1
&& $MaxAllowedDups
&& ! $this->{hasmallogname}
&& ! $RunTaskNow{'fillSpamfiles'}
&& $sub2 !~ /$AllowedDupSubjectReRE/)
{
Thomas
Von: Andrew Porter <a...@defsdoor.org>
An: assp-test@lists.sourceforge.net
Datum: 23.03.2016 11:08
Betreff: Re: [Assp-test] urgent: after assp 16081 all mails older
than 1 day are deleted from spam folder
On 23/03/16 09:52, aquilinux wrote:
> UseSubjectsAsMaillogNames is checked
> MaxAllowedDups set to 0
>
> always been this way
>
This is the latest relevant code -
if ($Spamfiles{$md5sub} >= $MaxAllowedDups) {
my @nums = sort {$main::a <=> $main::b} split(/\s+/o,
$SpamfileNames{$md5sub});
my @num;
push(@num , shift(@nums)) while(scalar(@nums) >=
$MaxAllowedDups);
push @nums , $Counter;
$SpamfileNames{$md5sub} = join(' ',@nums);
$Spamfiles{$md5sub} = scalar(@nums);
while (@num) {
my $num = shift(@num);
my $source = "$base/$spamlog/$sub--$num$maillogExt";
my $target = "$base/$discarded/$sub--$num$maillogExt";
if ($move->($source,$target)) {
mlog($fh,"MaxAllowedDups reached for this subject
- moved oldest file $source to $target")
if $SessionLog;
} else {
$Spamfiles{$md5sub}++;
$SpamfileNames{$md5sub} .= " $num";
}
}
}
Compare with a previous version -
if ($Spamfiles{$md5sub} >= $MaxAllowedDups) {
my @nums = sort {$main::a <=> $main::b} split(/\s+/o,
$SpamfileNames{$md5sub});
my $num = shift @nums;
push @nums , $Counter;
$SpamfileNames{$md5sub} = join(' ',@nums);
my $source = "$base/$spamlog/$sub--$num$maillogExt";
my $target = "$base/$discarded/$sub--$num$maillogExt";
mlog($fh,"MaxAllowedDups reached for this subject - moved
oldest file $source to $target")
if $move->($source,$target) && $SessionLog;
}
I would suggest that previously the fact that it left something behind
with MaxAllowedDups is 0 was a bug and that it is now working
correctly. (cursory glance looks like it only ever removed one file
before) whereas now it iterates through the oddest greater than
$MaxAllowedDups.
On the upside - just move the files back from the discarded dir.
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Assp-test mailing list
Assp-test@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/assp-test
DISCLAIMER:
*******************************************************
This email and any files transmitted with it may be confidential, legally
privileged and protected in law and are intended solely for the use of the
individual to whom it is addressed.
This email was multiple times scanned for viruses. There should be no
known virus in this email!
*******************************************************
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Assp-test mailing list
Assp-test@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/assp-test