From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/56232 Path: main.gmane.org!not-for-mail From: Reiner Steib <4.uce.03.r.s@nurfuerspam.de> Newsgroups: gmane.emacs.gnus.general Subject: [spam-report.el] Offline Gmane spam reporting Date: Sun, 01 Feb 2004 15:35:31 +0100 Sender: ding-owner@lists.math.uh.edu Message-ID: Reply-To: Reiner Steib NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1075646382 16562 80.91.224.253 (1 Feb 2004 14:39:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 1 Feb 2004 14:39:42 +0000 (UTC) Original-X-From: ding-owner+M4772@lists.math.uh.edu Sun Feb 01 15:39:36 2004 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 1AnIl5-0002D0-00 for ; Sun, 01 Feb 2004 15:39: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 1AnIjB-0002bG-00; Sun, 01 Feb 2004 08:37:37 -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 1AnIj1-0002b8-00 for ding@lists.math.uh.edu; Sun, 01 Feb 2004 08:37:27 -0600 Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by justine.libertine.org (Postfix) with ESMTP id B59333A0066 for ; Sun, 1 Feb 2004 08:37:26 -0600 (CST) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AnIiz-0006e3-00 for ; Sun, 01 Feb 2004 15:37:25 +0100 Original-Received: from dialin-145-254-249-252.arcor-ip.net ([145.254.249.252]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun Feb 1 14:37:25 2004 Original-Received: from reiner.steib by dialin-145-254-249-252.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun Feb 1 14:37:25 2004 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org Original-Lines: 102 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: dialin-145-254-249-252.arcor-ip.net X-Face: 1;h7XMU[7l}$T@J.D}5z*w8Tg'}B5ArAWc8>2X~otB;kOjKs8X%|hTC#dG:%Vpx")x7S/`v :VXU#fZW$X$zdhEU.RfVQ@<-m9IuN{Hm"fW{,5]6kR'M*vEs+{5Cj!L(JTRzA$(},?5J=sm;%Od file ... from the shell (or some ip-up script). But we may also add an interactive lisp function for that (loop over all lines in the file, use `spam-report-url-ping-plain' and erase the file when done). Unless there are objections, I will commit both patches along with an update for the manual. Bye, Reiner. [1] --8<---------------cut here---------------start------------->8--- --- spam-report.el.~6.7.~ Mon Jan 5 11:58:59 2004 +++ spam-report.el Sun Feb 1 15:08:22 2004 @@ -59,12 +59,24 @@ (defcustom spam-report-url-ping-function 'spam-report-url-ping-plain - "Function to use for url ping spam reporting." + "Function to use for url ping spam reporting. +The function must accept the arguments `host' and `report'." :type '(choice (const :tag "Connect directly" spam-report-url-ping-plain) (const :tag "Use the external program specified in `mm-url-program'" - spam-report-url-ping-mm-url)) + spam-report-url-ping-mm-url) + (const :tag "Store request URLs in `spam-report-requests-file'" + spam-report-url-to-file) + (function :tag "User defined function" nil)) + :group 'spam-report) + +(defcustom spam-report-requests-file + (nnheader-concat gnus-directory "spam-report-requests.url") + ;; Is there a convention for the extension of such a file? + ;; Should we use `spam-directory'? + "File where spam report request are stored." + :type 'file :group 'spam-report) (defun spam-report-gmane (&rest articles) @@ -121,6 +133,17 @@ (let ((url (concat "http://" host "/" report))) (mm-url-insert url t)))) +(defun spam-report-url-to-file (host report) + "Collect spam report requests in `spam-report-requests-file'. +Customize `spam-report-url-ping-function' to use this function." + (let ((url (concat "http://" host "/" report)) + (file spam-report-requests-file)) + (gnus-message 9 "Writing URL `%s' to file `%s'" url file) + (with-temp-buffer + (insert url) + (newline) + (append-to-file (point-min) (point-max) file)))) + (provide 'spam-report) ;;; spam-report.el ends here. --8<---------------cut here---------------end--------------->8--- [2] --8<---------------cut here---------------start------------->8--- --- spam.el.~6.142.~ Mon Jan 26 21:06:50 2004 +++ spam.el Sun Feb 1 15:02:00 2004 @@ -73,7 +73,7 @@ (defgroup spam nil "Spam configuration.") -(defcustom spam-directory "~/News/spam/" +(defcustom spam-directory (nnheader-concat gnus-directory "spam/") "Directory for spam whitelists and blacklists." :type 'directory :group 'spam) --8<---------------cut here---------------end--------------->8--- -- ,,, (o o) ---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/