Kmail and spam filtering

Nigel Henry cave.dnb at tiscali.fr
Sat Jul 29 14:59:08 BST 2006


On Friday 28 July 2006 18:26, Thierry de Coulon wrote:
> On Friday 28 July 2006 18.08, Nigel Henry wrote:
> > Hi Thierry. Yes that's what I mean. I'm getting the odd bit of Ham
> > turning up in the spam directory.
>
> Hi Nigel,
>
> I never had this but now I'm using the old version. You're probably right
> about "unsure". I guess that's what you've done, but I would put those
> false positives in the "ham" directory (whatever it is called now) so that
> bogofilter learns they are good.
>
> I never bothered to look what the ruels are that bogofilter uses so it's
> hard to imagine whatcaused the error.
> Thierry

Hi Thierry.

Problem solved, by a bit more logical thinking.

Filter 1.  bogofilter
Filter criteria:
Match all of the following
<any header>         matches regular expr                 .*

Filter Actions:
remove header                 X-Bogosity
remove header                 X-Attachments
pipe through                     /usr/local/bin/bogofilter -pev

Advanced options:
If this filter matches, stop processing here. (unchecked)

Filter 2.  bogofilter_is_spam
Filter Criteria:
Match all of the following
X-Bogosity                contains                 Spam

Filter Actions:
remove header               X-Bogosity
remove header               X-Attachments
file into folder                   spam

Advanced Options:
apply this filter to incoming messages    (Checked)
on manual filtering                                     (Checked)
If this filter matches, stop processing here    (Checked)

Filter 3.    bogofilter_is_ham
Filter Criteria:
Match all of the following
X-Bogosity                    contains                      Ham

Filter Actions:
remove header             X-Bogosity
remove header             X-Attachments
file into folder                 inbox

Advanced Options:   (As Filter 2)

Filter 4.       bogofilter_is_unsure
Filter Criteria:
Match all of the following
X-Bogosity                      contains                     Unsure

Filter Actions:
remove header                X-Bogosity
remove header                X-Attachments
file into folder                    unsure

Advanced Options:    (As Filter 2)

I do not have any other mail filtering, and all the mail used to arrive in the 
inbox. Now it is being separated to, spam, inbox, and unsure.  Also the 
X-bogosity added headers that were turning up in the inbox, are now gone, as 
they should be.

Bogofilter using tri-state with the additional "Unsure" seems to be a good 
idea, as I've just received 2 unsures, which are obviously Spam, but "Unsure" 
is showing that they were on the way to being misidentified as Ham, and are 
obvious candidates for adding to the Spam db.

At the moment I'm still building up the database, so am obviously adding all 
the correctly identified Spam to it also.

I have not been using your shellscript, as some changes were necessary that I 
wasn't sure of, due to changes in bogofilter 1.0.2,  and am using the 
following to update the database, having already created the .bogofilter 
directory in /home/user-name. This is for Kmail directories using the maildir 
format, with the new directories "Spam" and "NonSpam" for mail that 
bogofilter is going to update the database with, and 2 new directories, 
named, "spam" (lower case) , and "unsure" for the mail that bogofilter either 
identifies as Spam, or is Unsure about.

bogofilter -sv -B Mail/Spam/cur          (for the spam)
bogofilter -nv -B Mail/NonSpam/cur      (for the nonspam)

Both of these are added to wordlist.db in .bogofilter, but separately 
identified in it, so you can run bogoutil to see the separate wordlists for 
spam, and nonspam, and also can see the MSG_COUNT for each.

Hope this might be of use to you, and others.

Nigel.

btw. How's the Gentoo install going? I've been through all that on dialup, and 
havn't run emerge sync, or updated it for a long time, as it ties up one of 
my 2 machines for ages.




 
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list