[Mimedefang] Reading MIMEDefang log-entries
Briareos
auronsrv at gmx.net
Tue Jul 31 10:59:18 EDT 2007
Thank you very much, Kevin. I just didn't know where to look for the needed
information as I am overtaking the work of my predecessor right now.
I am at the moment trying your script, but somehow the variables seem not to
be filled with values, as I am only getting lines like this (req/hits always
0):
Jul 31 16:52:27 kappazunda mimedefang.pl[15007]: SA-DEBUG: - Yes, hits=0.0
required=0.0 tests=none
Maybe it helps to know, that I had to add the filter_initialize function,
because it was not there before. So this is what i added (I've deleted the
commented lines):
######################
sub filter_initialize () {
use Text::Wrap();
}
sub build_status_line {
my ($hits, $req, $names, $report, $spamstatus) = @_;
my $line;
$line = (($hits >= $req) ? "Yes, " : "No, ");
$line .= sprintf("hits=%2.1f required=%2.1f\n", $hits, $req);
if($_ = $names) {
$Text::Wrap::columns = 74;
$Text::Wrap::huge = 'overflow';
$Text::Wrap::break = '(?<=,)';
$line .= Text::Wrap::wrap("\ttests=", "\t", $_) . "\n";
} else {
$line .= "\ttests=none\n";
}
return $line;
}
######################
Ant the filter_end:
sub filter_end ($) {
md_syslog('warning', "SA-DEBUG: $recip_list - ".&build_status_line($hits,
$req, $names, $report));
...
Any ideas?
More information about the MIMEDefang
mailing list