From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/55266 Path: main.gmane.org!not-for-mail From: Wes Hardaker Newsgroups: gmane.emacs.gnus.general Subject: spam/ham autolearn (spamassassin) markings in summary example.... Date: Wed, 17 Dec 2003 10:07:44 -0800 Organization: Sparta Sender: ding-owner@lists.math.uh.edu Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1071684526 18036 80.91.224.253 (17 Dec 2003 18:08:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 17 Dec 2003 18:08:46 +0000 (UTC) Original-X-From: ding-owner+M3806@lists.math.uh.edu Wed Dec 17 19:08:37 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AWg68-0005w4-00 for ; Wed, 17 Dec 2003 19:08:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1AWg5b-0003Y2-00; Wed, 17 Dec 2003 12:08:03 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1AWg5T-0003Xw-00 for ding@lists.math.uh.edu; Wed, 17 Dec 2003 12:07:55 -0600 Original-Received: from wanderer.hardakers.net (adsl-66-127-127-227.dsl.scrm01.pacbell.net [66.127.127.227]) by justine.libertine.org (Postfix) with ESMTP id A2BE63A0044 for ; Wed, 17 Dec 2003 12:07:54 -0600 (CST) Original-Received: by wanderer.hardakers.net (Postfix, from userid 274) id 4A53256849; Wed, 17 Dec 2003 10:07:44 -0800 (PST) Original-To: ding@gnus.org Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXotKX87e8eDA4GAQbQgmlzNycHAwizYkruzul2AAACaUlEQVR4nFXUTW/jIBAGYFI56jWutuq1S9b2dddW6dWtQFxbq4jzwq73Glmg+fv7DiT9QJGS+GEGhiER67TWEQ5CtOeh21ZcIIbmOPq5QvMZYlyV6u+/gsJLTSrGIL/CxEPxQuPAcP0JYlQsq3x5B3UJmUaEyB6yZ+CQ+pwXCzKsbXtbIhg4KtZypPz+AVGtlxH69c87qAqRY6Rc5QUmZMGeAj+TfVjjUwE1lflKys5JGXpM+V0hltqCJ0qL7Plkft4wRM6lxi5p3Wyy7O7fB8TgtdZivxy5rvAB6wSYhbA9vn+GOCaOEGJRPO2mHgk+q1Chyf0Up3AG0NjhOXI19ogEFziq6M+ZtN3kUZ13NW4qUCprC3CW668C06M5jihON1Vsjq8F1CPJB8LINNeQfscwxUEvAwM5Xghvsq2pBr3hnKhbDIrMS3cBRDx70uS9JW2dy667gM0AbZFFmyvn3GOBGB8wG9kppaSNz357LaCmUdtSny5LU9qeCrglvJmyH20TwkjnXQE0usscIWayCWZJ7OpZ4QbUVGRnhuTub3cMYRk99oSplDIfibzfn0FyXyk7z8XThuvC0P/dGCwee7O8aZJBmh0vPixy0NrYhDaR02aR3W0BbyT6h23OB5Hzybj+DOm5w6XCOZG13p5Oh/bursJVh9S+bBiFnPCDuntpcTH080AO+7GlW1i3bRphBM04dZ2dI6yMLjmGFqnIok/cB1YU8sJAACTeuHOd5+lumQHfDM6KyLqEm4aWkkcc1m4PqBewZxBZOg44lT+aJiexDteewb User-Agent: Gnus/5.1003 (Gnus v5.10.3) XEmacs/21.5 (brussels sprouts, linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:55266 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:55266 So, I just wanted to get spamassain working properly and to ensure that all the articles it "autolearned" as spam/ham truly were. The problem is that you have to open the article to find out. Well, I've now done this: ; read in the spam status header (setq gnus-extra-headers '(To X-Spam-Status) nnmail-extra-headers '(To X-Spam-Status)) ; for this spam example, the %uS at the end is the important part. (setq gnus-summary-line-format "%uW%d%U%R%ub%5i %I%(%[ %-15,15n%]%2t%) %-40s %uS\n") ;; mark messages with spam/ham/no autolearned in the summary buffer ;; (at the end of the line, based on the above) (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)) "") )) ;; color code the first 5 characters (for me == the date) based on the ;; type of mail. spam = orange, ham = a barely different green/blue ;; than my normal background, no (needs training!) = yellow. ;; NOTE: this requires my gnus-highlight, which is not yet a part ;; of the real guns package (setq gnus-summary-highlight-expressions '( ;; ... my other stuff deleted ("^\\(......\\).*no$" . ((bg . "yellow"))) ("^\\(......\\).*ham$" . ((bg . "#90d0c0"))) ("^\\(......\\).*spam$" . ((bg . "orange"))) ;; ... )) -- "In the bathtub of history the truth is harder to hold than the soap, and much more difficult to find." -- Terry Pratchett