[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdepim-users
Subject:    [kdepim-users] Re: Copy To Folder: sa-learn pipe no substitute
From:       Karl Hakmiller <karlh () concentric ! net>
Date:       2004-01-29 17:08:48
Message-ID: 200401291208.48351.karlh () concentric ! net
[Download RAW message or body]

On Wednesday 28 January 2004 06:11 am, kdepim-users-request@kde.org wrote:
> On Monday 26 January 2004 18:20, Karl Hakmiller wrote:
> > As I said -- you try it. I am 100% sure because I tried it a week
> > ago when I first found that Kmail does not provide Copy To Folder.
> > The result was that every email piped through sa-learn --ham
> > --no-rebuild as specified in man sa-learn for treatment of single
> > messages is blank (Kmail shows it as No Subject, Unknown Sender in
> > the message panel though when it is opened the header contains
> > recipient and sender though the message body itself is blank)
>
> Okay. I've tried it. The problem is that "sa-learn --ham --no-rebuild
> --single" returns "Learned from 1 messages.". Therefore KMail (I tried
> 1.6) replaces the message with a message with empty header and with
> "Learned from 1 messages." as body. That's the expected behavior of the
> pipe-through filter action. We'll most likely make KMail ignore the
> output of the pipe-through filter action if it doesn't seem to be an
> email message. But you don't have to wait for us to implement this
> change. Instead simply use the following pipe-through command:
>   "sa-learn --ham --no-rebuild --single >/dev/null"
>
> As you can see you don't really need the "Copy to Folder" filter
> action. ;-) At least not for training SpamAssassin's Bayesian
> classifier.

Congrats.  Your suggestion works as desired.  Now my question is -- where did 
you find that "--single" option as it's sure not to be found in my "man 
sa-learn" documentation or anywhere else that I've looked.  Maybe my docs are 
out of date and, if so, I'd like to update them.

BTW, while I was adjusting the filter I used to test this pipe, I inserted the 
following just after the pipe action: "add header X-KDE-PR-Message SAL"
so that I can locate such "learned" messages for later processing by a perl 
script with the final action being, of course, Move To Folder <specific 
mbox>.

Thanks for your help.

Karl L  

Karl L

_______________________________________________
KDE PIM users mailing list
kdepim-users@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic