我们安装了一个 ASSP(反垃圾邮件 SMTP 代理)v2.3.3.13217(最后一个)(在 Ubuntu Server 13.04 上)。一段时间后,它开始在控制台打印:
...
Wide character in print at sub main::mlogWrite line 30
Wide character in print at sub main::mlogWrite line 32
Wide character in print at sub main::mlogWrite line 30
Wide character in print at sub main::mlogWrite line 32
...
等等。
这是来自 assp.pl 的这个子:
sub mlogWrite {
return if $WorkerNumber;
my @m;
my $items;
threads->yield();
&debugWrite();
threads->yield;
$items = $mlogQueue->pending();
$refreshWait = (time - $lastmlogWrite) > 5 ? 5 : 1;
return if (! $items);
threads->yield();
@m = $mlogQueue->dequeue_nb($items);
threads->yield();
my @tosyslog;
while (@m) {
my $logline = my $line = de8(shift @m);
if ($Unidecode2Console) {
eval{
$line = Text::Unidecode::unidecode($line);
} or print "con uni-decoding error: $@";
} else {
eval{
Encode::from_to($line,'UTF-8',$ConsoleCharset,sub { return '?'; })
if $ConsoleCharset && $ConsoleCharset !~ /utf-?8/oi;
1;
} or print "con encoding error: $@";
}
push @tosyslog,substr($line,length($LogDateFormat)) if ($sysLog && ($CanUseSyslog || ($sysLogPort && $sysLogIp)));
if ($line !~ /\*\*\*assp\&is\%alive\$\$\$/o) {
print $line unless ($silent);
w32dbg($line) if ($CanUseWin32Debug);
print $LOG $logline if ($logfile && $asspLog && fileno($LOG));
print $LOGBR $logline if ($logfile &&
$asspLog &&
fileno($LOGBR) &&
$ExtraBlockReportLog &&
$logline =~ /\[\s*spam\sfound\s*\]/io);
}
if ($logline !~ /page:\/maillog/o) {
shift @RealTimeLog if (@RealTimeLog > 33);
push @RealTimeLog, $logline;
$lastmlogWrite = time;
}
}
tosyslog('info', \@tosyslog) if (@tosyslog && $sysLog && ($CanUseSyslog || ($sysLogPort && $sysLogIp)));
$MainThreadLoopWait = 1;
}
非常非常抱歉,我不懂perl。这里的错误在哪里?
完整的 assp.pl 位于http://sourceforge.net/projects/assp/files/ASSP%20V2%20multithreading/2.3.3%2013217/ASSP_2.3.3_13217.zip