From e28ef5605c875b9bd7d82dfab6ffb7b82479c531 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Sat, 3 Apr 2004 00:48:05 +0000 Subject: [PATCH] Synch to No Gnus 200404021909. --- lisp/ChangeLog | 6 ++++++ lisp/spam.el | 16 +++++++++++++++- texi/ChangeLog | 5 +++++ texi/gnus-ja.texi | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ texi/gnus.texi | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 135 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eda2149..09feac0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-04-02 Teodor Zlatanov + + * spam.el (spam-set-difference): new function to replace + gnus-set-difference in spam.el + (spam-summary-prepare-exit): use spam-set-difference + 2004-03-29 Teodor Zlatanov * gnus-registry.el (gnus-registry-cache-file): updated to use diff --git a/lisp/spam.el b/lisp/spam.el index f2a1abc..0a4e494 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -718,7 +718,7 @@ Respects the process/prefix convention." (new-articles (spam-list-articles gnus-newsgroup-articles classification)) - (changed-articles (gnus-set-difference new-articles old-articles))) + (changed-articles (spam-set-difference new-articles old-articles))) ;; now that we have the changed articles, we go through the processors (dolist (processor-param spam-list-of-processors) (let ((processor (nth 0 processor-param)) @@ -785,6 +785,20 @@ Respects the process/prefix convention." (setq spam-old-ham-articles nil) (setq spam-old-spam-articles nil)) +(defun spam-set-difference (list1 list2) + "Return a set difference of LIST1 and LIST2. +When either list is nil, the other is returned." + (if (and list1 list2) + ;; we have two non-nil lists + (progn + (dolist (item (append list1 list2)) + (when (and (memq item list1) (memq item list2)) + (setq list1 (delq item list1)) + (setq list2 (delq item list2)))) + (append list1 list2)) + ;; if either of the lists was nil, return the other one + (if list1 list1 list2))) + (defun spam-mark-junk-as-spam-routine () ;; check the global list of group names spam-junk-mailgroups and the ;; group parameters diff --git a/texi/ChangeLog b/texi/ChangeLog index f3f46ec..f881452 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,8 @@ +2004-04-02 Teodor Zlatanov + From Hubert Chan + + * gnus.texi (SpamAssassin backend): added new node about SpamAssassin + 2004-03-29 Teodor Zlatanov * gnus.texi (Spam ELisp Package Sequence of Events): some clarifications diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 4260d99..e978f34 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -939,6 +939,7 @@ Filtering Spam Using The Spam ELisp Package * Blackholes:: * Regular Expressions Header Matching:: * Bogofilter:: +* SpamAssassin backend:: * ifile spam filtering:: * spam-stat spam filtering:: * SpamOracle:: @@ -21697,6 +21698,7 @@ Spam $B5-;v$r8+$?$H$-$O$$$D$G$b!"%0%k!<%W$rH4$1$kA0$KI,$:(B @kbd{M-d} $B$G$=$ * Blackholes:: * Regular Expressions Header Matching:: * Bogofilter:: +* SpamAssassin backend:: * ifile spam filtering:: * spam-stat spam filtering:: * SpamOracle:: @@ -22609,6 +22611,59 @@ Bogofilter $B$N%a!<%kJ,N`4o$O!"0U?^$HL\E*$NE@$G(B @command{ifile} $B$K;w$F$$$ $B$S(B @code{spam-use-bogofilter-headers} $BJQ?t$,Ds6!$5$l$^$9!#$3$N5!G=$r8!::(B $B$9$k$?$a$K(B Bogofilter $B$N%P!<%8%g%s(B 0.9.2.1 $B$,;H$o$l$^$7$?!#(B +@node SpamAssassin backend +@subsubsection SpamAssassin backend +@cindex spam filtering +@cindex spamassassin, spam filtering +@cindex spam + +@defvar spam-use-spamassassin + +@code{spam-split} $B$K(B SpamAssassin $B$r;H$$$?$$>l9g$O!"$3$NJQ?t$r%;%C%H$7$F(B +$B2<$5$$!#(B + +SpamAssassin $B$O!"%Y%$%8%"%s%U%#%k%?$rFbJq$9$k5,B'$HJ,@O$N%;%C%H$K4p$E$$(B +$B$F!"$=$l$>$l$N5-;v$N%9%3%"$r:[Dj$7$^$9!#%Y%$%8%"%s%U%#%k%?$O!"(Bspam $B5-;v(B +$B$N(B @samp{$} $B0u$r4XO"$5$;$k$3$H$K$h$j71N}$9$k$3$H$,$G$-$^$9!#(BSpam $B$N%9%3(B +$B%"$O!"35N,%b!<%I$G(B @kbd{S t} $B%3%^%s%I$r;H$&$3$H$K$h$C$F8+$k$3$H$,$G$-$^(B +$B$9!#(B + +$B$3$NJQ?t$r%;%C%H$9$k$H!"$=$l$>$l$N5-;v$O(B @code{spam-split} $B$,8F$P$l$k$H(B +$B$-$K(B SpamAssassin $B$K$h$C$F=hM}$5$l$^$9!#%a!<%k$,(B SpamAssassin $B$G=hM}$5$l(B +$B$k$h$&$K$J$C$F$$$k>l9g$K!"C1$K(B SpamAssassin $B%X%C%@!<$r;H$$$?$$$N$J$i$P!"(B +$BBe$o$j$K(B @code{spam-use-spamassassin-headers} $B$r%;%C%H$7$F2<$5$$!#(B + +@code{spam-use-spamassassin-headers} $B$r;H$&>l9g!"$3$l$rM-8z$K$7$F$O$$$1(B +$B$^$;$s!#(B + +@end defvar + +@defvar spam-use-spamassassin-headers + +$B%a!<%k$,(B SpamAssassin $B$G=hM}$5$l$k$h$&$K$J$C$F$$$k>l9g$K!"(B +SpamAssassin $B%X%C%@!<$K4p$E$$$F(B @code{spam-split} $B$KJ,3d$r9T$J$o$;$?$$$N(B +$B$J$i$P!"$3$NJQ?t$r%;%C%H$7$F2<$5$$!#(B + +@code{spam-use-spamassassin} $B$r;H$&>l9g!"$3$l$rM-8z$K$7$F$O$$$1$^$;$s!#(B + +@end defvar + +@defvar spam-spamassassin-path + +$B$3$NJQ?t$O(B SpamAssassin $B$NpJs$O!"(B +SpamAssassin $B$N%I%-%e%a%s%H$r8+$F2<$5$$!#(B + +@end defvar + +SpamAssassin $B$O!"(Bspam $B$rF1Dj$9$k$?$a$K9-HO$JJ,@O$r9T$J$&!"6/NO$GM;DL@-$N(B +$B$"$k(B spam $B_I2a4o$G$9!#(BSpamAssassin $B$,Ds6!$9$k(B ham $B$H(B spam $B$N%W%m%;%C%5!<(B +$B$r;H$&$+!"$"$k$$$O4{$K$=$l$i$,5-;v$KE,MQ:Q$_$+$I$&$+$r!"(B +@code{spam-use-spamassassin} $B$H(B @code{spam-use-spamassassin-headers} $BJQ(B +$B?t$G(B @code{spam-split} $B$K;X<($7$^$9!#$3$N5!G=$r8!::$9$k$?$a(B +$B$K(B SpamAssassin $B$N%P!<%8%g%s(B 2.63 $B$,;H$o$l$^$7$?!#(B + @node ifile spam filtering @subsubsection ifile $B$K$h$k(B spam $B$N_I2a(B @cindex spam filtering diff --git a/texi/gnus.texi b/texi/gnus.texi index 76200e4..77fcd29 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -22541,6 +22541,7 @@ group. * Blackholes:: * Regular Expressions Header Matching:: * Bogofilter:: +* SpamAssassin backend:: * ifile spam filtering:: * spam-stat spam filtering:: * SpamOracle:: @@ -23457,6 +23458,59 @@ variables to indicate to spam-split that Bogofilter should either be used, or has already been used on the article. The 0.9.2.1 version of Bogofilter was used to test this functionality. +@node SpamAssassin backend +@subsubsection SpamAssassin backend +@cindex spam filtering +@cindex spamassassin, spam filtering +@cindex spam + +@defvar spam-use-spamassassin + +Set this variable if you want @code{spam-split} to use SpamAssassin. + +SpamAssassin assigns a score to each article based on a set of rules +and tests, including a Bayesian filter. The Bayesian filter can be +trained by associating the @samp{$} mark for spam articles. The +spam score can be viewed by using the command @kbd{S t} in summary +mode. + +If you set this variable, each article will be processed by +SpamAssassin when @code{spam-split} is called. If your mail is +preprocessed by SpamAssassin, and you want to just use the +SpamAssassin headers, set @code{spam-use-spamassassin-headers} +instead. + +You should not enable this is you use +@code{spam-use-spamassassin-headers}. + +@end defvar + +@defvar spam-use-spamassassin-headers + +Set this variable if your mail is preprocessed by SpamAssassin and +want @code{spam-split} to split based on the SpamAssassin headers. + +You should not enable this is you use @code{spam-use-spamassassin}. + +@end defvar + +@defvar spam-spamassassin-path + +This variable points to the SpamAssassin executable. If you have +@code{spamd} running, you can set this variable to the @code{spamc} +executable for faster processing. See the SpamAssassin documentation +for more information on @code{spamd}/@code{spamc}. + +@end defvar + +SpamAssassin is a powerful and flexible spam filter that uses a wide +variety of tests to identify spam. A ham and a spam processors are +provided, plus the @code{spam-use-spamassassin} and +@code{spam-use-spamassassin-headers} variables to indicate to +spam-split that SpamAssassin should be either used, or has already +been used on the article. The 2.63 version of SpamAssassin was used +to test this functionality. + @node ifile spam filtering @subsubsection ifile spam filtering @cindex spam filtering -- 1.7.10.4