You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Sven Riedel <sr...@baghus.net> on 2005/08/03 08:18:16 UTC

Question regarding meta rule handling

Hi,

a while back someone kindly posted a rule here that matches on 
empty mails:

header __X Content-Type =~ /^(message|multipart)/i
rawbody __Y /\S/
meta Z ( !X && !Y )

Now I find that Z matches on all mails - investigation shows
that Y matches on all non-whitespaces as it should, and X 
doesn't match. So I would assume that 

( !0 && !1 ) = ( 1 && 0 ) = 0

and yet the rule triggers for me. Doing a

spamassassin -t -D < testmessage

doesn't show anything of use to me why this rule triggers. 
Any ideas?

Oh, and then I tried to disable the rule by assigning as score 
of 0 (the wiki page on writing rules states that rules with a 
score of 0 aren't processed). And yet this rule keep on
turning up in my X-Spam-Status header. I'm a bit puzzled at this
point.

Regs,
Sven



------------------------------------------------------

BAGHUS GmbH                             
EDV und Internetdienstleistungen

Staffelseestr. 2
81477 München

Tel.: 0 89 / 8 71 81 - 4 84
Fax.: 0 89 / 8 71 81 - 4 88

www.baghus.net, info@baghus.net
HRB: 144283, USt-IdNr: DE224865405

Junkmail Catcher, do not use: sr@kunj.ecb-computer.de

------------------------------------------------------
 

Re: Question regarding meta rule handling

Posted by Matt Kettler <mk...@evi-inc.com>.
Sven Riedel wrote:
> Hi,
> 
> a while back someone kindly posted a rule here that matches on 
> empty mails:
> 
> header __X Content-Type =~ /^(message|multipart)/i
> rawbody __Y /\S/
> meta Z ( !X && !Y )
> 
> Now I find that Z matches on all mails - investigation shows
> that Y matches on all non-whitespaces as it should, and X 
> doesn't match. 

Hmm, your problem is a bit of a mystery to me.

1) have you run spamassassin --lint? minor typos in the file sometimes cause odd
behavior, although this would be very odd.

2) Have you tried running a message through spamassassin -tD rulesrun=255?

This should get you some very detailed debug, such as this:

debug: Ran body_pattern_hit rule __Y ======> got hit: match='H'


I used the corrected trio and they work fine for me on SA 2.64:

header __X Content-Type =~ /^(message|multipart)/i
rawbody __Y /\S/
meta Z ( !__X && !__Y )


Although I might rewrite __X to turn off backtracking for efficiency sake, I
tested with the rule as-is. Other than the previously mentioned fix of using __X
and __Y.







Re: Question regarding meta rule handling

Posted by Theo Van Dinter <fe...@apache.org>.
On Wed, Aug 03, 2005 at 08:18:16AM +0200, Sven Riedel wrote:
> header __X Content-Type =~ /^(message|multipart)/i
> rawbody __Y /\S/
> meta Z ( !X && !Y )
> 
> and yet the rule triggers for me. Doing a

Of course.  __X != X ... :)

-- 
Randomly Generated Tagline:
"The question is to what extent parasites like Microsoft should be parasites
 off the public system, or should be granted any rights at all."
                                                       - Noam Chomsky