procmail
[Top] [All Lists]

Re: Scoring msg size riddle

2017-05-23 12:43:29
Andreas,

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.

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 dattier(_at_)gmail(_dot_)com, or reply on 
list.)
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)rwth-aachen(_dot_)de
https://mailman.rwth-aachen.de/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>