[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdepim/kmail
From: Andreas Gungl <a.gungl () gmx ! de>
Date: 2004-01-31 21:03:14
Message-ID: 20040131210314.48029993A () office ! kde ! org
[Download RAW message or body]
CVS commit by gungl:
Use execute filter actions in the classification filters to avoid loss
of messages by incorrectly set up commands
M +9 -7 antispamwizard.cpp 1.6
M +3 -3 antispamwizard.h 1.6
M +5 -5 kmail.antispamrc 1.3
--- kdepim/kmail/antispamwizard.cpp #1.5:1.6
@@ -67,7 +67,9 @@ AntiSpamWizard::AntiSpamWizard( QWidget*
toolList.append( SpamToolConfig( "&SpamAssassin", "spamassassin -V",
"http://spamassassin.org", "SpamAssassin Check",
- "spamassassin -L", "sa-learn --spam --single",
- "sa-learn --ham --single", "X-Spam-Flag", "yes",
- false, false ) );
+ "spamassassin -L",
+ "sa-learn -L --spam --no-rebuild --single",
+ "sa-learn -L --ham --no-rebuild --single",
+ "X-Spam-Flag", "yes",
+ false, true ) );
// read the configuration from the file
for (int i = 1; i <= registeredTools; i++)
@@ -80,6 +82,6 @@ AntiSpamWizard::AntiSpamWizard( QWidget*
QString filterName = toolConfig.readEntry( "PipeFilterName" );
QString detectCmd = toolConfig.readEntry( "PipeCmdDetect" );
- QString spamCmd = toolConfig.readEntry( "PipeCmdSpam" );
- QString hamCmd = toolConfig.readEntry( "PipeCmdHam" );
+ QString spamCmd = toolConfig.readEntry( "ExecCmdSpam" );
+ QString hamCmd = toolConfig.readEntry( "ExecCmdHam" );
QString header = toolConfig.readEntry( "DetectionHeader" );
QString pattern = toolConfig.readEntry( "DetectionPattern" );
@@ -228,5 +230,5 @@ void AntiSpamWizard::accept()
&& (*it).useBayesFilter() )
{
- KMFilterAction* classSpamFilterAction = dict["filter app"]->create();
+ KMFilterAction* classSpamFilterAction = dict["execute"]->create();
classSpamFilterAction->argsFromString( (*it).getSpamCmd() );
classSpamFilterActions->append( classSpamFilterAction );
@@ -261,5 +263,5 @@ void AntiSpamWizard::accept()
&& (*it).useBayesFilter() )
{
- KMFilterAction* classHamFilterAction = dict["filter app"]->create();
+ KMFilterAction* classHamFilterAction = dict["execute"]->create();
classHamFilterAction->argsFromString( (*it).getHamCmd() );
classHamFilterActions->append( classHamFilterAction );
--- kdepim/kmail/antispamwizard.h #1.5:1.6
@@ -74,10 +74,10 @@ namespace KMail {
PipeFilterName=SpamAssassin Check
PipeCmdDetect=spamassassin -L
- PipeCmdSpam=sa-learn --spam --single
- PipeCmdHam=sa-learn --ham --single
+ ExecCmdSpam=sa-learn --spam --no-rebuild --single
+ ExecCmdHam=sa-learn --ham --no-rebuild --single
DetectionHeader=X-Spam-Flag
DetectionPattern=yes
UseRegExp=0
- SupportsBayes=0
+ SupportsBayes=1
</pre>
The name of the config file is kmail.antispamrc
--- kdepim/kmail/kmail.antispamrc #1.2:1.3
@@ -8,10 +8,10 @@
PipeFilterName=SpamAssassin Check
PipeCmdDetect=spamassassin -L
-PipeCmdSpam=sa-learn --spam --single
-PipeCmdHam=sa-learn --ham --single
+ExecCmdSpam=sa-learn -L --spam --no-rebuild --single
+ExecCmdHam=sa-learn -L --ham --no-rebuild --single
DetectionHeader=X-Spam-Flag
DetectionPattern=yes
UseRegExp=0
-SupportsBayes=0
+SupportsBayes=1
[Spamtool #2]
@@ -21,6 +21,6 @@
PipeFilterName=Bogofilter Check
PipeCmdDetect=bogofilter -p -e
-PipeCmdSpam=bogofilter -S
-PipeCmdHam=bogofilter -N
+ExecCmdSpam=bogofilter -S
+ExecCmdHam=bogofilter -N
DetectionHeader=X-Bogosity
DetectionPattern=yes
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic