List Info

Thread: Problem with KMail and sb_bnfilter




Problem with KMail and sb_bnfilter
user name
2006-05-26 07:05:57
Since switching to KMail a few months ago, I have been using
SpamAssassin (as 
this was the default with my Fedora core installation). I
had previously used 
for many months spambayes with procmail, and found it did a
much better job 
of filtering my spam. So I replaced the spamassassin filters
with ones using 
sb_filter.py, and using sb_filter.py -s/-g to retrain
incorrectly classified 
messages.

This worked as expected, so I decided to try using
sb_bnfilter.py to speed up 
the processing when I receive multiple messages in quick
succession. I simply 
replaced piping the messsages through sb_filter.py with
piping through 
sb_bnfilter.py. However this always inserted a second From
(not From 
immediately below the From header the message had when it
was piped to 
sb_bnfilter.py. The header always had the form "From
nobody Fri May 26 
17:04:18 2006". This would not seem to be desirable,
and sometimes confused 
KMail. The same thing happened when I applied a test filter
manually which 
piped a message through sb_bnfilter.py. The
X-Spambayes-Classification header 
was added correctly. sb_filter .py never adds this unwanted
From header.

Is this how sb_bnfilter is supposed to be used, and does
this indicate a 
problem with sb_bnfilter or with KMail?

Peter Barker
_______________________________________________
SpamBayespython.org
htt
p://mail.python.org/mailman/listinfo/spambayes
Check the FAQ before asking: http://spambayes.sf.
net/faq.html
Problem with KMail and sb_bnfilter
user name
2006-05-26 13:28:34
On Friday 26 May 2006 08:05, Peter Barker wrote:
> I simply
> replaced piping the messsages through sb_filter.py with
piping through 
> sb_bnfilter.py. 

....

> Is this how sb_bnfilter is supposed to be used

Yes

> However this always inserted a second From (not
From  

Interesting.

It looks like sb_filter will preserve any From line, but not
insert one if it 
does not already exist. sb_bnfilter always includes one in
its output.

I cant see why sb_bnfilter would insert a *second* From
line. Or are you 
counting the "From:" header line as the second?

> sometimes confused KMail.

What confusion are you seeing? (I have been using
sb_bnfilter with kmail since 
it was first developed without problem)

> and does this indicate a problem with sb_bnfilter or
with KMail?

Try the attached patch to make sb_bnfilter behave the same
as sb_filter.

-- 
Toby Dickenson
_______________________________________________
SpamBayespython.org
htt
p://mail.python.org/mailman/listinfo/spambayes
Check the FAQ before asking: http://spambayes.sf.
net/faq.html
Problem with KMail and sb_bnfilter
user name
2006-05-26 22:34:50
Thanks Toby,

The patch fixed the duplication of From lines. (I applied
the patch to 
sb_bnserver distributed with spambayes-1.1a2, so the patched
line number was 
different.)

The original version definitely inserted another From line,
not From:. For 
example, the first 2 lines of a message:

>From brabqnetvigator.com Fri Jul  1 04:06:06 2005
Return-Path: <pvqjeeljvnnetzero.net>

became

>From brabqnetvigator.com Fri Jul  1 04:06:06 2005
>From nobody Sat May 27 08:08:45 2006
Return-Path: <pvqjeeljvnnetzero.net>

after using the original sb_bnserver.py. The From: line
remained unchanged 
further down in the headers.

I am not sure that the KMail problem was caused by the extra
From line, as I 
was experimenting with suspend, and the problem occurred
after a computer 
crash. KMail displayed a message with no contents, just the
subject, sender 
etc. I removed the second From line with another editor, and
KMail displayed 
the message properly, after re-indexing the folder. So it
may have been an 
index error caused by the crash. However I don't think it
is a good idea to 
have a second incorrect From line in a message anyway.

Regards,
Peter Barker

On Friday 26 May 2006 23:28, Toby Dickenson wrote:
> On Friday 26 May 2006 08:05, Peter Barker wrote:
> > I simply
> > replaced piping the messsages through sb_filter.py
with piping through
> > sb_bnfilter.py.
>
> ....
>
> > Is this how sb_bnfilter is supposed to be used
>
> Yes
>
> > However this always inserted a second From (not
From
>
> Interesting.
>
> It looks like sb_filter will preserve any From line,
but not insert one if
> it does not already exist. sb_bnfilter always includes
one in its output.
>
> I cant see why sb_bnfilter would insert a *second* From
line. Or are you
> counting the "From:" header line as the
second?
>
> > sometimes confused KMail.
>
> What confusion are you seeing? (I have been using
sb_bnfilter with kmail
> since it was first developed without problem)
>
> > and does this indicate a problem with sb_bnfilter
or with KMail?
>
> Try the attached patch to make sb_bnfilter behave the
same as sb_filter.
_______________________________________________
SpamBayespython.org
htt
p://mail.python.org/mailman/listinfo/spambayes
Check the FAQ before asking: http://spambayes.sf.
net/faq.html
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )