Re: sort-mailbox by spam tag score sorting strangeness
On Mon, Nov 13, 2006 at 11:54:07PM -0700, Bob Proulx wrote:
> I have the following set:
>
> spam "X-Spam-Status: (Yes|No), score=(-?[[:digit:]]+\.[[:digit:]]+)" "%2"
> set sort=spam
> set index_format="%4C %Z %{%b%d} %4H %-15.15F %4c %s"
>
> This is to parse spamassassin headers such as this:
>
> X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_40,UNPARSEABLE_RELAY
> autolearn=ham version=3.1.3
>
> This seems to get confused about the sign of the spam score.
> Sometimes it seems to get it right. And sometimes it does not.
> Here is an example, with the names and subjects blacked out to protect
> the innocent.
>
> 69 Nov13 0.1 XXXXXXXX 2.6K XXXXX
> 70 Nov10 0.2 XXXXXXXX 2.5K XXXXX
> 71 Nov10 -0.2 XXXXXXXX 2.5K XXXXX
> 72 Nov10 -0.2 XXXXXXXX 0.4K XXXXX
> 73 Nov11 -0.2 XXXXXXXX 0.7K XXXXX
> 74 Nov13 -0.2 XXXXXXXX 7.0K XXXXX
> 75 Nov13 -0.2 XXXXXXXX 6.7K XXXXX
> 76 Nov10 0.5 XXXXXXXX 3.7K XXXXX
> 77 Nov10 0.5 XXXXXXXX 4.3K XXXXX
> 78 Nov14 0.5 XXXXXXXX 3.4K XXXXX
> 79 Nov11 -0.6 XXXXXXXX 1.1K XXXXX
> 80 Nov11 -0.6 XXXXXXXX 1.0K XXXXX
> 81 Nov10 -0.7 XXXXXXXX 0.8K XXXXX
> 82 Nov10 -0.7 XXXXXXXX 1.3K XXXXX
> 83 Nov13 -0.7 XXXXXXXX 2.1K XXXXX
> 84 Nov14 -0.7 XXXXXXXX 0.9K XXXXX
> 85 Nov09 -0.8 XXXXXXXX 1.0K XXXXX
> 86 Nov11 0.8 XXXXXXXX 0.3K XXXXX
> 87 Nov11 0.9 XXXXXXXX 0.9K XXXXX
> 88 Nov11 1.0 XXXXXXXX 2.9K XXXXX
> 89 Nov09 1.1 XXXXXXXX 90K XXXXX
>
> Negative values less than -1 all seem to sort okay. It seems to be
> only the absolute values <1 that cause issues. Why is it sorting this
> so strangely? Why does it appear to be taking the absolute value of
> the score but only if the score is between -1..1 but is okay outside
> that range? This is mutt 1.5.9-2sarge2 from Debian Sarge stable.
It seems to be ignoring the minus sign. Has it worked by listing, say,
-0.5 being less than 0.2 for example?
--
Chris.
======
" ... the official version cannot be abandoned because the implication of
rejecting it is far too disturbing: that we are subject to a government
conspiracy of `X-Files' proportions and insidiousness."
Letter to the LA Times Magazine, September 18, 2005.