Gnus development mailing list
 help / color / mirror / Atom feed
From: Wes Hardaker <wes@hardakers.net>
Subject: Re: sorting summary on spamassassin score
Date: Wed, 07 Apr 2004 12:05:37 -0700	[thread overview]
Message-ID: <sd4qrvsj5q.fsf@wes.hardakers.net> (raw)
In-Reply-To: <8765cbboma.fsf@uwo.ca> (Dan Christensen's message of "Wed, 07 Apr 2004 14:59:41 -0400")

>>>>> On Wed, 07 Apr 2004 14:59:41 -0400, Dan Christensen <jdc@uwo.ca> said:

Dan> Does anyone have code for sorting the summary buffer based on the
Dan> score given by spamassassin?  This score appears in a header,
Dan> which I guess I would add to gnus-extra-headers.  If someone has
Dan> ready made code, that'd be great.

Should be doable, but it'd probably be processor intensive.  I thought
about doing something like that but haven't.

Dan> While I'm asking, does anyone have code for extracting the
Dan> spamassassin score and putting it in the summary line?

No, but I've thought about that too.  I do something similar with the
X-Spam-Status line, though, that you should be able to adapt:

;; mark messages with X-ping in them
(setq gnus-extra-headers '(To X-Spam-Status)
(defun gnus-user-format-function-S (header)
  (let ((head (gnus-extra-header 'X-Spam-Status header)))
    (if (string-match "autolearn=\\(ham\\|spam\\|no\\)" head)
	(substring head (match-beginning 1) (match-end 1))
      "")
    ))

I put the spam/ham/unknown markings at the end to trigger my summary
highlight expressions so that the first 6 characters (the date for me)
of the line are highlighted with a particular color if I need to train
spamassain on the message.  Gives a nice visual queue.  You could do
something similar with scoring I'm sure.

(I also highlight the baysean score in the article buffer with green,
but I've wanted to move it to the summary buffer as well but haven't yet).

-- 
"In the bathtub of history the truth is harder to hold than the soap,
 and much more difficult to find."  -- Terry Pratchett



  reply	other threads:[~2004-04-07 19:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-07 18:59 Dan Christensen
2004-04-07 19:05 ` Wes Hardaker [this message]
2004-04-07 23:33 ` Adam Sjøgren
2004-04-21 19:22   ` Dan Christensen
2004-04-22 18:30     ` Ted Zlatanov
2004-04-23 13:53       ` Dan Christensen
2004-04-23 14:05         ` Adam Sjøgren
2004-04-27 22:41           ` Ted Zlatanov
2004-04-27 23:05             ` Wes Hardaker
2004-04-27 23:09             ` Michael Shields
2004-05-20 18:45             ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sd4qrvsj5q.fsf@wes.hardakers.net \
    --to=wes@hardakers.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).