Fixed Confidence comparison and added actual unlink.
This commit is contained in:
parent
a31c482e2b
commit
7f8e60a7ee
1 changed files with 5 additions and 3 deletions
|
@ -65,16 +65,18 @@ MAIL: foreach my $dir (@msgDirs) {
|
|||
}
|
||||
$total++;
|
||||
|
||||
if ($dspamVal{Confidence} >= $DSPAM_PROB_MIN and
|
||||
$dspamVal{Probability} >= $DSPAM_CONF_MIN) {
|
||||
if ($dspamVal{Confidence} >= $DSPAM_CONF_MIN and
|
||||
$dspamVal{Probability} >= $DSPAM_PROB_MIN) {
|
||||
$countDeleted++;
|
||||
warn "unable to unlink $dir/$file : $!"
|
||||
unless unlink("$dir/$file") == 1;
|
||||
}
|
||||
close MAIL_MESSAGE;
|
||||
}
|
||||
close MAILDIR;
|
||||
}
|
||||
|
||||
print "$countDeleted of $total would be deleted\n";
|
||||
print "$countDeleted of $total were deleted\n";
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
|
Loading…
Add table
Reference in a new issue