Bug 2280 - trying to filter out a header fails when the header not there
Summary: trying to filter out a header fails when the header not there
Status: NEW
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Filtering (show other bugs)
Version: 3.7.7
Hardware: PC Linux
: P3 enhancement
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2010-10-06 22:06 UTC by Daniel Mota Leite
Modified: 2010-10-20 06:43 UTC (History)
0 users

See Also:


Attachments

Description Daniel Mota Leite 2010-10-06 22:06:13 UTC
Hi

i'm trying to do a advance filter for spam, like this:

enabled rulename "" header "X-SpamBayes-Classification" regexpcase "unsure; 0.[6-9]" & ~header "X-Spambayes-Trained" matchcase "ham" & ~header "X-Spambayes-Trained" matchcase "spam" move "#mh/Mailbox/Extras/Spam/z-high"
enabled rulename "" header "X-SpamBayes-Classification" regexpcase "unsure; 0.[4-6]" & ~header "X-Spambayes-Trained" matchcase "ham" & ~header "X-Spambayes-Trained" matchcase "spam" move "#mh/Mailbox/Extras/Spam//z-med"
enabled rulename "" header "X-SpamBayes-Classification" regexpcase "unsure; 0.[2-3]" & ~header "X-Spambayes-Trained" matchcase "ham" & ~header "X-Spambayes-Trained" matchcase "spam" move "#mh/Mailbox/Extras/Spam/z-low"

That is, filter by spam score, but only if it's not a trained message...

this rules work fine on trained messages, but on all other messages, the header X-Spambayes-Trained is not there, so this rule fails... when it should apply...

if the header in not there, the test for a 'header "X-Spambayes-Trained" matchcase "ham"' would fail, so negate that and you have that the rule applies

if that doesnt change, there is any way to test the lack of a header

Note You need to log in before you can comment on or make changes to this bug.