The problem is that the spamcheck folder is a delivering recipe.
If the score is positive, the spam is logged/stored. If the score is <=0,
then the $= information is lost.
I don't want to use a carbon-copy rule and have procmail fork because of
performance. The procmail recipe is being called by sendmail as part of a
system-wide opt-in spam filter.
At this point, I'm mostly interested in keeping the scoring information
available as part of debugging and gathering statistics on mail that wasn't
caught by the scoring rules. I want to see how well I have the recipe
'balanced'.
For the moment, I hacked procmail to keep a copy of the score in a "$&"
variable.
On Fri, 19 Dec 1997, Philip Guenther wrote:
"Richard B. Ernst" <rbernst(_at_)wizard(_dot_)com> writes:
...
The procmail recipes are working exactly as expected, with the exception of
the "$=" variable.
<SNIP>
No matter what the score is, I always get: SPAM score was: 0
With VERBOSE=on, the log shows scores between -50 and 0.
It looks like $= is getting set back to 0 outside of the recipe.
The manpage, though, seems to at least imply that it will keep it's value
until the next recipe.
The nested the recipe _is_ the next recipe, that it's reset while processing
the recipe that delivers to "spamfolder". If you need it beyond then,
save it's value in another variable:
:0
* -50^0
* 1^1 condition1
* 1^2 condition2
{
LOG = "SPAM Score: $="
SCORE = $=
:0: spamcheck
spamfolder
}
<SNIP>