On Sat, Jan 17, 2004 at 09:02:17AM EST, Nikolai Prokoschenko wrote: > Hello! > > Is there any possibility to extract the SpamAssassin scores from an e-mail > and use them somewhere in index_format or pager_format? Well, you can replace Mutt's scoring with SA's scoring using a brute-force technique resembling my original *@bugs.guug.de list config (before Thomas Roessler's recent patch to enable regexps for lists, and before the almost-as-recent CVS feature (also by you-know-whom) to enable the particular case of @blah which is otherwise useless): unscore * score . 1000 score ~h the-custom-header-I-can't-remember-off-hand: -9.99 -999 score ~h the-custom-header-I-can't-remember-off-hand: -9.98 -998 score ~h the-custom-header-I-can't-remember-off-hand: -9.97 -997 ... score ~h the-custom-header-I-can't-remember-off-hand: -0.01 -1 score ~h the-custom-header-I-can't-remember-off-hand: 0.00 0 score ~h the-custom-header-I-can't-remember-off-hand: 0.01 1 score ~h the-custom-header-I-can't-remember-off-hand: 0.02 2 ... score ~h the-custom-header-I-can't-remember-off-hand: 9.99 999 The only problem is that the manual claims you can't use ~h in the index view, so you'll need to do something like this instead: Tell procmail to add "[SA_Score:4.32]" to the "X-Label:" header (with 4.32 replaced by the real SA score, of course), and then replace the score statements like this: score ~y [SA_Score:0.01] 1 etc. You may ask why I'd be so crazy to do this, but the advantage is that you then have all the cool little goodies of Mutt's scoring, with the scanning capabilities of SA. You can then sort by scores, autodelete or autoread by scores, etc. Personally, I think the best option available is to have procmail create an "X-Label:" header containing whatever info you want and have Mutt use an index_format approximating "%y" ... but even that has problems, due to lack of sorting ability. (Maybe the best thing would be to have a comparison_program, and use something like a quicksort (which wouldn't live up to its namesake with a multiK-message mailbox) to sort based on it. You could then macro keys to ":set comparison_program='822-which-came-first'; <resort>" or something like that.) - Dave -- Uncle Cosmo, why do they call this a word processor? It's simple, Skyler. You've seen what food processors do to food, right? Please visit this link: http://rotter.net/israel
Attachment:
pgpCaUgkykUwR.pgp
Description: PGP signature