Re: Displaying stuff from spamassassin headers in the summary buffer?
Dan Christensen <[email protected]>
| Newsgroups | gmane.emacs.gnus.general |
|---|---|
| Message-ID | <[email protected]> |
Here are some old settings that I'm not using these days, but which
might do things similar to what you want:
(add-to-list 'nnmail-extra-headers 'X-Spam-Status)
(add-to-list 'gnus-extra-headers 'X-Spam-Status)
(defun jdc-spam-status (h)
"The spam rating from the X-Spam-Status header."
(string-to-number (gnus-replace-in-string
(gnus-extra-header 'X-Spam-Status h)
".*hits=" "")))
(defun gnus-user-format-function-s (h)
(let ((ss (jdc-spam-status h)))
(if (> (abs ss) 10)
(round ss)
ss)))
With the above settings, I'm able to display the spam score in the
summary buffer line using "%us" in gnus-summary-line-format. This could
be adapted to display other info.
I also sort my spam group by spam score, so the ones that at most likely
to be mis-classified messages are together:
(defun jdc-gnus-article-sort-by-spam-status (h1 h2)
"Sort articles by score from the X-Spam-Status: header."
(< (jdc-spam-status h1) (jdc-spam-status h2)))
(defun jdc-gnus-thread-sort-by-spam-status (t1 t2)
"Sort threads by score from the X-Spam-Status: header."
(jdc-gnus-article-sort-by-spam-status
(gnus-thread-header t1)
(gnus-thread-header t2)))
But I don't see where I enable these functions.
Dan