procmail
[Top] [All Lists]

^^3^^

2002-10-28 12:15:55
Well, here's one that has me stumped.  I have a certain scored recipe. 
Anyway, the score should be 3 if things are kosher.  If they're not 
kosher, I identify the mail as spam.  It's a highly effective indicator:

58 of my most recent 100 spam messages were ID'd by this recipe.  But 
there is a funny problem with the part that looks at the total score.

The recipe is completely straightforward:

  :0
  * 1^1  ^something
  * 1^1  ^something else
  * 1^1  ^yet another something
  {
        part under discussion goes here
  }


What works fine in the nested braces is this:

     :0  # 021027 () score should equal three
      * $ ? test $= -ne 3
      { RX = "${RX:+$RX, }UBE.OH.BLEM-MUA" }


However, I saw no real need to fork a shell to run /bin/test here.
So I had it written as follows for a while:

     :0  # 021026 () score should equal three
      * $ ! $= ?? ^^3^^
      { RX = "${RX:+$RX, }UBE.OH.BLEM-MUA" }


Okay, now to the part that stumps me.  The above
works -- *most* of the time.  Here's an example
from verbose logs when it doesn't work, though the
score looks right.  (The mail generating this log
is not spam, and should not be identified as such
by this recipe.  The total should equal three.)

 procmail: Score:       1       1 "^something"
 procmail: Score:       1       2 "^something else"
 procmail: Score:       1       3 "^yet another something"
 procmail: Match on ! "3 ?? ^^3^^"
 procmail: Assigning "RX=UBE.OH.BLEM-MUA"

That is an actual log copied and pasted, though I munged the
strings at the far right.  What they are, exactly, seems
unimportant to what's going on with the action.  The score is
right.  Procmail seems to be saying that 3 != 3.  Hmm.

As I said, replacing the nested condition with the test one
leads to the proper result.  What's up, doc?

Oh: procmail 3.22 under NetBSD 1.5.4_ALPHA.  A well-tested compile
of procmail in most all respects.

dman

-- 
Dallman Ross

"If you find a path with no obstacles, it probably does not lead to
anywhere."
        Thoughts of Rev. Sunnan Kubose, from _Zen in the Markets_ 


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>