Discussion:
Scoring msg size riddle
Andreas Schamanek
2017-05-17 17:41:01 UTC
Permalink
Hi everyone,

Could someone enlighten me as to why

:0
* 100^2 > 2000
{ LOG="> 2000 score = $= $NL" }

gives a score of 17 for a message of 830 bytes,
and 124 for a message of 2233 (sizes according to LOGABSTRACT).

I wonder if I misunderstood something essential or whether there's a
bug in the code (where I haven't looked yet) or its documentation.
--
-- Andreas

:-)
David W. Tamkin
2017-05-23 17:35:31 UTC
Permalink
Andreas,
Post by Andreas Schamanek
Could someone enlighten me as to why
:0
* 100^2 > 2000
{ LOG="> 2000 score = $= $NL" }
gives a score of 17 for a message of 830 bytes,
and 124 for a message of 2233 (sizes according to LOGABSTRACT).
That's correct. See the procmailsc(5) manual page. A weighted
greater-than condition scores W×(M/L)^X. {A weighted less-than condition
scores W×(L/M)^X.] You hve W=100, X=2, L=2000, and greater-than. So when
M=830, 100×(830/2000)^2 = 17.2225; when M=2233, 100×(2233/2000)^2 =
124.657225. The $= variable rounds down to the whole integer.
Post by Andreas Schamanek
I wonder if I misunderstood something essential or whether there's a
bug in the code (where I haven't looked yet) or its documentation.
The code is working as promised.

Now, the real question: what were you expecting? What results were you
trying to get?

(Please send any off-list replies to ***@gmail.com, or reply on list.)
Loading...