process(_at_)qz(_dot_)little-neck(_dot_)ny(_dot_)us wrote,
| This procmailrc:
|       VERBOSE=yes
| 
|       :0
|       * $ `$HOME/jmdigest -`^0
|       * -3^0
|       { }
| 
|       :0
|       { score=$= 
|         :0fw
|         | formail -I"JM-Score: $score"
|       }
| 
| Gives me this log fragment:
|       procmail: Executing "/u1/home/eli/jmdigest,-"
|       procmail: [15207] Wed Jul 16 15:31:33 1997
|       procmail: Score:      -3      -3 ""
|       procmail: Score:      -3      -6 ""
|       procmail: Assigning "score=0"
|       procmail: Executing "formail,-IJM-Score: 0"
| 
| Why is $score 0 and not -6?
Because where you called $=, the most recent recipe had been this:
 :0
 {
which had no weights and therefore scored 0.  Try this instead:
        :0
        * $ `$HOME/jmdigest -`^0
        * -3^0
        { }
  
        score=$= 
        :0fw
        | formail -I"JM-Score: $score"
Since the formail command line contains no characters from $SHELLMETAS,
the following might work as well, but I haven't tried it:
        :0
        * $ `$HOME/jmdigest -`^0
        * -3^0
        { }
  
        :0fw
        | formail -I"JM-Score: $="
Note that that will definitely NOT work if a shell runs it, because then
the shell, not procmail, will expand "$=" (and in most shells, that is a
syntax error).