[TriLUG] Re: sort mutt folder by spamassassin score?

James Manning jmm at sublogic.com
Sun Dec 7 11:06:09 EST 2003


> so, I have SA send flagged stuff to a folder i try to check once every
> few days.  Because SA is pretty good, I'd like to sort the folder by
> SA score so I can quickly tell the ones that "barely crept over".

Thanks to all (Jason, Jon, etc) who responded.  The "right solution"
was something much more built-in to SpamAssassin than I expected:

rewrite_subject 1
subject_tag Spam: _HITS_

So, I fully expected this to not work because I knew mutt would be
doing lexicographical/alphabetical sorting on the subjects - no way
it'd be doing numerical.  I expected the above would give _HITS_
expanded to things like "7.6" and "13.4" and that'd fail to work
because the 13.4 would sort before the 7.6.  Note that X-Spam-Status
by default would *not* have the 0 filler, ala

    X-Spam-Status: Yes, hits=7.9

Lo and behold, SA once again proves it's amazing.

SA's _HITS_ expands to include a 0 fill! w00t!

    From: "Leta Avila" <l.avila_md at isralift.co.il>
    Subject: Spam: 07.94 get it up

now, thankfully, my SA target folder sorts perfectly on subject and is
a joy to work with.

Thanks everyone!

James
-- 
James Manning <http://www.sublogic.com/james/>
GPG Key fingerprint = B913 2FBD 14A9 CE18 B2B7  9C8E A0BF B026 EEBB F6E4



More information about the TriLUG mailing list