is it possible for Pine/Alpine to sort messages in a folder based
on an arbitrary header? I'd like to use the `X-Spam-Level'
header generated by SpamAssassin to sort the messages of my spam
folder according to their spaminess and scan the folder for false
positives.
I used to let SpamAssassin insert its score in front of the
subject, but the lexical ordering doesn't agree with the ordering
that I want to achieve, as a subject starting with `15 ...' is in
that sense lower than a subject starting with `5 ...'.
Franz
:) is it possible for Pine/Alpine to sort messages in a folder based on an
:) arbitrary header?
No, Pine/Alpine sorts based on sorting methods defined for the IMAP
protocol. There is no sorting method for other headers, like "X-Whatever".
What I would do is to use scores that have the same length, for example
compare score 0015 and 0005, instead of 15 and 5. Can you set it up to do
that or something similar?
--
Eduardo
Patches/Help: http://www.math.washington.edu/~chappa/pine/
XML/RSS feed: http://www.math.washington.edu/~chappa/pine/pine.xml
Please send spam to webmaster@localhost
> *** Franz Häuslschmid (balu...@gmx.at.comm) wrote in comp.mail.pine today:
>
> :) is it possible for Pine/Alpine to sort messages in a folder based on an
> :) arbitrary header?
>
> No, Pine/Alpine sorts based on sorting methods defined for the IMAP
> protocol. There is no sorting method for other headers, like "X-Whatever".
> What I would do is to use scores that have the same length, for example
> compare score 0015 and 0005, instead of 15 and 5. Can you set it up to do
> that or something similar?
Yes, I can. I configure SpamAssassin to use the template tag
`_SCORE(PAD)_' which makes the score to be padded with the number
of spaces or zeros that I specify in the configuration.
The configuration file now includes the line
rewrite_header subject {* _SCORE( )_ *}
which fairly achieves what I wanted to have: If the score is
monadic, it padded with a leading blank.
Franz.
I had rejoiced too soon. Padding with leading *zeros* works as I
expected. Leading blanks however will produce something like the
following message index (subject is in ascending order):
--8<---------------cut here---------------start------------->8---
PINE 4.64 MESSAGE INDEX <Mail> spam-test Msg 4 of 4 NEW
N 1 Sep 18 Archie Saenz (6254) {* 10.0 *} Getting thinner can be enj
N 2 12:51pm Fifth Third Bank (19K) {* 20.3 *} Fifth Third Bank - urgent
N 3 9:22am Lisa Stover (2984) {* 3.5 *} Lisa
+ N 4 Jan 2007! Malisa (22K) {* 7.6 *} Still happy with it all
--8<---------------cut here---------------end--------------->8---
Isn't space lower than any digit in the lexicographical order?
Franz