+2000-10-18 Dave Love <fx@gnu.org>
+
+ * mail-source.el (mm-util): Require.
+ (defvar): Use rmail-spool-directory unconditionally.
+
+ * gnus-nocem.el (gnus-nocem-issuers): Update.
+ (gnus-nocem-check-from): New option.
+ (gnus-nocem-scan-groups): Use it.
+ (gnus-nocem-check-article): Bind gnus-newsgroup-name.
+
+2000-10-18 Miles Bader <miles@lsi.nec.co.jp>
+
+ * gnus-nocem.el (gnus-nocem-check-article-limit): New variable.
+ (gnus-nocem-scan-groups): Obey `gnus-nocem-check-article-limit'.
+
2000-10-18 Simon Josefsson <simon@josefsson.org>
* nnheader.el (nnheader-parse-head): Try both "from:" and "from: ".
2000-10-13 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
- * mail-source.el (defvar mail-source-keyword-map): Use
+ * mail-source.el (mail-source-keyword-map): Use
`rmail-spool-directory' as a default directory for the `file'
source, if the variable is defined. Fall back to hardcoded
"/usr/spool/mail/", as before. Suggestion by Steven E. Harris
;;; gnus-nocem.el --- NoCeM pseudo-cancellation treatment
-;; Copyright (C) 1995,96,97,98,99 Free Software Foundation, Inc.
+
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
:type '(repeat (string :tag "Group")))
(defcustom gnus-nocem-issuers
- '("AutoMoose-1" "Automoose-1" ; CancelMoose[tm]
- "rbraver@ohww.norman.ok.us" ; Robert Braver
- "clewis@ferret.ocunix.on.ca" ; Chris Lewis
- "jem@xpat.com" ; Despammer from Korea
- "snowhare@xmission.com" ; Benjamin "Snowhare" Franz
- "red@redpoll.mrfs.oh.us (Richard E. Depew)") ; ARMM! ARMM!
+ '("AutoMoose-1" ; CancelMoose[tm]
+ "clewis@ferret.ocunix" ; Chris Lewis
+ "cosmo.roadkill"
+ "SpamHippo"
+ "hweede@snafu.de")
"*List of NoCeM issuers to pay attention to.
-This can also be a list of `(ISSUER CONDITIONS)' elements."
+This can also be a list of `(ISSUER CONDITION ...)' elements.
+
+See <URL:http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html> for an
+issuer registry."
:group 'gnus-nocem
:type '(repeat (choice string sexp)))
:group 'gnus-nocem
:type 'boolean)
+(defcustom gnus-nocem-check-article-limit nil
+ "*If non-nil, the maximum number of articles to check in any NoCeM group."
+ :group 'gnus-nocem
+ :type '(choice (const :tag "unlimited" nil)
+ (integer 1000)))
+
+(defcustom gnus-nocem-check-from t
+ "Non-nil means check for valid issuers in message bodies.
+Otherwise don't bother fetching articles unless their author matches a
+valid issuer, which is much faster if you are selective about the issuers."
+ :group 'gnus-nocem
+ :type 'boolean)
+
;;; Internal variables
(defvar gnus-nocem-active nil)
;; are not allowed to have references, so we can
;; ignore scanning followups.
(and (string-match "@@NCM" (mail-header-subject header))
+ (and gnus-nocem-check-from
+ (let ((case-fold-search t))
+ (catch 'ok
+ (mapcar
+ (lambda (author)
+ (if (consp author)
+ (setq author (car author)))
+ (if (string-match
+ author (mail-header-from header))
+ (throw 'ok t)))
+ gnus-nocem-issuers)
+ nil)))
(or gnus-nocem-liberal-fetch
(and (or (string= "" (mail-header-references
header))
(not (member (mail-header-message-id header)
gnus-nocem-seen-message-ids))))
(push header check-headers)))
- (let ((i 0)
- (len (length check-headers)))
+ (let* ((i 0)
+ (check-headers
+ (last check-headers gnus-nocem-check-article-limit))
+ (len (length check-headers)))
(dolist (h check-headers)
(gnus-message
7 "Checking article %d in %s for NoCeM (%d of %d)..."
"Check whether the current article is an NCM article and that we want it."
;; Get the article.
(let ((date (mail-header-date header))
+ (gnus-newsgroup-name group)
issuer b e type)
(when (or (not date)
(time-less-p
(:prescript-delay)
(:postscript)
(:path (or (getenv "MAIL")
- (and (boundp 'rmail-spool-directory)
- (expand-file-name (user-login-name)
- rmail-spool-directory))
- (expand-file-name (user-login-name) "/usr/spool/mail/"))))
+ (expand-file-name (user-login-name) rmail-spool-directory))))
(directory
(:path)
(:suffix ".spool")
user (or (cdr (assoc from mail-source-password-cache))
password) buf)
(imap-mailbox-select mailbox nil buf))
- (let (str
- (coding-system-for-write mail-source-imap-file-coding-system)
- (output-coding-system mail-source-imap-file-coding-system))
+ (let ((coding-system-for-write mail-source-imap-file-coding-system)
+ (output-coding-system mail-source-imap-file-coding-system)
+ str)
(with-temp-file mail-source-crash-box
- ;; In some versions of FSF Emacs, inserting unibyte
- ;; string into multibyte buffer may convert 8-bit chars
- ;; into latin-iso8859-1 chars, which results \201's.
+ ;; Avoid converting 8-bit chars from inserted strings to
+ ;; multibyte.
(set-buffer-multibyte nil)
;; remember password
(with-current-buffer buf
+2000-10-18 Dave Love <fx@gnu.org>
+
+ * gnus.texi (NoCeM): Update.
+
2000-10-17 Simon Josefsson <simon@josefsson.org>
* gnus.texi (IMAP): Add.
@item gnus-nocem-issuers
@vindex gnus-nocem-issuers
NoCeM \e$B%a%C%;!<%8$rH/9T$9$k?M$O$?$/$5$s$$$^$9!#$3$N%j%9%H$G$O!"C/$N8@$&$3\e(B
-\e$B$H$K=>$$$?$$$+$r;XDj$7$^$9!#=i4|@_DjCM\e(B
-\e$B$O\e(B @code{("Automoose-1" "rbraver@@ohww.norman.ok.us" "clewis@@ferret.ocunix.on.ca" "jem@@xpat.com" "snowhare@@xmission.com" "red@@redpoll.mrfs.oh.us (Richard E. Depew)")} \e$B$G\e(B
-\e$B$9!#H`$i$O$_$s$J!"N)GI$G9b7i$J;TL1$G$9!#\e(B
+\e$B$H$K=>$$$?$$$+$r;XDj$7$^$9!#=i4|@_DjCM$O\e(B @code{(("Automoose-1"
+"clewis@@ferret.ocunix.on.ca" "cosmo.roadkill" "SpamHippo"
+"hweede@@snafu.de")} \e$B$G$9!#H`$i$O$_$s$J!"N)GI$G9b7i$J;TL1$G$9!#\e(B
-\e$B$3$N%j%9%H$K4^$a$i$l$kM-L>$JH?%9%Q%`2H$O0J2<$G$9!#\e(B
-
-@table @samp
-@item clewis@@ferret.ocunix.on.ca;
-@cindex Chris Lewis
-Chris Lewis --- \e$B<gMW$J%+%J%@$NH?%9%Q%`2H!#$*$=$i$/C/$h$j$bB?$/!"%M%C%H%K%e!<\e(B
-\e$B%9$NMtMQ$r<h$j>C$7$F$$$^$9!#\e(B
-
-@item Automoose-1
-@cindex CancelMoose[tm]
-\e$B<+F01?E>$N\e(B CancelMoose[tm]\e$B!#\e(BCancelMoose[tm] \e$B$O%N%k%&%'!<?M$H$5$l!"\e(B
-NoCeM \e$B$rH/L@$7$??M$G$7$?!#\e(B
-
-@item jem@@xpat.com;
-@cindex Jem
-John Milburn --- \e$B4Z9q$NH?%9%Q%`2H!#:G6a$O$+$J$jK;$7$/$J$C$F$-$F$$$k$h$&\e(B
-\e$B$G$9!#\e(B
-
-@item red@@redpoll.mrfs.oh.us (Richard E. Depew)
-Richard E. Depew --- \e$B%"%a%j%+$NC1FHH?%9%Q%`2H!#<g$KHs%P%$%J%j%0%k!<%W$X\e(B
-\e$B$N%P%$%J%jEj9F$N<h$j>C$7$H!"\e(Bspew (\e$B5UN.5-;v\e(B) \e$B$r:o=|$7$F$$$^$9!#\e(B
-@end table
+\e$B$3$N%j%9%H$K4^$a$i$l$kM-L>$JH?%9%Q%`2H$?$A\e(B
+\e$B$O\e(B @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html} \e$B$K:\$C$F\e(B
+\e$B$$$^$9!#\e(B
\e$B$3$l$iA4$F$N?M!9$N\e(B NoCeM \e$B%a%C%;!<%8$KN10U$9$kI,MW$O$"$j$^$;$s\e(B --- \e$B8@$&$3\e(B
\e$B$H$rJ9$-$?$$?M$@$1$G$$$$$s$G$9!#$^$?$=$N?M$+$i$N\e(B NoCeM\e$B%a%C%;!<%8A4$F$r<u\e(B
\e$B$l$rC;$/$9$k$[$I\e(B gnus \e$B$OB.$/$J$j$^$9$,!"8E$$%9%Q%`$r8+$k$3$H$K$J$C$F$7$^\e(B
\e$B$&$+$b$7$l$^$;$s!#\e(B
+@item gnus-nocem-check-from
+@vindex gnus-nocem-check-from
+\e$BHs\e(B@code{nil} \e$B$G$O!"5-;v$N%\%G%#$K$"$kH/9T?M$N@5Ev@-$rD4$Y$^$9!#$=$&$G$J\e(B
+\e$B$$>l9g$O!"Cx<T$,@5$7$$H/9T?M$G$J$/$F$b5$$K$;$:$K5-;v$r<h$j9~$_$^$9$,!"$b\e(B
+\e$B$7$"$J$?$,@5$7$$H/9T?M$r8+J,$1$i$l$k$J$i$P!"$=$&$7$?J}$,$H$F$bB.$/$J$k$G\e(B
+\e$B$7$g$&!#\e(B
+
+@item gnus-nocem-check-article-limit
+@vindex gnus-nocem-check-article-limit
+\e$BHs\e(B@code{nil} \e$B$G!"A4$F$N\e(B NoCeM \e$B%0%k!<%W$K$*$1$k%A%'%C%/$9$k5-;v$N:GBg?t$r\e(B
+\e$B;XDj$7$^$9!#\e(BNoCeM \e$B%0%k!<%W$O5pBg$K$J$k$3$H$,$"$j!"$=$&$J$k$H=hM}$,$H$F$b\e(B
+\e$BCY$/$J$j$^$9!#\e(B
+
@end table
NoCeM \e$B$r;H$&$H!"$b$7$+$9$k$H%a%b%j6t$$$K$J$k$+$b$7$l$^$;$s!#$"$J$?$,$?$/\e(B
@vindex gnus-nocem-issuers
There are many people issuing NoCeM messages. This list says what
people you want to listen to. The default is @code{("Automoose-1"
-"rbraver@@ohww.norman.ok.us" "clewis@@ferret.ocunix.on.ca"
-"jem@@xpat.com" "snowhare@@xmission.com" "red@@redpoll.mrfs.oh.us
-(Richard E. Depew)")}; fine, upstanding citizens all of them.
+"clewis@@ferret.ocunix.on.ca" "cosmo.roadkill" "SpamHippo"
+"hweede@@snafu.de")}; fine, upstanding citizens all of them.
-Known despammers that you can put in this list include:
-
-@table @samp
-@item clewis@@ferret.ocunix.on.ca;
-@cindex Chris Lewis
-Chris Lewis---Major Canadian despammer who has probably canceled more
-usenet abuse than anybody else.
-
-@item Automoose-1
-@cindex CancelMoose[tm]
-The CancelMoose[tm] on autopilot. The CancelMoose[tm] is reputed to be
-Norwegian, and was the person(s) who invented NoCeM.
-
-@item jem@@xpat.com;
-@cindex Jem
-John Milburn---despammer located in Korea who is getting very busy these
-days.
-
-@item red@@redpoll.mrfs.oh.us (Richard E. Depew)
-Richard E. Depew---lone American despammer. He mostly cancels binary
-postings to non-binary groups and removes spews (regurgitated articles).
-@end table
+Known despammers that you can put in this list are listed at
+@uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
You do not have to heed NoCeM messages from all these people---just the
ones you want to listen to. You also don't have to accept all NoCeM
The default is 15. If you make it shorter Gnus will be faster, but you
might then see old spam.
+@item gnus-nocem-check-from
+@vindex gnus-nocem-check-from
+Non-@code{nil} means check for valid issuers in message bodies.
+Otherwise don't bother fetching articles unless their author matches a
+valid issuer; that is much faster if you are selective about the
+issuers.
+
+@item gnus-nocem-check-article-limit
+@vindex gnus-nocem-check-article-limit
+If non-@code{nil}, the maximum number of articles to check in any NoCeM
+group. NoCeM groups can be huge and very slow to process.
+
@end table
Using NoCeM could potentially be a memory hog. If you have many living