From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 Received: from mx2.math.uh.edu (mx2.math.uh.edu [129.7.128.33]) by inbox.vuxu.org (Postfix) with ESMTP id DC5FB27CAE for ; Mon, 29 Jan 2024 02:25:14 +0100 (CET) Received: from lists1.math.uh.edu ([129.7.128.208]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1rUGOe-0000000GvdP-3s6O for ml@inbox.vuxu.org; Sun, 28 Jan 2024 19:25:12 -0600 Received: from lists1.math.uh.edu ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.97.1) (envelope-from ) id 1rUGOe-00000003yQq-2Ocb for ml@inbox.vuxu.org; Sun, 28 Jan 2024 19:25:12 -0600 Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtp (Exim 4.97.1) (envelope-from ) id 1rUGOd-00000003yQk-0lF9 for ding@lists.math.uh.edu; Sun, 28 Jan 2024 19:25:11 -0600 Received: from quimby.gnus.org ([95.216.78.240]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1rUGOb-00000001JrX-2c3p for ding@lists.math.uh.edu; Sun, 28 Jan 2024 19:25:11 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:Mime-Version:References:Message-ID:Date:Subject: From:To:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fXUVmavd+D+GRX3WhbCCv4VHfkycOax4EIPeNTSxCwo=; b=du3UkUPVXsnIE5xEVH8ftR+NRO vYKiRWJmUg9C0MOUGpkRDabkeBtRb4S/OlPMa9kXVP1dII8du94HBf4EzP7XTL1IaoMFnoY2MHwrr uFq6cjzjza00LaBYfjIChyALZvE6ZAhPvMHxlSs7OVummo6YiCI2KuTOqlcB4515K0Y8=; Received: from ciao.gmane.io ([116.202.254.214]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rUGOV-0001UH-Bn for ding@gnus.org; Mon, 29 Jan 2024 02:25:05 +0100 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1rUGOU-0004Hx-MO for ding@gnus.org; Mon, 29 Jan 2024 02:25:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: ding@gnus.org From: Eric Abrahamsen Subject: Re: Displaying stuff from spamassassin headers in the summary buffer? Date: Sun, 28 Jan 2024 17:22:12 -0800 Message-ID: <87r0i1kk6z.fsf@ericabrahamsen.net> References: <87zfwqcrd3.fsf@dod.no> <87r0i273uq.fsf@igel.home> <87v87ec7fx.fsf@dod.no> <877cjtmsiq.fsf@ericabrahamsen.net> <87msspcdfq.fsf@dod.no> <87jznt0wy9.fsf@uwo.ca> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:46wqmxeq9kv7zxEl9E9bf7F5F5Q= List-ID: Precedence: bulk Dan Christensen writes: > 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 These are the remaining puzzle pieces I was too lazy to look up! Thank you.