procmail
[Top] [All Lists]

Re: ((2^31) -1) scored condition(s) followed by some AND's -- don't work "as expected"

2002-10-14 22:20:14
in message <001601c27338$06fb71e0$21985742(_at_)ord351473>,
wrote David W. Tamkin thusly...

|   Digital_A="\<d(slr|igi(tal)?)"

You'd get the same results with

   Digital_A="\<d(sir|igi)"

i was using the above pattern along w/ another until i got tired of
writing "(A.*B) | (B.*A)".  so i converted them to "A & B" (procmail
style, of course); (i) didn't bother to update the regex.


|   Digital_B="\<(rant|format|slr|camera|article|minolta|maxxum)"
|   Digital_C="\<(dimage|7[- ]?hi|f[oa]veon|vectis|silicone? film)"
|
|   :0:
|   *   9876543210^0  subj  ??  ()(\<ot\>|off topic|scanner|scan.+elite)

I'm going to assume that you assigned a value to $subj somewhere earlier in
your rcfile.

oops, sorry.  i forgot to mention that, which you guessed correctly.


|   * $ 9876543210^0  B  ??  ()$Digital_C
|   * $               B  ??  ()$Digital_A
|   * $               B  ??  ()$Digital_B
|   In/i.minolta-junk
|
|     :0 E:
|     In/i.minolta

| ..i was expecting procmail to stop at the 2d condition & deliver
| the message to "i.minolta-junk".  instead, the 3d condition
| (unexpected) is also checked
...
When the score reaches supremum, all remaining WEIGHTED conditions are
skipped.  Unweighted conditions are still tested and must pass.

so that's what i was missing!

thank you very much, david.


   :0:
   *   9876543210^0  subj  ??  ()(\<ot\>|off topic|scanner|scan.+elite)
   * $ 9876543210^0  B  ??  ()$Digital_C
   * -1^0
   * $ 1^0           B  ??  ()$Digital_A
   * $ 1^0           B  ??  ()$Digital_B
   In/i.minolta-junk

oh, yes, that's what i should have done.

(and i smack my forehead.)


     :0 E:
     In/i.minolta
...
Technically you should be able to bail without bothering to look
for $Digital_B if the first two conditions and the test for
$Digital_A all fail, so you might prefer this:

   :0:
   *   9876543210^0  subj  ??  ()(\<ot\>|off topic|scanner|scan.+elite)
   * $ 9876543210^0  B  ??  ()$Digital_C
   * $ -9876543210^0 ! B  ??  ()$Digital_A
   * $ 1^0           B  ??  ()$Digital_B
   In/i.minolta-junk

     :0 E:
     In/i.minolta

that's just swell!  you da man!

:)


concept of -ve infinity hasn't gained any ground in my brain; i am
working on that.  one recipe, one stupid question at a time.


  - parv

-- 

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