Bug 339195 - regression: bogofilter fails to manipulate message headers
Summary: regression: bogofilter fails to manipulate message headers
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: commands and actions (show other bugs)
Version: 4.14.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-19 05:46 UTC by piedro
Modified: 2015-04-03 15:10 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.14.7


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description piedro 2014-09-19 05:46:22 UTC
First of all: Kmail2 on a new user account on a freshly set up system... 
Used the antispam setup assistant - bogofilter has been found. 

Now pressing the spam button (or relying on automatic filtering) doesn't enter any flags into the mails message header. The filter protocl shows no useful information: 

[...] apply filter action: mark as "spam"
[...] apply filter action: execute command: "bogofilter -s"
[...] execution of this action failed: there has been a problem
[...] apply filter action: move to folder "local folder/Spam" 

this is the same for imap messages or local folder messages. 


Reproducible: Always

Steps to Reproduce:
1. use the anti-spam setup assistant with bogofilter 
2. mark a message as "spam" 
3. check the message header for bogosity flag

Actual Results:  
no x-bogosity found in message header

Expected Results:  
there should be a bogosity flag 

this also fails with other parameters like "bogofilter -p -e", as a result bogofilter's bayesion filter doesn't improve...
Comment 1 Alastair 2015-03-17 03:02:18 UTC
I'd like to echo the above.  I recently upgraded my distro, part of which included upgrading from kmail to kmail2 (version 4.14.4).  

What had formerly been a working bogofilter (with meaningful X-Bogosity header values) is now returning values of 0.000 (see below) and my in-basket is filling with spam.   Attempts to retrain the filter have no effect.

A clear spam example is quoted below (some header details XXXXed for privacy), note the line
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4

--- quote ---
Return-Path: <dgxaq9wyvu@i.softbank.jp>
Delivered-To: al@mailer.XXXXX
Received: from 64.66.247.34 (unknown [59.108.91.244]) by mailer.XXXX (Postfix) with SMTP id 7CD65130DF for <XXX@XXXXXt>; Mon, 16 Mar 2015 19:30:24 -0700 (MST)
From: pi7dnf8xga@me.com
To:  XXXXX@XXXXX
Subject: 男の悩み完全復活だ!ID:ttwuhk
Date: Tue, 17 Mar 2015 11:34:53 +0900
X-Info: XXXX@XXXX
MIME-Version: 1.0
Content-Type: text/plain; charset="Shift_JIS"
List-Id: 8
Message-ID: <20150317023034.7CD65130DF@XXXXXX>
Status:   
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4
レビトラは水に溶けやすい性質のため最も即効性があるED治療薬で、食事の影響を受けにくいのが大きな特徴です。
個人的には一番万能なイメージで、管理人が常に持ち歩いているのはレビトラ系のED治療薬です。
理由は単純です。いついかなる時に食事→大人の時間となっても、これがあればいつでもどこでも、射精直後に何度も勃起できる最強状態になれるためです。
----- end quote -----

In the absence of (or while awaiting) a fix, is there a workaround to filter spam?
Comment 2 Laurent Montel 2015-04-03 05:36:55 UTC
Please explain me what is the real problem.
I don't understand it.
Thanks.
Comment 3 piedro 2015-04-03 06:00:02 UTC
I think bogofilter just doesn't work... I deleted all filters and started to use spambayes. Takes a while to train but works after a while. 

WIth bogofilter I tried to use for spam filter training for three month every day, but the results never changed at all - nothing got regarded as spam. So I guess bogofilter just doesn't train anymore.... 

fyi: the spam filter setup assistant seems to be setting up spambayes not correctly. You might have to adjust the paths to the executables. The assistant assumes the executables are located within the users home folder. this is not the case if u installed spambayes globally (the more common case, I guess). 

piedro
Comment 4 Laurent Montel 2015-04-03 06:22:17 UTC
Ah ?
Where do you see that it doesn't use correct path ?
Comment 5 piedro 2015-04-03 06:29:33 UTC
As it hasn't worked I checked in kmail  "extras > filters", 
checked "filter actions" and had to change it to 

"/usr/bin/sb_filter.py" 

(accordingly within all the other spambayes related filters) 

p.
Comment 6 Laurent Montel 2015-04-03 07:05:55 UTC
Wierd /usr/bin is not a user path on your distro ?
Comment 7 Laurent Montel 2015-04-03 08:18:08 UTC
I found the bug why it doesn't use correct path.
I will commit today
Comment 8 Laurent Montel 2015-04-03 12:05:48 UTC
Git commit a1eb0ff976ce4d9bf426e30b547b637732399423 by Montel Laurent.
Committed on 03/04/2015 at 11:35.
Pushed by mlaurent into branch 'KDE/4.14'.

Fix store/load url.

Fix bug Bug 339195 - regression: bogofilter fails to manipulate message headers
Related: bug 345822
FIXED-IN: 4.14.7

M  +34   -0    mailcommon/filter/autotests/filteractionpipethroughtest.cpp
M  +1    -0    mailcommon/filter/autotests/filteractionpipethroughtest.h
M  +34   -0    mailcommon/filter/autotests/filteractionwithurltest.cpp
M  +3    -0    mailcommon/filter/autotests/filteractionwithurltest.h
M  +6    -4    mailcommon/filter/filteractions/filteractionwithurl.cpp

http://commits.kde.org/kdepim/a1eb0ff976ce4d9bf426e30b547b637732399423
Comment 9 piedro 2015-04-03 15:08:06 UTC
Thx a lot! 

It's not been a huge issue but if there is an assistant it should assist, glad you found it! 

Thank you for all your work!,
piedro