Lines 1-5
Link Here
|
1 |
#!/usr/bin/perl -w |
1 |
#!/usr/bin/perl -w |
2 |
use strict; |
2 |
use strict; |
|
|
3 |
use Encode; |
3 |
|
4 |
|
4 |
# |
5 |
# |
5 |
# <@LICENSE> |
6 |
# <@LICENSE> |
Lines 626-636
Link Here
|
626 |
init_results() if !$init_results; |
627 |
init_results() if !$init_results; |
627 |
|
628 |
|
628 |
if ($class eq "s") { |
629 |
if ($class eq "s") { |
629 |
if ($opt_o) { print STDOUT $result; } else { print SPAM $result; } |
630 |
if ($opt_o) { print STDOUT encode_utf8($result); } else { print SPAM encode_utf8($result); } |
630 |
$spam_count++; |
631 |
$spam_count++; |
631 |
} |
632 |
} |
632 |
elsif ($class eq "h") { |
633 |
elsif ($class eq "h") { |
633 |
if ($opt_o) { print STDOUT $result; } else { print HAM $result; } |
634 |
if ($opt_o) { print STDOUT encode_utf8($result); } else { print HAM encode_utf8($result); } |
634 |
$ham_count++; |
635 |
$ham_count++; |
635 |
} |
636 |
} |
636 |
|
637 |
|
Lines 1079-1084
Link Here
|
1079 |
$line = Mail::SpamAssassin::ArchiveIterator::_index_pack($date, $class, $format, $where); |
1080 |
$line = Mail::SpamAssassin::ArchiveIterator::_index_pack($date, $class, $format, $where); |
1080 |
} |
1081 |
} |
1081 |
|
1082 |
|
|
|
1083 |
$result = encode_utf8($result); |
1082 |
send_line($parent,"$result\0RESULT $line"); |
1084 |
send_line($parent,"$result\0RESULT $line"); |
1083 |
} |
1085 |
} |
1084 |
exit; |
1086 |
exit; |
Lines 1608-1615
Link Here
|
1608 |
warn "mass-check: readline failed, attempting to recover\n"; |
1610 |
warn "mass-check: readline failed, attempting to recover\n"; |
1609 |
$select->remove($socket); |
1611 |
$select->remove($socket); |
1610 |
} |
1612 |
} |
1611 |
elsif ($line =~ /^([^\0]*)\0RESULT (.+)$/s) { |
1613 |
elsif ($line =~ /^([^\0]*(?:(?!\0RESULT )\0[^\0]+)*)\0RESULT (.+)$/s) { |
1612 |
my $result = $1; |
1614 |
my $result = decode_utf8($1); |
1613 |
my ($date,$class,$type) = Mail::SpamAssassin::ArchiveIterator::_index_unpack($2); |
1615 |
my ($date,$class,$type) = Mail::SpamAssassin::ArchiveIterator::_index_unpack($2); |
1614 |
aidbg "mass-check: $class, $type, $date\n"; |
1616 |
aidbg "mass-check: $class, $type, $date\n"; |
1615 |
|
1617 |
|