You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Michael Schaap <sp...@mscha.org> on 2010/01/30 23:00:45 UTC

_TOKENSUMMARY_ not working in 3.3.0?

Hi,

I just upgraded from 3.2.5 to 3.3.0.

I have the following custom header in my local.cf:
add_header all Tokens _TOKENSUMMARY_\nHammy: _HAMMYTOKENS(5)_\nSpammy: 
_SPAMMYTOKENS(5)_

This always worked in 3.2.x, and resulted in a header like:
X-Spam-Tokens: Tokens: new, 67; hammy, 79; neutral, 64; spammy, 6.
    Hammy: 0.000-+--H*r:sk:googlea, 0.000-+--HTo:U*googlealert, 
0.000-+--H*F:U*googlealerts-noreply, 
0.000-+--HX-Spam-Relays-External:sk:mail-yx, 0.000-+--H*RU:sk:mail-yx
    Spammy: 0.997-+--UD:flickr.com, 0.987-1--suck, 0.974-+--Manage, 
0.940-+--UD:jpg, 0.920-+--HContent-Transfer-Encoding:sk:quoted-
X-Spam-TrustedRelays:

Since installing 3.3.0, though, the header looks like this:
X-Spam-Tokens: Bayes not run.
    Hammy: 0.000-+--H*r:sk:googlea, 0.000-+--HTo:U*googlealert, 
0.000-+--H*F:U*googlealerts-noreply, 0.000-+--H*p:D*bounces.google.com, 
0.000-+--H*RU:sk:mail-yw
    Spammy: 0.987-1--driving, 0.974-+--Manage, 0.972-+--sex, 
0.920-+--HContent-Transfer-Encoding:sk:quoted-, 0.919-+--Reviews

In other words, _TOKENSUMMARY_ is consistently replaced by "Bayes not run.".
Bayes *is* running OK.  Messages are scored correctly, and the 
_HAMMYTOKENS(5)_ and _SPAMMYTOKENS(5)_ placeholders are correctly filled in.

In case it matters, I'm running spamc from procmail.  Both spamc and 
spamd are definitely 3.3.0.

Any thought?

Thanks,

 - Michael

Re: _TOKENSUMMARY_ not working in 3.3.0?

Posted by Mark Martinec <Ma...@ijs.si>.
On Saturday 30 January 2010 23:00:45 Michael Schaap wrote:
> In other words, _TOKENSUMMARY_ is consistently replaced by "Bayes not
>  run.". Bayes *is* running OK.  Messages are scored correctly, and the
> _HAMMYTOKENS(5)_ and _SPAMMYTOKENS(5)_ placeholders are correctly filled
>  in.

Please open a bug report. The following patch should fix it:


--- lib/Mail/SpamAssassin/Plugin/Bayes.pm	(revision 905404)
+++ lib/Mail/SpamAssassin/Plugin/Bayes.pm	(working copy)
@@ -832,7 +832,8 @@
             });
 
   $permsgstatus->set_tag ('TOKENSUMMARY', sub {
-              if( defined $self->{tag_data}{BAYESTC} )
+              my $bayestc = $permsgstatus->get_tag('BAYESTC');
+              if( defined $bayestc || $bayestc ne '' )
                 {
                   my $tcount_neutral = $permsgstatus->{tag_data}{BAYESTCLEARNED}
                                     - $permsgstatus->{tag_data}{BAYESTCSPAMMY}



  Mark