Hi, After activating TxRep I always receive these warnings. I use mysql for TxRep and I see a lot of "xxxxxxxx@sa_generated" entries in the database, don't know if they are right.
I have activated all spamd debugs and included your block in TxRep. This is the output: === rules: running one_line_body tests; score so far=-2.601 rules: running head tests; score so far=-2.601 rules: running body tests; score so far=-2.601 rules: running uri tests; score so far=-2.601 rules: running rawbody tests; score so far=-2.601 rules: running full tests; score so far=-2.601 rules: running meta tests; score so far=-2.601 check: running tests for priority: 1000 rules: running one_line_body tests; score so far=-2.601 rules: running head tests; score so far=-2.601 rules: running head_eval tests; score so far=-2.601 learn: auto-learn: currently using scoreset 3, recomputing score based on scoreset 1 learn: auto-learn: not considered head or body scores: -0.7 learn: auto-learn: message score: -2.601, computed score for autolearn: -0.7 dbiplugin: dbi:mysql:spam:1.1.1.1 need ping? yes dbiplugin: Creating new database handle to 'spam:1.1.1.1_spam_xxxxxx_AutoCommit=1_PrintError=0_Username=yyyyyyyyy' auto-whitelist: sql-based connected to DBI:mysql:spam:1.1.1.1 auto-whitelist: sql-based using username: xxxxxxxxxx TxRep: Parameters: self: Mail::SpamAssassin::Plugin::TxRep=HASH(0x2ac2918) storage: pms: Mail::SpamAssassin::PerMsgStatus=HASH(0x4690360), key: MSG_ID, id: 34a82b329b230df129b3b12a5bf6cc7e2ab93cd2@sa_generated, ip: , signedby: 1430826824, msgscore: TxRep: weight: 1 TxRep: undefined - Caller Info: Package: Mail::SpamAssassin::Plugin::TxRep - Filename: /usr/lib/perl5/site_perl/5.16.2/Mail/SpamAssassin/Plugin/TxRep.pm - Line: 1371 auto-whitelist: sql-based get_addr_entry: no entries found for 34a82b329b230df129b3b12a5bf6cc7e2ab93cd2@sa_generated|1430826824 auto-whitelist: sql-based 34a82b329b230df129b3b12a5bf6cc7e2ab93cd2@sa_generated|1430826824 scores 0, count 0 check: tagrun - tag TXREP_MSG_ID is now ready, value: 0.0 check: tagrun - tag TXREP_MSG_ID_COUNT is now ready, value: 0.0 check: tagrun - tag TXREP_MSG_ID_PRESCORE is now ready, value: -2.6 TxRep: reputation: none, count: 0, weight: 1.0, delta: 0.000, MSG_ID: 34a82b329b230df129b3b12a5bf6cc7e2ab93cd2@sa_generated auto-whitelist: sql-based add_score/insert score 0: xxxxxxx|34a82b329b230df129b3b12a5bf6cc7e2ab93cd2@sa_generated|none|1|0|1430826824 TxRep: message 34a82b329b230df129b3b12a5bf6cc7e2ab93cd2@sa_generated already scanned, using old data; post-TxRep score: -2.368 rules: running body tests; score so far=-2.368 rules: running uri tests; score so far=-2.368 rules: running rawbody tests; score so far=-2.368 rules: running full tests; score so far=-2.368 rules: running meta tests; score so far=-2.368 === TxRep.pm - Line: 1371 === sub check_reputations { ########################################################################### my $self = shift; my $delta; if ($self->open_storages()) { if ($self->{conf}->{txrep_user2global_ratio} && $self->{user_storage} != $self->{global_storage}) { my $user = $self->check_reputation('user_storage', @_); my $global = $self->check_reputation('global_storage',@_); $delta = (defined $user && $user==$user) ? ( $self->{conf}->{txrep_user2global_ratio} * $user + $global ) / ( 1 + $self->{conf}->{txrep_user2global_ratio} ) : $global; } else { 1371: ==> $delta = $self->check_reputation(undef,@_); } } return $delta; } === Regards, Carlos Velasco -------- Original Message -------- Subject: Re: TxRep $msgscore warning From: Kevin A. McGrail <kmcgr...@pccc.com> To: J.J. Day <day1...@hotmail.com>, Joe Quinn <jqu...@pccc.com> Cc: "users@spamassassin.apache.org" <users@spamassassin.apache.org>, Date: Thu, 30 Apr 2015 13:15:07 -0400 > On 4/30/2015 11:44 AM, J.J. Day wrote: >> FWIW, I switched to TxRep several months ago. Every message generates >> both error lines. I have added a test to initialize $msgscore to >> avoid filling my log files. Spam messages seem to all generate a >> negative offset of ~1/3 the total. I copied a sample to the end. >> >> My setup is: >> FreeBSD 10.0 >> Sendmail 8.14.7 >> Mimedefang 2.75 >> SpamAssassin 3.4.0 >> Cyrus 2.4.17 >> >> I hope this helps. > Interesting. So you are using the API. On your same box if you run > spamassassin -t with your sample, can you recreate the issue? > > Otherwise, the sample doesn't help us because we can't recreate the > issue, unfortunately. > > > DFS, with MD calling SA as an API, how do you turn on a debug > channel? Happen to know? > > > 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