From: yamaoka Date: Mon, 8 Jul 2002 03:11:20 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_8-00-quimby~28 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d2bfc98a4b1b7d67b36c2e7852897f06e4e111b;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e58cbfa..b50bb82 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2002-07-06 ShengHuo ZHU + + * gnus-topic.el (gnus-topic-indent, gnus-topic-unindent): Change + cdaar to cdar and car. + + * nnsoup.el (nnsoup-retrieve-headers, nnsoup-request-type) + (nnsoup-read-active-file, nnsoup-article-to-area): Ditto. + 2002-07-05 Katsumi Yamaoka * gnus-sum.el (gnus-summary-toggle-header): Show headers anyway; diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index 0f45fd3..d356c31 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -1530,7 +1530,7 @@ If UNINDENT, remove an indentation." (gnus-topic-kill-group) (push (cdar gnus-topic-killed-topics) gnus-topic-alist) (gnus-topic-create-topic - topic parent nil (cdaar gnus-topic-killed-topics)) + topic parent nil (cdar (car gnus-topic-killed-topics))) (pop gnus-topic-killed-topics) (or (gnus-topic-goto-topic topic) (gnus-topic-goto-topic parent)))))) @@ -1549,7 +1549,7 @@ If UNINDENT, remove an indentation." (push (cdar gnus-topic-killed-topics) gnus-topic-alist) (gnus-topic-create-topic topic grandparent (gnus-topic-next-topic parent) - (cdaar gnus-topic-killed-topics)) + (cdar (car gnus-topic-killed-topics))) (pop gnus-topic-killed-topics) (gnus-topic-goto-topic topic)))) diff --git a/lisp/nnsoup.el b/lisp/nnsoup.el index 0836590..e0bda9e 100644 --- a/lisp/nnsoup.el +++ b/lisp/nnsoup.el @@ -115,7 +115,7 @@ backend for the messages.") ;; articles in SEQUENCE come from. (while (and areas sequence) ;; Peel off areas that are below sequence. - (while (and areas (< (cdaar areas) (car sequence))) + (while (and areas (< (cdar (car areas)) (car sequence))) (setq areas (cdr areas))) (when areas ;; This is a useful area. @@ -131,7 +131,7 @@ backend for the messages.") (setq use-nov nil)) ;; We assign the portion of `sequence' that is relevant to ;; this MSG packet to this packet. - (while (and sequence (<= (car sequence) (cdaar areas))) + (while (and sequence (<= (car sequence) (cdar (car areas)))) (push (car sequence) this-area-seq) (setq sequence (cdr sequence))) (setcar useful-areas (cons (nreverse this-area-seq) @@ -250,7 +250,7 @@ backend for the messages.") ;; Try to guess the type based on the first article in the group. (when (not article) (setq article - (cdaar (cddr (assoc group nnsoup-group-alist))))) + (cdar (car (cddr (assoc group nnsoup-group-alist)))))) (if (not article) 'unknown (let ((kind (gnus-soup-encoding-kind @@ -372,7 +372,7 @@ backend for the messages.") (setq min (caaar e)) (while (cdr e) (setq e (cdr e))) - (setq max (cdaar e)) + (setq max (cdar (car e))) (setcdr entry (cons (cons min max) (cdr entry))))) (setq nnsoup-group-alist-touched t)) nnsoup-group-alist)) @@ -652,7 +652,7 @@ backend for the messages.") (defun nnsoup-article-to-area (article group) "Return the area that ARTICLE in GROUP is located in." (let ((areas (cddr (assoc group nnsoup-group-alist)))) - (while (and areas (< (cdaar areas) article)) + (while (and areas (< (cdar (car areas)) article)) (setq areas (cdr areas))) (and areas (car areas)))) diff --git a/texi/ChangeLog b/texi/ChangeLog index 97e127c..aabd51c 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,13 @@ +2002-07-07 Simon Josefsson + + * gnus.texi (Top): Move hashcash down into spam chapter. + (Top): New spam menu. + (Various): Remove hashcash. + (Thwarting Email Spam): Split into introduction and "Anti-Spam + Basics" node. + (SpamAssassin): Add. + (Hashcash): Add. + 2002-06-28 Katsumi Yamaoka * gnus.texi (NNTP): Doc fix. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 7c2104b..1d08ad4 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -767,8 +767,8 @@ Getting Mail * Mail Sources:: Gnus $B$K$I$3$+$i%a!<%k$r7W$J>&6HE*EE;R%a!<%k$rHr$1$kJ}K!(B -* Pay Hashcash:: CPU $B;~4V$rHq$d$7$F(B spam $BB`<#$9$k(B * Various Various:: $BK\Ev$K$$$m$$$m$J$b$N(B Formatting Variables @@ -971,6 +970,12 @@ Picons * Picon Useless Configuration:: $B$=$NB>$N$V$C2u$7$?$j$R$M$C$?$j$$$8$C$?(B $B$jM7$s$@$j$9$kJQ?t(B +Thwarting Email Spam + +* Anti-Spam Basics:: $B$?$/$5$s$N(B spam $B$r8:$i$94JC1$JJ}K!(B +* SpamAssassin:: Spam $BBP:v%D!<%k$N;H$$J}(B +* Hashcash:: CPU $B;~4V$rHq$d$7$F(B spam $BB`<#$9$k(B + Appendices * XEmacs:: XEmacs $B$G%$%s%9%H!<%k$9$k$?$a$NMW7o(B @@ -11668,8 +11673,8 @@ Emacs $B$N%;%C%7%g%sA4BN$r%i%C%W$7$F!"%G%#%U%)%k%H$N%a%=%C%I$r;H$&$H$$$&$N(B * Mail Sources:: Gnus $B$K$I$3$+$i%a!<%k$r\$7$/@bL@$9$k$H!"(B@sc{imap} $B$OC5n$7$J$$!"5-;v$K(B @code{Deleted} $B$H$$$&0u$rIU$1$k35G0$,$"$j!"$3(B $B$l(B ($B$($C$H!"(B@code{Deleted} $B$H$$$&0u$rIU$1$k$3$H$G(B -$B$9(B) $B$,(B nnimap $B$,(B Gnus $B$G5-;v$r>C5n$9$k$H$-$K$9$k$3$H$G$9(B (@kbd{G DEL} $B$J(B +$B$9(B) $B$,(B nnimap $B$,(B Gnus $B$G5-;v$r>C5n$9$k$H$-$K$9$k$3$H$G$9(B (@kbd{B DEL} $B$J(B $B$I$G(B)$B!#(B ($BLuCm(B: $B%Q%k%a%K%G%9$O5*85A0(B 5 $B@$5*$N%.%j%7%"$N(B Elea $BGI$NE/3X$N(B @sc{imap} $B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-$JLJLS$C$F2?(B? * Thwarting Email Spam:: $BM>7W$J>&6HE*EE;R%a!<%k$rHr$1$kJ}K!(B -* Pay Hashcash:: CPU $B;~4V$rHq$d$7$F(B spam $BB`<#$9$k(B * Various Various:: $BK\Ev$K$$$m$$$m$J$b$N(B @end menu @@ -20226,8 +20231,21 @@ Gnus $B$O!"%9%3%"IU$1!"%9%l%C%I$N7A@.!"%9%l%C%IHf3S$J$I$r9T$&$H$-$K!"(B $B$3$l$OITL{2w$G$9!#(B -$B$3$l$KBP=h$9$kJ}K!$O!"(Bgnus $B$KA4$F$N(B spam $B$r(B @samp{spam} $B%a!<%k%0%k!<%W$K(B -$BJ,N%$5$;$F$7$^$&$3$H$G$9(B (@pxref{Splitting Mail})$B!#(B +@menu +* Anti-Spam Basics:: $B$?$/$5$s$N(B spam $B$r8:$i$94JC1$JJ}K!(B +* SpamAssassin:: Spam $BBP:v%D!<%k$N;H$$J}(B +* Hashcash:: CPU $B;~4V$rHq$d$7$F(B spam $BB`<#$9$k(B +@end menu + +@node Anti-Spam Basics +@subsection Spam $BB`<#$N4pAC(B +@cindex email spam +@cindex spam +@cindex UCE +@cindex unsolicited commercial email + +Spam $B$KBP=h$9$k0l$D$NJ}K!$O!"(Bgnus $B$KA4$F$N(B spam $B$r(B @samp{spam} $B%a!<%k%0(B +$B%k!<%W$KJ,N%$5$;$F$7$^$&$3$H$G$9(B (@pxref{Splitting Mail})$B!#(B $B:G=i$K!"$"$J$?$KE~C#@-$N$"$k@5$7$$%a!<%k%"%I%l%9$r0l$DA*$S!"$=$l$rA4$F$N(B $B$"$J$?$N%K%e!<%95-;v$N(B @code{From} $B%X%C%@!<$KF~$l$^$9!#(B($B$3$3$G$O(B @@ -20294,15 +20312,102 @@ Gnus $B$O!"%9%3%"IU$1!"%9%l%C%I$N7A@.!"%9%l%C%IHf3S$J$I$r9T$&$H$-$K!"(B $B$3$H$OA4$/$"$j$^$;$s!#F@!9>uBV$G$9!#;d$N0U8+$H$7$F$O!"(B@code{From} $B%X%C%@!<(B $B$r56B$$7$FB8:_$7$J$$%I%a%$%s$KAw$i$;$k$N$O%-%?%J%$$G$9!#(B -@node Pay Hashcash -@section Pay Hashcash +@node SpamAssassin +@subsection SpamAssassin, Vipul's Razor, DCC, etc +@cindex SpamAssassin +@cindex Vipul's Razor +@cindex DCC + +Spam $B$rHr$1$k$?$a$NA09`$N%R%s%H$,==J,$@$C$?F|!9$O2a$.5n$j$^$7$?!#:#$G$O(B +$B$N$[$H$s$I$NF;6q$K$b4JC1$KE,9g$9$k$O(B +$B$:$G$9!#(B + +$B$b$7$"$J$?$,;H$&F;6q$,%a!<%k%5!<%P!<$K%$%s%9%H!<%k$5$l$F$$$J$$$J$i$P!"$"(B +$B$J$?<+?H$,$=$l$r8F$S=P$9I,MW$,$"$j$^$9!#0J2<$K(B @code{:postscript} $B%a!<%k(B +$B%=!<%9;X<(;R(B (@pxref{Mail Source Specifiers}) $B$r;H$&>l9g$N9M$(J}$r<($7$^(B +$B$9!#(B + +@lisp +(setq mail-sources + '((file :prescript "formail -bs spamassassin < /var/mail/%u") + (pop :user "jrl" + :server "pophost" + :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t"))) +@end lisp + +$B$$$C$?$s%a!<%k$re$,$3$l$K4X$9$k$3$H$G$9!#$$$/$D$+$N(B spam $B$O$I$&$7$F$bAGDL$j$7$F$7$^$&(B +$B$N$G!"(Bspam $B$rFI$`$O$a$K$J$C$?$H$-$K8F$V$?$a$N5$$NMx$$$?4X?t$,M_$7$$$G$7$g(B +$B$&!#$3$l$,$=$N5$$NMx$$$?4X?t$G$9(B: + +@lisp + (defun my-gnus-raze-spam () + "Submit SPAM to Vipul's Razor, then mark it as expirable." + (interactive) + (gnus-summary-show-raw-article) + (gnus-summary-save-in-pipe "razor-report -f -d") + (gnus-summary-mark-as-expirable 1)) +@end lisp + +@node Hashcash +@subsection Hashcash @cindex hashcash -@cindex spam Spam $B$H@o$&$?$a$N?7$7$$5;K!$O!"%a%C%;!<%8$rAw?.$9$k:]$K$$$/$P$/$+$NIiC4(B -$B$rAw?..5,LO$J6&F1BN$G$OLr$KN)$D$G(B -$B$7$g$&!#(B +$B$rAw?..5,LO$J6&F1BN$G$OLr$KN)$D$G$7$g$&!#(B + +$BA09`$NF;6qN`$,.$5$J%Q!<%;%s%F!<%8$N(B spam $B$,$$$D$bAGDL$j$7$F$7$^$&$3$H$r0UL#$7$^$9!#$=(B +$B$l$O$^$?!"$I$3$+$G$@$l$+$,$=$l$i$NF;6q$r99?7$9$k$?$a$K!"$?$/$5$s(B +$B$N(B spam $B$rFI$^$J$1$l$P$J$i$J$$$3$H$r$b0UL#$7$^$9!#(BHashcash $B$O$=$l$r2sHr(B +$B$7$^$9$,!"Be$o$j$K$"$J$?$,DL?.$9$k$9$Y$F$N?M$?$A$,!"$=$N;EAH$_$r;H$C$F$$(B +$B$k$3$H$,I,MW$G$9!#$"$J$?$Or(B (dogmatic) $B$NFs$D$N$N$P(B +$B$i$P$i$J$b$N$h$j6/NO$J$N$G$9!#(B @cindex X-Hashcash $B!V$$$/$P$/$+$NIiC4!W$H$O(B CPU $B;~4V$r>CHq$9$k$3$H$G!"6qBNE*$K$O0lDj?t$N%S%C(B diff --git a/texi/gnus.texi b/texi/gnus.texi index a566f9f..7807194 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -819,7 +819,6 @@ Various * Image Enhancements:: Modern versions of Emacs/XEmacs can display images. * Fuzzy Matching:: What's the big fuzz? * Thwarting Email Spam:: A how-to on avoiding unsolicited commercial email. -* Pay Hashcash:: Reduce spam by burning CPU time. * Various Various:: Things that are really various. Formatting Variables @@ -849,6 +848,12 @@ Picons * Hard Picons:: The way you should do it. You'll learn something. * Picon Useless Configuration:: Other variables you can trash/tweak/munge/play with. +Thwarting Email Spam + +* Anti-Spam Basics:: Simple steps to reduce the amount of spam. +* SpamAssassin:: How to use external anti-spam tools. +* Hashcash:: Reduce spam by burning CPU time. + Appendices * XEmacs:: Requirements for installing under XEmacs. @@ -14919,7 +14924,7 @@ Unlike Parmenides the @sc{imap} designers has decided that things that doesn't exist actually does exist. More specifically, @sc{imap} has this concept of marking articles @code{Deleted} which doesn't actually delete them, and this (marking them @code{Deleted}, that is) is what -nnimap does when you delete a article in Gnus (with @kbd{G DEL} or +nnimap does when you delete a article in Gnus (with @kbd{B DEL} or similar). Since the articles aren't really removed when we mark them with the @@ -14951,11 +14956,12 @@ articles or not. @item nnimap-importantize-dormant @vindex nnimap-importantize-dormant -If non-nil, marks dormant articles as ticked (as well), for other -@sc{imap} clients. Within Gnus, dormant articles will naturally still -(only) be marked as ticked. This is to make dormant articles stand -out, just like ticked articles, in other @sc{imap} clients. (In other -words, Gnus has two ``Tick'' marks and @sc{imap} has only one.) +If non-nil (the default), marks dormant articles as ticked (as well), +for other @sc{imap} clients. Within Gnus, dormant articles will +naturally still (only) be marked as dormant. This is to make dormant +articles stand out, just like ticked articles, in other @sc{imap} +clients. (In other words, Gnus has two ``Tick'' marks and @sc{imap} +has only one.) Probably the only reason for frobing this would be if you're trying enable per-user persistant dormant flags, using something like: @@ -18854,7 +18860,6 @@ four days, Gnus will decay the scores four times, for instance. * Image Enhancements:: Modern versions of Emacs/XEmacs can display images. * Fuzzy Matching:: What's the big fuzz? * Thwarting Email Spam:: A how-to on avoiding unsolicited commercial email. -* Pay Hashcash:: Reduce spam by burning CPU time. * Various Various:: Things that are really various. @end menu @@ -20675,7 +20680,20 @@ and one mail asking me to repent and find some god. This is annoying. -The way to deal with this is having Gnus split out all spam into a +@menu +* Anti-Spam Basics:: Simple steps to reduce the amount of spam. +* SpamAssassin:: How to use external anti-spam tools. +* Hashcash:: Reduce spam by burning CPU time. +@end menu + +@node Anti-Spam Basics +@subsection Anti-Spam Basics +@cindex email spam +@cindex spam +@cindex UCE +@cindex unsolicited commercial email + +One way of dealing with spam is having Gnus split out all spam into a @samp{spam} mail group (@pxref{Splitting Mail}). First, pick one (1) valid mail address that you can be reached at, and @@ -20742,15 +20760,103 @@ to non-existent domains is yucky, in my opinion. -@node Pay Hashcash -@section Pay Hashcash +@node SpamAssassin +@subsection SpamAssassin, Vipul's Razor, DCC, etc +@cindex SpamAssassin +@cindex Vipul's Razor +@cindex DCC + +The days where the hints in the previous section was sufficient in +avoiding spam is coming to an end. There are many tools out there +that claim to reduce the amount of spam you get. This section could +easily become outdated fast, as new products replace old, but +fortunately most of these tools seem to have similar interfaces. Even +though this section will use SpamAssassin as an example, it should be +easy to adapt it to most other tools. + +If the tool you are using is not installed on the mail server, you +need to invoke it yourself. Ideas on how to use the +@code{:postscript} mail source parameter (@pxref{Mail Source +Specifiers}) follows. + +@lisp +(setq mail-sources + '((file :prescript "formail -bs spamassassin < /var/mail/%u") + (pop :user "jrl" + :server "pophost" + :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t"))) +@end lisp + +Once you managed to process your incoming spool somehow, thus making +the mail contain e.g. a header indicating it is spam, you are ready to +filter it out. Using normal split methods (@pxref{Splitting Mail}): + +@lisp +(setq nnmail-split-methods '(("spam" "^X-Spam-Flag: YES") + ...)) +@end lisp + +Or using fancy split methods (@pxref{Fancy Mail Splitting}): + +@lisp +(setq nnmail-split-methods 'nnmail-split-fancy + nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam") + ...)) +@end lisp + +Some people might not like the idea of piping the mail through various +programs using a @code{:prescript} (if some program is buggy, you +might lose all mail). If you are one of them, another solution is to +call the external tools during splitting. Example fancy split method: + +@lisp +(setq nnmail-split-fancy '(| (: kevin-spamassassin) + ...)) +(defun kevin-spamassassin () + (save-excursion + (let ((buf (or (get-buffer " *nnmail incoming*") + (get-buffer " *nnml move*")))) + (if (not buf) + (progn (message "Oops, cannot find message buffer") nil) + (set-buffer buf) + (if (eq 1 (call-process-region (point-min) (point-max) + "spamc" nil nil nil "-c")) + "spam"))))) +@end lisp + +That is about it. As some spam is likely to get through anyway, you +might want to have a nifty function to call when you happen to read +spam. And here is the nifty function: + +@lisp + (defun my-gnus-raze-spam () + "Submit SPAM to Vipul's Razor, then mark it as expirable." + (interactive) + (gnus-summary-show-raw-article) + (gnus-summary-save-in-pipe "razor-report -f -d") + (gnus-summary-mark-as-expirable 1)) +@end lisp + +@node Hashcash +@subsection Hashcash @cindex hashcash -@cindex spam A novel technique to fight spam is to require senders to do something costly for each message they send. This has the obvious drawback that -you cannot rely on that everyone uses this technique, since it is -optional, but it may be useful in smaller communities. +you cannot rely on that everyone in the world uses this technique, +since it is not part of the internet standards, but it may be useful +in smaller communities. + +While the tools in the previous section work well in practice, they +work only because the tools are constantly maintained and updated as +new form of spam appears. This means that a small percentage of spam +will always get through. It also means that somewhere, someone needs +to read lots of spam to update these tools. Hashcash avoids that, but +instead requires that everyone you communicate with supports the +scheme. You can view the two approaches as pragmatic vs dogmatic. +The approaches have their own advantages and disadvantages, but as +often in the real world, a combination of them is stronger than either +one of them separately. @cindex X-Hashcash The ``something costly'' is to burn CPU time, more specifically to