From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/44174 Path: main.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: Spam spam spam spam spam Date: Fri, 05 Apr 2002 14:33:43 -0500 Organization: =?koi8-r?q?=F4=C5=CF=C4=CF=D2=20=FA=CC=C1=D4=C1=CE=CF=D7?= @ Cienfuegos Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1018035425 16089 127.0.0.1 (5 Apr 2002 19:37:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 5 Apr 2002 19:37:05 +0000 (UTC) Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16tZWC-0004BO-00 for ; Fri, 05 Apr 2002 21:37:04 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16tZTd-0000LW-00; Fri, 05 Apr 2002 13:34:25 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 05 Apr 2002 13:34:33 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id NAA21154 for ; Fri, 5 Apr 2002 13:34:21 -0600 (CST) Original-Received: (qmail 11608 invoked by alias); 5 Apr 2002 19:34:07 -0000 Original-Received: (qmail 11603 invoked from network); 5 Apr 2002 19:34:07 -0000 Original-Received: from liilmtlssm01.mailtask.com (208.203.59.25) by gnus.org with SMTP; 5 Apr 2002 19:34:07 -0000 Original-Received: from onyx.nimbus.northernlight.com ([10.128.22.65]) by LIILMTLSSM01.mailtask.com with Microsoft SMTPSVC(5.0.2195.3779); Fri, 5 Apr 2002 13:33:39 -0600 Original-To: ding@gnus.org X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Followup-To: ding@gnus.org In-Reply-To: (Ted Zlatanov's message of "Tue, 02 Apr 2002 17:06:15 -0500") Original-Lines: 57 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-redhat-linux-gnu) X-OriginalArrivalTime: 05 Apr 2002 19:33:39.0554 (UTC) FILETIME=[C98C3420:01C1DCD8] Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:44174 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:44174 --=-=-= On Tue, 02 Apr 2002, teodor.zlatanov@divine.com wrote: > Lars Magne Ingebrigtsen writes: > >> The spam.el file contains rudimentary whitelist/blacklist support, >> and you can build on that. > > What features are missing that you wanted to add? > > Did you want to finish the work? It looks like spam.el is > semi-complete already. I don't mind picking up - it's always fun to > polish my Lisp. Just let me know what features/functions you > wanted. > What did you think about the "spam" mark? I've added it to > gnus-sum.el; patch attached. I picked the "H" character for the > company that brought us the original word, since "S" was taken. I > can see it being applied by score or by a splitting-time function. > I also added a gnus-summary-mark-as-spam function, which could be > augmented to also report the spam to user-defined destinations. I haven't heard about the patch I submitted to add a "spam" mark. Will that be committed by anyone, or is there a problem with the patch? Also, I wanted to know what features were missing from spam.el that I should add. I know one eventual goal was to use it for splitting spam in nnml-split-fancy with spam-address-whitelisted-p, and it seems like it's already there. What else? Hooks for spamcop, TMDA, etc? The spam-check-blackholes code will break on a full IPv6 address, is there existing Emacs functionality to match those? I didn't want to write out the full IPv6 spec, it's pretty nasty. Do we even care - do those blackhole servers support IPv6 addresses? I'm attaching a simple patch for a new function, spam-enter-blacklist, which just invokes spam-enter-whitelist with the BLACKLIST parameter t. I think users will find it convenient. The patch also fixes the docstring for the blacklist file var, and adds more information to both the whitelist and the blacklist file vars. I'd like to add a gnus-summary-mark-as-spam-hooks hooks list to the gnus-summary-mark-as-spam function, and then the user can invoke the spam-enter-blacklist functions on a message as it is being marked as spam. That makes sense to me (mark as spam -> trigger add to blacklist). Does that sound reasonable? Marking as spam with the universal prefix might invoke the gnus-summary-mark-as-nonspam function and the corresponding gnus-summary-mark-as-nonspam-hooks hooks list. This might require extra care, because we don't necessarily want to add the same header always. So there might be "blacklist this sender", "blacklist this message-ID", and so on functions. Thanks Ted --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=spam.patch --- spam.el Fri Apr 5 14:14:27 2002 +++ tzz-spam.el Fri Apr 5 14:21:45 2002 @@ -61,16 +61,16 @@ "When spam files are kept.") (defvar spam-whitelist (expand-file-name "whitelist" spam-directory) - "The location of the whitelist.") + "The location of the whitelist file. One address (string or regular expression) per line.") (defvar spam-blacklist (expand-file-name "blacklist" spam-directory) - "The location of the whitelist.") + "The location of the blacklist file. One address (string or regular expression) per line.") (defvar spam-whitelist-cache nil) (defvar spam-blacklist-cache nil) (defun spam-enter-whitelist (address &optional blacklist) - "Enter ADDRESS into the whitelist." + "Enter ADDRESS into the whitelist, or the blacklist with the optional parameter BLACKLIST." (interactive "sAddress: ") (let ((file (if blacklist spam-blacklist spam-whitelist))) (unless (file-exists-p (file-name-directory file)) @@ -83,6 +83,11 @@ (insert "\n")) (insert address "\n") (save-buffer)))) + +(defun spam-enter-blacklist (address) + "Enter ADDRESS into the blacklist." + (interactive "sAddress: ") + (spam-enter-whitelist address t)) (defun spam-parse-whitelist (&optional blacklist) (let ((file (if blacklist spam-blacklist spam-whitelist)) --=-=-=--