From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Guerry Newsgroups: gmane.emacs.help Subject: Re: for RMAIL in EMACS how do you sort probable spam type messages to a file so you can check for false positives?... what emacs commands could do it during a single session?... Date: Wed, 13 Feb 2008 00:55:04 +0000 Message-ID: <87lk5pwu8n.fsf@bzg.ath.cx> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1202864138 20873 80.91.229.12 (13 Feb 2008 00:55:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Feb 2008 00:55:38 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 13 01:56:01 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JP5ur-0008NI-Ao for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Feb 2008 01:56:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JP5uN-00074f-SD for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Feb 2008 19:55:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JP5u5-00074a-4V for help-gnu-emacs@gnu.org; Tue, 12 Feb 2008 19:55:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JP5u2-00074B-7P for help-gnu-emacs@gnu.org; Tue, 12 Feb 2008 19:55:11 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JP5u2-000748-4Z for help-gnu-emacs@gnu.org; Tue, 12 Feb 2008 19:55:10 -0500 Original-Received: from hu-out-0506.google.com ([72.14.214.224]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JP5u1-0003WJ-Fx for help-gnu-emacs@gnu.org; Tue, 12 Feb 2008 19:55:09 -0500 Original-Received: by hu-out-0506.google.com with SMTP id 23so8332709huc.1 for ; Tue, 12 Feb 2008 16:55:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject:in-reply-to:references:user-agent:date:message-id:mime-version:content-type:sender; bh=YqNMrfMX2PqRsnIhm2c1LZ3gBKiVzm1QxNM9LiZDuMs=; b=R/CCoIdKAi2mBNw7xSGG6f0oTmdZbqddl5yctAPz+R4GXHFyk39rbTw/hcHs8vLMhak31/O2CNqvLE3d7GcoCBLK5tTaKctmCkAciK5G2ma8t2xma3CSc0BF6FMwWqDxRQAARaCHO1t84+LlEreIaIw4URHVFtgR1h4nHCizzRA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:user-agent:date:message-id:mime-version:content-type:sender; b=r+p2VSt5nlH+cmJ77G7vfihaJJIU5fd3w8e29u/L4JeYdp9KeybJm+AJ6yDRbHxpMAfCqqAjlkQdMpZZGjUVcsTgBvkMTanK3Qr0BiySqbanK1uf5Mjarz3R5vH8uItlZ1byG/lwlULZvT2KP6c0R56MAOPfVvZIX06t23jCTKE= Original-Received: by 10.78.175.14 with SMTP id x14mr3864727hue.7.1202864107492; Tue, 12 Feb 2008 16:55:07 -0800 (PST) Original-Received: from bzg.ath.cx ( [81.99.213.34]) by mx.google.com with ESMTPS id c14sm1757992nfi.6.2008.02.12.16.55.05 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Feb 2008 16:55:06 -0800 (PST) Original-Received: by bzg.ath.cx (Postfix, from userid 1000) id D6641157B18; Wed, 13 Feb 2008 00:55:04 +0000 (GMT) In-Reply-To: (Eli Zaretskii's message of "Tue, 12 Feb 2008 21:41:51 +0200") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:51471 Archived-At: --=-=-= Eli Zaretskii writes: >> From: Don Saklad >> Date: Mon, 11 Feb 2008 19:08:48 -0500 >> Cc: >> >> for RMAIL in EMACS how do you sort probable spam type messages >> to a file so you can check for false positives?... what emacs commands >> could do it during a single session?... >> >> spamassassin headers appear on many messages but the fencepost.gnu.org >> sysadmin team does not provide end-user support for RMAIL in EMACS. > > Emacs 22 comes with rmail-spam-filter, so perhaps you could hack it to > look at the spamassassin headers. (If you do, please submit the > changes to emacs-devel@gnu.org.) The patch below allow the user to set `rsf-definitions-alist' so that `rmail-spam-filter' also check the X-Spam-Status header field. I think this is what the OP needs. Should I apply this? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=rmail-spam-filter.el.patch --- rmail-spam-filter.el.~1.19.~ 2008-01-08 20:45:08.000000000 +0000 +++ rmail-spam-filter.el 2008-02-13 00:53:32.000000000 +0000 @@ -201,6 +201,9 @@ (cons :format "%v" :value (contents . "") (const :format "" contents) (string :tag "Contents" "")) + (cons :format "%v" :value (x-spam-status . "") + (const :format "" x-spam-status) + (string :tag "X-Spam-Status" "")) (cons :format "%v" :value (action . output-and-delete) (const :format "" action) (choice :tag "Action selection" @@ -284,6 +287,7 @@ (concat ", " (mail-fetch-field "Cc"))))) (setq message-subject (mail-fetch-field "Subject")) (setq message-content-type (mail-fetch-field "Content-Type")) + (setq message-spam-status (mail-fetch-field "X-Spam-Status")) ) ;; Find number of spam-definition elements in the list ;; rsf-definitions-alist specified by user: @@ -363,6 +367,11 @@ (rmail-msgbeg msg) (rmail-msgend msg)) definition maybe-spam) + ;; finally, check the X-Spam-Status header. You will typically + ;; look for the "Yes" string in this header field + (check-field 'x-spam-status message-spam-status + definition maybe-spam) + ;; if the search in rsf-definitions-alist found ;; that this email is spam, output the email to the spam ;; rmail file, mark the email for deletion, leave the --=-=-= -- Bastien --=-=-=--