From more discussins, there are two ways with MD to activate the TxRep
debug channel if you using spam_assassin_init in your filter.
Choice A) modify mimedefang.pl directly, i.e. spam_assassin_init to add
the debug channel:
my $sa_args = {
local_tests_only => $SALocalTestsOnly,
dont_copy_prefs => 1,
userprefs_filename => $config,
user_dir => $Features{'Path:QUARANTINEDIR'},
debug => 'TxRep'
};
And run md-mx-ctrl reread to pick up the change
or
Choice B) you can define your own SASpamTester object at the top of your
filter something like this though you'll have to define the variables
$SALocaltestsOnly, $config, and possibly $Features.
my $sa_args = {
local_tests_only => $SALocalTestsOnly,
dont_copy_prefs => 1,
userprefs_filename => $config,
user_dir => $Features{'Path:QUARANTINEDIR'},
debug => 'TxRep'
};
use vars qw($SASpamTester);
$SASpamTester = Mail::SpamAssassin->new( $sa_args );
And run md-mx-ctrl reread to pick up the change
Since this is for a quick debug, you might find A) easier.
regards,
KAM
Can you add this block of code above line 1386 in the current
TxRep.pm? Then we'll try and figure out how to enable the TxRep debug
channel from MD so you can log the info and relay it. It also should
hide the informat
{
#Bug 7164, trying to find out reason for these: _WARN: Use of
uninitialized value $msgscore in addition (+) at
/usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/TxRep.pm line 1415.
no warnings;
unless (defined $msgscore) {
#Output some params and the calling function so we can identify
more about this bug
dbg("TxRep: Parameters: self: $self storage: $storage pms: $pms,
key: $key, id: $id, ip: $ip, signedby: $signedby, msgscore: $msgscore");
dbg("TxRep: weight: $weight");
my ($package, $filename, $line) = caller();
chomp($package);
chomp($filename);
chomp($line);
dbg("TxRep: $msgscore undefined - Caller Info: Package: $package
- Filename: $filename - Line: $line");
#Define $msgscore as a triage to hide warnings while we find the
root cause
$msgscore = 0;
}
}
Here's more detail about where it needs to be:
sub check_reputation {
###########################################################################
my ($self, $storage, $pms, $key, $id, $ip, $signedby, $msgscore) = @_;
my $delta = 0;
my $weight = ($key eq 'MSG_ID')? 1 :
eval('$pms->{main}->{conf}->{txrep_weight_'.lc($key).'}');
--> Block here
if (defined $weight && $weight) {
Regards,
KAM