procmail
[Top] [All Lists]

$=, last score, behaviour (Procmail 3.22_5 on FreeBSD 5.3)

2005-07-01 23:39:18
Hi People,

I have the following recipe to weed out Subjects: w/ very low number
of [a-z] characters ...

  #  Contains a space and a tab.
  WS = "        "

  #  Contains "one or more of neither a space nor a tab".
  WS_not_one = "[^      ]+"

  #  Contains "zero or more any of a space & a tab".
  WS_zero="[    ]*"

  #  Extract subject
  :0
  * $ ^Subject:${WS_zero}\/${WS_not_one}.*
  {
    subj = "$MATCH"
  }

  #  Part 1
  :0 D
  *   -10^0
  *  $  1^1  subj  ??  ()[^a-zA-Z${WS}]
  *  $  1^1  subj  ??  ()([a-z][^a-z${WS}]|${WS_not_one}[^a-z${WS}][a-z])
  {
    #  $NL contains a new line character.
    LOG = " score: $=$NL"

    #  Part 2
    :0 D
    *  $=
    *  -1^1  subj  ??  ()[a-z]
    /dev/null

    #  Part 3
    :0 D
    *     $=
    *     2^1  subj  ??  ()[A-Z][^a-z]
    *  $  1^2  subj  ??  ()[${WS}][${WS}][${WS}]
    /dev/null
  }
  VERBOSE = off


Below is the log for one of the messages ...

  procmail: Score:     -10     -10 ""
  procmail: Score:      55      45 "()[^a-zA-Z  ]"
  procmail: Score:       0      45 "()([a-z][^a-z       ]|[^    ]+[^a-z         
][a-z])"
  procmail: Assigning "LOG= score: 45
  "
  score: 45
  procmail: Match on "="
  procmail: Score:       0       0 "()[a-z]"
  procmail: Match on "="
  procmail: Score:       0       0 "()[A-Z][^a-z]"
  procmail: Score:       0       0 "()[         ][      ][      ]"
  procmail: Assigning "VERBOSE=off"
  procmail: Match on "()[.0-9]+::(spam|yes|\+)"
  procmail: No match on "()^(1|0\.9[89])"
  procmail: Match on "()^0\.[89][0-9]+"
  procmail: Locking "Ignore/xx.spam-very.bz2.lock"
  procmail: Executing " bzip2 -9 >> Ignore/xx.spam-very.bz2"
  procmail: Assigning "LASTFOLDER= bzip2 -9 >> Ignore/xx.spam-very.bz2"
  procmail: Unlocking "Ignore/xx.spam-very.bz2.lock"
  From vmfygj(_at_)yahoo(_dot_)com  Fri Jul  1 18:44:03 2005
  Subject:  ¢ºÁ¦1ȸ "¾à¿ë½Ä¹°°ü¸®»ç "ÀÚ°ÝÁõ ½ÃÇè°ü·Ã ¹«·áÀÚ·á µå¸³´Ï´Ù!!
    Folder:  bzip2 -9 >> Ignore/xx.spam-very.bz2                                
   4269


My problem lately has been that "$=" is assigned 0 -- in 2d & 3d parts
-- instead of the score of the last matched recipe. Or, it seems to me
that procmail is parsing all "* $=" lines as if i had written "* $ =",
so tries to match a "=" (in the headers)  & fails.

Am i doing something wrong?  I am using procmail 3.22_5 built from
FreeBSD ports on Dec 22, 2004.


  - Parv

--


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail