On Wednesday 24 September 97, at 10 h 15, the keyboard of
process(_at_)qz(_dot_)little-neck(_dot_)ny(_dot_)us (Eli the Bearded) wrote:
# Right: $SCORE will be set for all scores
:0
* 1^1 foo
* -2^1 bar
{ }
SCORE = $=
Unfortunately, it doesn't seem to work. SCORE assigned after the recipe
is always zero (SCORE assigned between the {}, when the score was
positive, is correct, thanks).
Here is the (simplistic for the moment) recipe:
:0
# Start with a negative value. All mail will be considered as
# "non spam" at the beginning.
* -250^0
# Words (or letters such as !) frequently found in spam have a high score
* 200^0 ^Subject:.*\!\!\!
* 100^1 ^Subject:.*\<free|sex|opportunity|money|great\>
* 100^0 ^From:.*\.com\>
* 100^0 ^Subject:.*\$
# And a negative one for replies (spams seem never to have Re:)
* -250^0 ^Subject: *Re:
* -250^0 ^Subject: *Fwd:
{
SCORE=$=
# The following works fine, thanks for the people who helped
:0f
| formail -i "X-Filtered-Spam: semantic ($SCORE)"
:0
| /usr/lib/mh/rcvstore +L/Antispam/Spams/Auto
}
SCORE=$=
# The following doesn't work, score is always nil
:0f
| formail -i "X-Not-Filtered-Spam: semantic ($SCORE)"