endless respawning with SA enabled
Jan-Peter Koopmann
Jan-Peter.Koopmann at SECEIDOS.DE
Tue Mar 11 13:59:50 GMT 2003
Hi Tal,
> I did some more tests, and it looks like it's dieing in SA.pm in
compile_now (dropped log messages in there,
> no AWL, makes the object, stops at compile_now) when run in debug
mode, no errors or anything, just quits.
> user is root, has a home, and SA works on it's own.
I did not get the debug mode to work with MailScanner. Simply quits. Try
something like this in SpamAssassin.pm
sub dbg {
my $dbg=$Mail::SpamAssassin::DEBUG;
#return unless $dbg->{enabled};
my ($msg, $codepath, $level) = @_;
$msg=join('',@{$msg}) if (ref $msg);
if (defined $codepath) {
if (not defined $dbg->{$codepath}) {
warn("dbg called with codepath $codepath, but it's not defined,
skipping (message was \"$msg\"\n");
return 0;
} elsif (not defined $level) {
warn("dbg called with codepath $codepath, but no level threshold
(message was \"$msg\"\n");
}
}
# Negative levels are just level numbers, the more negative, the more
debug
return if (defined $level and $level<0 and not $dbg->{$codepath} <=
$level);
# Positive levels are bit fields
return if (defined $level and $level>0 and not $dbg->{$codepath} &
$level);
# LOG
if ( open(DBGFILE, ">>/tmp/sa.log") ) {
print DBGFILE $msg . "\n";
close(DBGFILE);
}
warn "debug: $msg\n";
}
Notice the # in front of the return. This will "turn on" debugging even
though SA is not in debug mode. This will create a /tmp/sa.log file with
all debuggin output of SA. Once you have this output, look for error
messages or send a copy of it here.
Thanks,
JP
More information about the MailScanner
mailing list