Hi KAM, It seemed simpler so I selected Choice A. This is the diff of mimeassassin.pl: 6839a6840,6856 #*********************************************************************** > # %spam_assassin_init debug channel mod > # From: "Kevin A. McGrail" <kmcgr...@pccc.com> > # Subject: Re: TxRep $msgscore warning > # Date: Mon, 4 May 2015 10:47:58 -0500 > # 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) > my $sa_args = { > local_tests_only => $SALocalTestsOnly, > dont_copy_prefs => 1, > userprefs_filename => $config, > user_dir => $Features{'Path:QUARANTINEDIR'}, > debug => 'TxRep' > }; #*********************************************************************** I then ran a reload but didn't see any changes in the logs so I stopped and restarted mimedefang. But the logs still look the same.
This and the patch to TxRep are currently the only code changes made for the $msgscore warning. Is there more that I need to do somewhere else? Or, am I looking in the wrong place for the debug output? Regards, JJ > On May 4, 2015, at 10:48 AM, Kevin A. McGrail <kmcgr...@pccc.com> wrote: > > 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 > >