Bug 4190

Summary: bsfilter error
Product: Claws Mail (GTK 2) Reporter: MNatiello <mario.natiello>
Component: PluginsAssignee: users
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 3.17.3   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
output of running bsfilter from terminal none

Description MNatiello 2019-03-27 11:24:25 UTC
I have loaded bsfilter asking it to learn and move spam to Trash.
The moving part works well. However the learning part returns an error:
*** Learning failed; `bsfilter --imap --insert-flag --insert-probability --homedir '/MYDIR/.claws-mail' -su '/MYDIR/.claws-mail/imapcache/MYACCOUNT/INBOX/29146'` returned with status 1.

Is this a bug or is it my mistake?
Thanks
Comment 1 Andrej Kacian 2019-04-02 10:10:19 UTC
If you run that bsfilter command yourself in a terminal, does it also fail? If so, try adding -v or -d options to it to increase verbosity, and it should tell you what is going on.
Comment 2 MNatiello 2019-04-02 12:48:36 UTC
Created attachment 1970 [details]
output of running bsfilter from terminal
Comment 3 MNatiello 2019-04-02 13:02:34 UTC
Thank you for answering.
Bsfilter behaves differently now, without my intervention.
If I run
bsfilter --insert-flag --insert-probability --homedir '/MYDIR/.claws-mail' -v -d -su '/MYDIR/.claws-mail/imapcache/MYSERVER/MYACCOUNT/INBOX/29328'
it does not finish with error. The output is in the attached file.
Running the plug-in on claws-mail with: 
bsfilter -v -d --insert-flag --insert-probability
(it figures out the other stuff automatically, I hope)
it does not give error and it moves the mail to Trash as expected.

However, the --insert-probability and --insert-flag options do nothing. Both on a terminal and on the plug-in. The mail did not get an X-Spam-Probability line at all, the same with X-Spam-Flag.
I think this is an improper behaviour, so I wonder if it is working correctly.

Another strange thing is that the filter never marks something as spam "spontaneously". Despite having used it for a week or so,  it never detects spam. I don't know if it is too soon, but it has
seen a few hundred mails so far.