Hi Jerry,
You could do it with a short script. Feed the script a list of
message numbers and X-Spam-Status header fields with this:
scan -format '%(msg) %{x-spam-status}'
The output of that will look like this:
1 No, hits=-31.6
2 Yes, hits=23.2
3 No, hits=1.3
...
Some fix-up might be needed if there's no x-spam-status header.
Parse out the info you want, then sort, then reorder the messages. I
haven't written code to reorder messages, but one easy way I can think
of is to first rename all the messages starting with two commas (,,)
or hash marks (##) -- sort of like "rmm" does, but with two of the
characters so there won't be conflicts with any "removed" messages in
the folder. Then give the messages their new names. That idea must
have gotchas... one is that if you interrupt the sort, your messages
will all be gone. 8^} Maybe someone has a better idea...
Another way is to `refile @. $msg' repeatedly, which effectively moves
the message to the end of the folder, and then `folder -pack'. It has
the down-side of packing the folder but an abort part way through
shouldn't loose anything assuming refile is safe.
Another way is to anno(1) each message with a new field and then
sortm(1) on that. But that leaves the annotation in place and anno
doesn't have a -remove option.
Cheers,
Ralph.
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
http://lists.nongnu.org/mailman/listinfo/nmh-workers