aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2000-10-18 16:50:53 +0000
committerDave Love2000-10-18 16:50:53 +0000
commitf49c4ef75cd85edf7516ba3e0ea53208d6d45968 (patch)
treec303e93eaaeef06c6c6dc01596529d8c375b1bc1
parent9035a35ae6b68911902bcaec21bd7d64bc0d86f4 (diff)
downloademacs-f49c4ef75cd85edf7516ba3e0ea53208d6d45968.tar.gz
emacs-f49c4ef75cd85edf7516ba3e0ea53208d6d45968.zip
(gnus-nocem-issuers): Update.
(gnus-nocem-check-from): New option. (gnus-nocem-scan-groups): Use it. (gnus-nocem-check-article): Bind gnus-newsgroup-name. (gnus-nocem-check-article-limit): Add :version.
-rw-r--r--lisp/gnus/ChangeLog8
-rw-r--r--lisp/gnus/gnus-nocem.el38
2 files changed, 39 insertions, 7 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index ff217b9a48a..b9065fb09a8 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,11 @@
12000-10-18 Dave Love <fx@gnu.org>
2
3 * gnus-nocem.el (gnus-nocem-issuers): Update.
4 (gnus-nocem-check-from): New option.
5 (gnus-nocem-scan-groups): Use it.
6 (gnus-nocem-check-article): Bind gnus-newsgroup-name.
7 (gnus-nocem-check-article-limit): Add :version.
8
12000-10-16 Miles Bader <miles@lsi.nec.co.jp> 92000-10-16 Miles Bader <miles@lsi.nec.co.jp>
2 10
3 * gnus-nocem.el (gnus-nocem-check-article-limit): New variable. 11 * gnus-nocem.el (gnus-nocem-check-article-limit): New variable.
diff --git a/lisp/gnus/gnus-nocem.el b/lisp/gnus/gnus-nocem.el
index c67faaf52b7..c62a9088886 100644
--- a/lisp/gnus/gnus-nocem.el
+++ b/lisp/gnus/gnus-nocem.el
@@ -46,15 +46,17 @@
46 :type '(repeat (string :tag "Group"))) 46 :type '(repeat (string :tag "Group")))
47 47
48(defcustom gnus-nocem-issuers 48(defcustom gnus-nocem-issuers
49 '("AutoMoose-1" "Automoose-1" ; CancelMoose[tm] 49 '("AutoMoose-1" ; CancelMoose[tm]
50 "rbraver@ohww.norman.ok.us" ; Robert Braver 50 "clewis@ferret.ocunix" ; Chris Lewis
51 "clewis@ferret.ocunix.on.ca" ; Chris Lewis 51 "cosmo.roadkill"
52 "jem@xpat.com" ; Despammer from Korea 52 "SpamHippo"
53 "snowhare@xmission.com" ; Benjamin "Snowhare" Franz 53 "hweede@snafu.de")
54 "red@redpoll.mrfs.oh.us (Richard E. Depew)") ; ARMM! ARMM!
55 "*List of NoCeM issuers to pay attention to. 54 "*List of NoCeM issuers to pay attention to.
56 55
57This can also be a list of `(ISSUER CONDITIONS)' elements." 56This can also be a list of `(ISSUER CONDITION ...)' elements.
57
58See <URL:http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html> for an
59issuer registry."
58 :group 'gnus-nocem 60 :group 'gnus-nocem
59 :type '(repeat (choice string sexp))) 61 :type '(repeat (choice string sexp)))
60 62
@@ -87,9 +89,18 @@ matches an previously scanned and verified nocem message."
87(defcustom gnus-nocem-check-article-limit nil 89(defcustom gnus-nocem-check-article-limit nil
88 "*If non-nil, the maximum number of articles to check in any NoCeM group." 90 "*If non-nil, the maximum number of articles to check in any NoCeM group."
89 :group 'gnus-nocem 91 :group 'gnus-nocem
92 :version "21.1"
90 :type '(choice (const :tag "unlimited" nil) 93 :type '(choice (const :tag "unlimited" nil)
91 (integer 1000))) 94 (integer 1000)))
92 95
96(defcustom gnus-nocem-check-from t
97 "Non-nil means check for valid issuers in message bodies.
98Otherwise don't bother fetching articles unless their author matches a
99valid issuer, which is much faster if you are selective about the issuers."
100 :group 'gnus-nocem
101 :version "21.1"
102 :type 'boolean)
103
93;;; Internal variables 104;;; Internal variables
94 105
95(defvar gnus-nocem-active nil) 106(defvar gnus-nocem-active nil)
@@ -173,6 +184,18 @@ matches an previously scanned and verified nocem message."
173 ;; are not allowed to have references, so we can 184 ;; are not allowed to have references, so we can
174 ;; ignore scanning followups. 185 ;; ignore scanning followups.
175 (and (string-match "@@NCM" (mail-header-subject header)) 186 (and (string-match "@@NCM" (mail-header-subject header))
187 (and gnus-nocem-check-from
188 (let ((case-fold-search t))
189 (catch 'ok
190 (mapcar
191 (lambda (author)
192 (if (consp author)
193 (setq author (car author)))
194 (if (string-match
195 author (mail-header-from header))
196 (throw 'ok t)))
197 gnus-nocem-issuers)
198 nil)))
176 (or gnus-nocem-liberal-fetch 199 (or gnus-nocem-liberal-fetch
177 (and (or (string= "" (mail-header-references 200 (and (or (string= "" (mail-header-references
178 header)) 201 header))
@@ -201,6 +224,7 @@ matches an previously scanned and verified nocem message."
201 "Check whether the current article is an NCM article and that we want it." 224 "Check whether the current article is an NCM article and that we want it."
202 ;; Get the article. 225 ;; Get the article.
203 (let ((date (mail-header-date header)) 226 (let ((date (mail-header-date header))
227 (gnus-newsgroup-name group)
204 issuer b e type) 228 issuer b e type)
205 (when (or (not date) 229 (when (or (not date)
206 (time-less-p 230 (time-less-p