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.