Bug 95666

Summary: Invalid spam tool in KMail
Product: [Applications] kmail Reporter: Thomas McGuire <mcguire>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Thomas McGuire 2004-12-22 14:40:42 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

When launching the Anti-Spam-Wizard, the last entry on the second page is invalid, it is displayed only as "(found on this system)".
This is clearly the result of an invalid kmail.antispamrc file. I did not modify it, it came from a vanilla KDE CVS install.

The invalid section is:
>[Spamtool #6]
>HeadersOnly=yes
>ScoreName=Razor
>ScoreHeader=X-Razor-Spam
>ScoreType=Bool
>ScoreValueRegexp=SPAM
>ScoreThresholdRegexp=
Comment 1 Andreas Gungl 2004-12-26 21:01:15 UTC
The file format is okay, because it has been extended in the meantime. However there is a problem with the logic inside of KMail.
Comment 2 Andreas Gungl 2004-12-26 21:10:07 UTC
CVS commit by gungl: 

Somehow reading local configs defaults to the global one
if no local config is available. So we have to double the
check for HeadersOnlyheader.

BUG: 95666


  M +2 -1      antispamwizard.cpp   1.48
  M +2 -2      antispamwizard.h   1.24


--- kdepim/kmail/antispamwizard.cpp  #1.47:1.48
@@ -583,4 +583,5 @@ void AntiSpamWizard::ConfigReader::readA
   {
     KConfigGroup toolConfig( mConfig, groupName.arg( i ) );
+    if( !toolConfig.readBoolEntry( "HeadersOnly", false ) )
     mergeToolConfig( readToolConfig( toolConfig ) );
   }