running sa-learn destroys message
9 answers - 330 bytes -

Greetings;
SA 3.1.7, driven by procmail, feeding it all on to kmail for sorting.
I have ceased running sa-learn on false positives for the last
couple of months because it nulls the message since I installed FC6. Is
there a way to preserve the message in the case of teaching it ham, that
it made a mistake?
No.1 | | 524 bytes |
| 
Fri, Feb 02, 2007 at 12:37:55PM -0500, Gene Heskett wrote:
I have ceased running sa-learn on false positives for the last
couple of months because it nulls the message since I installed FC6. Is
there a way to preserve the message in the case of teaching it ham, that
it made a mistake?
It sounds like you're calling sa-learn as a filter, which it isn't. The
script doesn't modify/delete the files you pass to it, but "cat message |
sa-learn" won't produce the message as output.
No.2 | | 953 bytes |
| 
Gene Heskett wrote:
Greetings;
SA 3.1.7, driven by procmail, feeding it all on to kmail for sorting.
I have ceased running sa-learn on false positives for the last
couple of months because it nulls the message since I installed FC6. Is
there a way to preserve the message in the case of teaching it ham, that
it made a mistake?
Erm, can you be really specific on how you're calling sa-learn ?
It's not supposed to modify the message file in any way if it is,
somethings wrong
Now, if you've got something trying to pipe a message through sa-learn
, that will fail and generate an empty "message". sa-learn isn't a
pipe it does not echo the message back out to stdout.
However, running things like this should be safe for "somefile":
sa-learn /path/somefile
However this is not, and will destroy somefile:
echo somefile | sa-learn somefile
No.3 | | 1243 bytes |
| 
Friday 02 February 2007 13:26, Theo Van Dinter wrote:
Fri, Feb 02, 2007 at 12:37:55PM -0500, Gene Heskett wrote:
>I have ceased running sa-learn on false positives for the last
>couple of months because it nulls the message since I installed FC6.
>Is there a way to preserve the message in the case of teaching it ham,
>that it made a mistake?
>
>It sounds like you're calling sa-learn as a filter, which it isn't. The
>script doesn't modify/delete the files you pass to it, but "cat message
| sa-learn" won't produce the message as output.
I don't think that's whats happening. The command is being issued in
shell script format, and looks like this in the kmail filters screen:
sa-learn -L $HME/Mail/ham/cur, But you may be right, the
command to do it wasn't 'execute', but 'pipe through'. I'll change them
both. I have NDI when that changed though, I recall I was using the pipe
through with FC2, and that didn't null the messages ever.
I'll post again if this doesn't fix it, but I suspect you are 150% right
at this point. Many Thanks for the wake-up call.
No.4 | | 1742 bytes |
| 
Friday 02 February 2007 23:13, Gene Heskett wrote:
Friday 02 February 2007 13:26, Theo Van Dinter wrote:
>Fri, Feb 02, 2007 at 12:37:55PM -0500, Gene Heskett wrote:
I have ceased running sa-learn on false positives for the last
couple of months because it nulls the message since I installed FC6.
Is there a way to preserve the message in the case of teaching it
ham, that it made a mistake?
>>
>>It sounds like you're calling sa-learn as a filter, which it isn't.
>The script doesn't modify/delete the files you pass to it, but "cat
>message
>>
>| sa-learn" won't produce the message as output.
>
>I don't think that's whats happening. The command is being issued in
>shell script format, and looks like this in the kmail filters screen:
>sa-learn -L $HME/Mail/ham/cur, But you may be right, the
>command to do it wasn't 'execute', but 'pipe through'. I'll change them
>both. I have NDI when that changed though, I recall I was using the
pipe through with FC2, and that didn't null the messages ever.
>
>I'll post again if this doesn't fix it, but I suspect you are 150% right
>at this point. Many Thanks for the wake-up call.
PPS:
That did fix it, but the command itself needed to be changed I guess,
kmail wouldn't save it, and cleared the rule when I tried to save it, so
I consulted the manpage and recomposed the cli command, and that then
seemed to have worked correctly.
No.5 | | 1656 bytes |
| 
Friday 02 February 2007 22:28, Matt Kettler wrote:
>Gene Heskett wrote:
>Greetings;
>>
>SA 3.1.7, driven by procmail, feeding it all on to kmail for sorting.
>>
>I have ceased running sa-learn on false positives for the last
>couple of months because it nulls the message since I installed FC6.
>Is there a way to preserve the message in the case of teaching it ham,
>that it made a mistake?
>
>Erm, can you be really specific on how you're calling sa-learn ?
>
>It's not supposed to modify the message file in any way if it is,
>somethings wrong
>
>Now, if you've got something trying to pipe a message through sa-learn
>, that will fail and generate an empty "message". sa-learn isn't a
>pipe it does not echo the message back out to stdout.
>
>However, running things like this should be safe for "somefile":
>
>sa-learn /path/somefile
>
>
>However this is not, and will destroy somefile:
>
>echo somefile | sa-learn somefile
Actually, the correct syntax appears to be:
sa-learn (or ) -L -f /pathto/Mail/spam)|ham/cur.
At least the old behaviour is restored in that you highlight them all,
then pull down messages to the filter rule and apply it, the highlighting
is canceled as it scans each message, leaving only the last one so
marked. I assume at this point about 40 assorted messages that had been
building up have now been installed in the database.
No.6 | | 2510 bytes |
| 
Gene Heskett wrote:
Friday 02 February 2007 22:28, Matt Kettler wrote:
>Gene Heskett wrote:
>
Greetings;
SA 3.1.7, driven by procmail, feeding it all on to kmail for sorting.
I have ceased running sa-learn on false positives for the last
couple of months because it nulls the message since I installed FC6.
Is there a way to preserve the message in the case of teaching it ham,
that it made a mistake?
>Erm, can you be really specific on how you're calling sa-learn ?
>>
>It's not supposed to modify the message file in any way if it is,
>somethings wrong
>>
>Now, if you've got something trying to pipe a message through sa-learn
>, that will fail and generate an empty "message". sa-learn isn't a
>pipe it does not echo the message back out to stdout.
>>
>However, running things like this should be safe for "somefile":
>>
>sa-learn /path/somefile
>>
>>
>However this is not, and will destroy somefile:
>>
>echo somefile | sa-learn somefile
>
>
Actually, the correct syntax appears to be:
sa-learn (or ) -L -f /pathto/Mail/spam)|ham/cur.
1) -L is, at the moment, pointless. It does nothing. You can leave it
in, but in future versions this could reduce learning accuracy. Should
they ever add DNS or other network-dependent tokens to bayes, the -L
switch would suppress learning them. (This would be the only way -L
could matter). In general, I would say it's inadvisable to pass -L to
sa-learn, unless you always scan mail in -L mode. (no point in learning
network-test tokens when you're never going to scan for them)
2) you D NT want to do -f, unless you've got a file containing a LIST
of files to be learned. If you want to learn a MESSAGE, drop the -f.
At least the old behaviour is restored in that you highlight them all,
then pull down messages to the filter rule and apply it, the highlighting
is canceled as it scans each message, leaving only the last one so
marked. I assume at this point about 40 assorted messages that had been
building up have now been installed in the database.
--
No.7 | | 3529 bytes |
| 
Saturday 03 February 2007 09:49, Matt Kettler wrote:
>Gene Heskett wrote:
>Friday 02 February 2007 22:28, Matt Kettler wrote:
Gene Heskett wrote:
Greetings;
SA 3.1.7, driven by procmail, feeding it all on to kmail for
sorting.
I have ceased running sa-learn on false positives for the last
couple of months because it nulls the message since I installed FC6.
Is there a way to preserve the message in the case of teaching it
ham, that it made a mistake?
Erm, can you be really specific on how you're calling sa-learn ?
It's not supposed to modify the message file in any way if it is,
somethings wrong
Now, if you've got something trying to pipe a message through
sa-learn , that will fail and generate an empty "message".
sa-learn isn't a pipe it does not echo the message back out to
stdout.
However, running things like this should be safe for "somefile":
sa-learn /path/somefile
However this is not, and will destroy somefile:
echo somefile | sa-learn somefile
>>
>Actually, the correct syntax appears to be:
>sa-learn (or ) -L -f /pathto/Mail/spam)|ham/cur.
>
>1) -L is, at the moment, pointless. It does nothing. You can leave it
>in, but in future versions this could reduce learning accuracy. Should
>they ever add DNS or other network-dependent tokens to bayes, the -L
>switch would suppress learning them. (This would be the only way -L
>could matter). In general, I would say it's inadvisable to pass -L to
>sa-learn, unless you always scan mail in -L mode. (no point in learning
>network-test tokens when you're never going to scan for them)
, thats not a problem to drop.
>2) you D NT want to do -f, unless you've got a file containing a LIST
>of files to be learned. If you want to learn a MESSAGE, drop the -f.
The target is a directory containing messages I've drag & dropped there
with kmail because of an SA miss-fire.
Those ham & spam directories are empty ATM, their contents having been fed
at sa-learn with the syntax you saw, and moved or deleted accordingly.
The directory if populated, would look like this:
[root@coyote cur]# pwd
/root/Mail/localmail/cur
[root@coyote cur]# ls
1156252320.3816.3sJYv:2,S 1166259743.6380.Xfrzr:2,S
1167814934.5956.NpYWX:2,S 1169197383.6500.ARf:2,S
1156252320.3816.i9Jik:2,S 1166346132.7075.tIRbE:2,S
1167901361.5970.Qb4bW:2,S 1169284081.6500.iFQhT:2,S
1165222982.28069.1Fh74:2,S 1166432530.8102.dKH5Q:2,S
1167987756.19938.64eYI:2,S K:2,S
yadda yadda
The way I read the -f option, I am to supply the path to the directory as
the source of the files sa-learn is to process. I'll drop the -f, but I
suspect I'll have to put it back since /root/Mail/folder_name/cur is a
directory. should I use /root/Mail/folder_name/cur/* instead?
>At least the old behaviour is restored in that you highlight them all,
>then pull down messages to the filter rule and apply it, the
>highlighting is canceled as it scans each message, leaving only the
>last one so marked. I assume at this point about 40 assorted messages
>that had been building up have now been installed in the database.
No.8 | | 2887 bytes |
| 
Gene Heskett wrote:
Saturday 03 February 2007 09:49, Matt Kettler wrote:
>Gene Heskett wrote:
>
Friday 02 February 2007 22:28, Matt Kettler wrote:
Gene Heskett wrote:
Greetings;
SA 3.1.7, driven by procmail, feeding it all on to kmail for
sorting.
I have ceased running sa-learn on false positives for the last
couple of months because it nulls the message since I installed FC6.
Is there a way to preserve the message in the case of teaching it
ham, that it made a mistake?
Erm, can you be really specific on how you're calling sa-learn ?
It's not supposed to modify the message file in any way if it is,
somethings wrong
Now, if you've got something trying to pipe a message through
sa-learn , that will fail and generate an empty "message".
sa-learn isn't a pipe it does not echo the message back out to
stdout.
However, running things like this should be safe for "somefile":
sa-learn /path/somefile
However this is not, and will destroy somefile:
echo somefile | sa-learn somefile
Actually, the correct syntax appears to be:
sa-learn (or ) -L -f /pathto/Mail/spam)|ham/cur.
>1) -L is, at the moment, pointless. It does nothing. You can leave it
>in, but in future versions this could reduce learning accuracy. Should
>they ever add DNS or other network-dependent tokens to bayes, the -L
>switch would suppress learning them. (This would be the only way -L
>could matter). In general, I would say it's inadvisable to pass -L to
>sa-learn, unless you always scan mail in -L mode. (no point in learning
>network-test tokens when you're never going to scan for them)
>
>
, thats not a problem to drop.
>2) you D NT want to do -f, unless you've got a file containing a LIST
>of files to be learned. If you want to learn a MESSAGE, drop the -f.
>
>
The target is a directory containing messages I've drag & dropped there
with kmail because of an SA miss-fire.
Then do NT use -f.
Like I said, -f expects a FILE containing a LIST F FILES. It does not
expect a directory. It does not expect an email.
If you feed sa-learn a directory name, without the -f, it will
automatically read all the files in the directory as individual emails.
ie, this command works:
sa-learn /home/training/spam/
Assuming /home/training/spam/ is a directory containing emails.
sa-learn -f /home/training/spam/
Will probably try to treat it as a directory full of files each
containing lists of files. That's not what you have. You have a
directory of emails.
No.9 | | 1292 bytes |
| 
Saturday 03 February 2007 15:17, Matt Kettler wrote:
>Gene Heskett wrote:
[]
>The target is a directory containing messages I've drag & dropped
>there with kmail because of an SA miss-fire.
>
>Then do NT use -f.
>
>Like I said, -f expects a FILE containing a LIST F FILES. It does not
>expect a directory. It does not expect an email.
>
>If you feed sa-learn a directory name, without the -f, it will
>automatically read all the files in the directory as individual emails.
>
>ie, this command works:
>
>sa-learn /home/training/spam/
>
>Assuming /home/training/spam/ is a directory containing emails.
>
>sa-learn -f /home/training/spam/
>
>Will probably try to treat it as a directory full of files each
>containing lists of files. That's not what you have. You have a
>directory of emails.
, I've taken out the -f, and appended a /* to the path, and I've got a
couple of messages in there now. Humm, no, just one, and it appears that
either syntax works, it looked at that file the first time and skipped it
the second time.
Thanks for the clarification.