+2002-07-06 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * 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 <yamaoka@jpl.org>
* gnus-sum.el (gnus-summary-toggle-header): Show headers anyway;
(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))))))
(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))))
;; 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.
(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)
;; 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
(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))
(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))))
+2002-07-07 Simon Josefsson <jas@extundo.com>
+
+ * 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 <yamaoka@jpl.org>
* gnus.texi (NNTP): Doc fix.
* Mail Sources:: Gnus \e$B$K$I$3$+$i%a!<%k$r<h$C$F$/$k$+$rCN\e(B
\e$B$i$;$k\e(B
* Mail Back End Variables:: \e$B%a!<%k$N07$$$r%+%9%?%^%$%:$9$k$?$a$NJQ?t\e(B
-* Fancy Mail Splitting:: Gnus \e$B$OF~$C$FMh$?%a!<%k$NLS$N$h$&$JJ,N%\e(B
- \e$B$r$9$k$3$H$,$G$-$k\e(B
+* Fancy Mail Splitting:: Gnus \e$B$OF~$C$FMh$?%a!<%k$r!"?H$NLS$N$h$@\e(B
+ \e$B$D$h$&$JJ,3d$r$9$k$3$H$,$G$-$k\e(B
* Group Mail Splitting:: \e$B%a!<%kJ,3d$r6nF0$9$k$?$a$K%0%k!<%W%+%9%?\e(B
\e$B%^%$%:$r;H$&\e(B
* Incorporating Old Mail:: \e$B$"$J$?$,;}$C$F$$$k8E$$%a!<%k$r$I$&$9$k$+\e(B?
* Image Enhancements:: \e$B:G?7$N\e(B Emacs/XEmacs \e$B$O3($rI=<($G$-$k\e(B
* Fuzzy Matching:: \e$BBg$-$JLJLS$C$F2?\e(B?
* Thwarting Email Spam:: \e$BM>7W$J>&6HE*EE;R%a!<%k$rHr$1$kJ}K!\e(B
-* Pay Hashcash:: CPU \e$B;~4V$rHq$d$7$F\e(B spam \e$BB`<#$9$k\e(B
* Various Various:: \e$BK\Ev$K$$$m$$$m$J$b$N\e(B
Formatting Variables
* Picon Useless Configuration:: \e$B$=$NB>$N$V$C2u$7$?$j$R$M$C$?$j$$$8$C$?\e(B
\e$B$jM7$s$@$j$9$kJQ?t\e(B
+Thwarting Email Spam
+
+* Anti-Spam Basics:: \e$B$?$/$5$s$N\e(B spam \e$B$r8:$i$94JC1$JJ}K!\e(B
+* SpamAssassin:: Spam \e$BBP:v%D!<%k$N;H$$J}\e(B
+* Hashcash:: CPU \e$B;~4V$rHq$d$7$F\e(B spam \e$BB`<#$9$k\e(B
+
Appendices
* XEmacs:: XEmacs \e$B$G%$%s%9%H!<%k$9$k$?$a$NMW7o\e(B
* Mail Sources:: Gnus \e$B$K$I$3$+$i%a!<%k$r<h$C$F$/$k$+$rCN\e(B
\e$B$i$;$k\e(B
* Mail Back End Variables:: \e$B%a!<%k$N07$$$r%+%9%?%^%$%:$9$k$?$a$NJQ?t\e(B
-* Fancy Mail Splitting:: Gnus \e$B$OF~$C$FMh$?%a!<%k$NLS$N$h$&$JJ,N%\e(B
- \e$B$r$9$k$3$H$,$G$-$k\e(B
+* Fancy Mail Splitting:: Gnus \e$B$OF~$C$FMh$?%a!<%k$r!"?H$NLS$N$h$@\e(B
+ \e$B$D$h$&$JJ,3d$r$9$k$3$H$,$G$-$k\e(B
* Group Mail Splitting:: \e$B%a!<%kJ,3d$r6nF0$9$k$?$a$K%0%k!<%W%+%9%?\e(B
\e$B%^%$%:$r;H$&\e(B
* Incorporating Old Mail:: \e$B$"$J$?$,;}$C$F$$$k8E$$%a!<%k$r$I$&$9$k$+\e(B?
\e$B$OB8:_$7$F$$$k$H7h$a$^$7$?!#$b$C$H>\$7$/@bL@$9$k$H!"\e(B@sc{imap} \e$B$O<B:]$K$O\e(B
\e$B5-;v$r>C5n$7$J$$!"5-;v$K\e(B @code{Deleted} \e$B$H$$$&0u$rIU$1$k35G0$,$"$j!"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N15-;v$O85!9$9$G$K\e(B
+\e$BJ]N15-;v$H$7$F$N$_0u$,IU$1$i$l$F$$$^$9!#$3$l$O!"B>$N\e(B @sc{imap} \e$B%/%i%$%"\e(B
+\e$B%s%H$K$*$1$kJ]N15-;v$r!"$"$?$+$b0uIU$-$N$h$&$K$-$oN)$?$;$^$9!#\e(B(\e$BJL$N8@$$\e(B
+\e$BJ}$r$9$k$H!"\e(Bgnus \e$B$OFs$D$N0u$rIU$1!"\e(B@sc{imap} \e$B$O$?$C$?0l$D$@$H$$$&$3$H$G\e(B
+\e$B$9!#\e(B)
\e$B$?$V$s$3$l$r$$$8$j$^$o$9$N$O!"$"$J$?$,%f!<%6C10L$NJ]N1%U%i%0$rIU$1$h$&$H\e(B
\e$B$9$k$@$1$NM}M3$K$h$k$G$7$g$&!#$3$s$J46$8$G\e(B:
* Image Enhancements:: \e$B:G?7$N\e(B Emacs/XEmacs \e$B$O3($rI=<($G$-$k\e(B
* Fuzzy Matching:: \e$BBg$-$JLJLS$C$F2?\e(B?
* Thwarting Email Spam:: \e$BM>7W$J>&6HE*EE;R%a!<%k$rHr$1$kJ}K!\e(B
-* Pay Hashcash:: CPU \e$B;~4V$rHq$d$7$F\e(B spam \e$BB`<#$9$k\e(B
* Various Various:: \e$BK\Ev$K$$$m$$$m$J$b$N\e(B
@end menu
\e$B$3$l$OITL{2w$G$9!#\e(B
-\e$B$3$l$KBP=h$9$kJ}K!$O!"\e(Bgnus \e$B$KA4$F$N\e(B spam \e$B$r\e(B @samp{spam} \e$B%a!<%k%0%k!<%W$K\e(B
-\e$BJ,N%$5$;$F$7$^$&$3$H$G$9\e(B (@pxref{Splitting Mail})\e$B!#\e(B
+@menu
+* Anti-Spam Basics:: \e$B$?$/$5$s$N\e(B spam \e$B$r8:$i$94JC1$JJ}K!\e(B
+* SpamAssassin:: Spam \e$BBP:v%D!<%k$N;H$$J}\e(B
+* Hashcash:: CPU \e$B;~4V$rHq$d$7$F\e(B spam \e$BB`<#$9$k\e(B
+@end menu
+
+@node Anti-Spam Basics
+@subsection Spam \e$BB`<#$N4pAC\e(B
+@cindex email spam
+@cindex spam
+@cindex UCE
+@cindex unsolicited commercial email
+
+Spam \e$B$KBP=h$9$k0l$D$NJ}K!$O!"\e(Bgnus \e$B$KA4$F$N\e(B spam \e$B$r\e(B @samp{spam} \e$B%a!<%k%0\e(B
+\e$B%k!<%W$KJ,N%$5$;$F$7$^$&$3$H$G$9\e(B (@pxref{Splitting Mail})\e$B!#\e(B
\e$B:G=i$K!"$"$J$?$KE~C#@-$N$"$k@5$7$$%a!<%k%"%I%l%9$r0l$DA*$S!"$=$l$rA4$F$N\e(B
\e$B$"$J$?$N%K%e!<%95-;v$N\e(B @code{From} \e$B%X%C%@!<$KF~$l$^$9!#\e(B(\e$B$3$3$G$O\e(B
\e$B$3$H$OA4$/$"$j$^$;$s!#F@!9>uBV$G$9!#;d$N0U8+$H$7$F$O!"\e(B@code{From} \e$B%X%C%@!<\e(B
\e$B$r56B$$7$FB8:_$7$J$$%I%a%$%s$KAw$i$;$k$N$O%-%?%J%$$G$9!#\e(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 \e$B$rHr$1$k$?$a$NA09`$N%R%s%H$,==J,$@$C$?F|!9$O2a$.5n$j$^$7$?!#:#$G$O\e(B
+\e$B<u$1<h$C$?$?$/$5$s$N\e(B spam \e$B$r8:$i$9$?$a$NB?$/$NF;6q$,$"$j$^$9!#$3$N9`$O?7\e(B
+\e$B5lCV$-49$($K$h$C$F$9$0$K;~BeCY$l$K$J$C$F$7$^$&$G$7$g$&$,!"9,$$$J$3$H$K$[\e(B
+\e$B$H$s$I$NF;6q$ON`;w$N%$%s%?!<%U%'!<%9$r;}$C$F$$$^$9!#$3$N9`$ONc$H$7\e(B
+\e$B$F\e(B SpamAssassin \e$B$r;H$C$F$$$^$9$,!"B>$N$[$H$s$I$NF;6q$K$b4JC1$KE,9g$9$k$O\e(B
+\e$B$:$G$9!#\e(B
+
+\e$B$b$7$"$J$?$,;H$&F;6q$,%a!<%k%5!<%P!<$K%$%s%9%H!<%k$5$l$F$$$J$$$J$i$P!"$"\e(B
+\e$B$J$?<+?H$,$=$l$r8F$S=P$9I,MW$,$"$j$^$9!#0J2<$K\e(B @code{:postscript} \e$B%a!<%k\e(B
+\e$B%=!<%9;X<(;R\e(B (@pxref{Mail Source Specifiers}) \e$B$r;H$&>l9g$N9M$(J}$r<($7$^\e(B
+\e$B$9!#\e(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
+
+\e$B$$$C$?$s%a!<%k$r<u$1$k%9%W!<%k$G!"Nc$($P\e(B spam \e$B$G$"$k$3$H$rI=<($9$k%X%C%@!<\e(B
+\e$B$r%a!<%k$K4^$a$k$h$&$K$7$F!"$=$l$r$U$k$$Mn$H$9=`Hw$r$7$^$9!#;H$&$N$OIaDL\e(B
+\e$B$NJ,3dJ}<0\e(B (@pxref{Splitting Mail}) \e$B$G$9\e(B:
+
+@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
+
+\e$B$$$/$i$+$N?M$?$A$O\e(B @code{:prescript} \e$B$r;H$C$F%a!<%k$r$$$m$s$J%W%m%0%i%`\e(B
+\e$B$K%Q%$%W$9$k$3$H$r7y$&$+$b$7$l$^$;$s\e(B (\e$B$b$72?$+$N%W%m%0%i%`$K%P%0$,$"$C$?\e(B
+\e$B$i!"$9$Y$F$N%a!<%k$r<:$C$F$7$^$&$+$b$7$l$^$;$s\e(B)\e$B!#$"$J$?$,$=$l$i$N0l?M$J\e(B
+\e$B$i$P!"JL$N2r$OJ,3d$9$k$H$-$K30It$NF;6q$r8F$V$3$H$G$9!#FC5iJ,3dJ}<0$NNc$G\e(B
+\e$B$9\e(B:
+
+@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
+
+\e$B0J>e$,$3$l$K4X$9$k$3$H$G$9!#$$$/$D$+$N\e(B spam \e$B$O$I$&$7$F$bAGDL$j$7$F$7$^$&\e(B
+\e$B$N$G!"\e(Bspam \e$B$rFI$`$O$a$K$J$C$?$H$-$K8F$V$?$a$N5$$NMx$$$?4X?t$,M_$7$$$G$7$g\e(B
+\e$B$&!#$3$l$,$=$N5$$NMx$$$?4X?t$G$9\e(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 \e$B$H@o$&$?$a$N?7$7$$5;K!$O!"%a%C%;!<%8$rAw?.$9$k:]$K$$$/$P$/$+$NIiC4\e(B
-\e$B$rAw?.<T$K6/$$$^$9!#$3$l$OG$0U$J$N$G!"$9$Y$F$N?M$,$3$N5;K!$r;H$&$3$H$OEv\e(B
-\e$B$F$K$G$-$J$$$H$$$&L@$i$+$J7gE@$,$"$j$^$9$,!">.5,LO$J6&F1BN$G$OLr$KN)$D$G\e(B
-\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X-Hashcash
\e$B!V$$$/$P$/$+$NIiC4!W$H$O\e(B CPU \e$B;~4V$r>CHq$9$k$3$H$G!"6qBNE*$K$O0lDj?t$N%S%C\e(B
* 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
* 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.
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
@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:
* 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
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
-@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