From: yamaoka Date: Mon, 27 Jan 2003 22:18:10 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_16-00-quimby~24 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c0ae8a534d75be30f7b6c0b7f085430d94682e2;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8b61320..8d6fd55 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2003-01-27 Teodor Zlatanov + + * spam.el (spam-check-blackholes) + (spam-blackhole-good-server-regex): new variable to skip some IPs + when checking blackholes; use it + (spam-check-bogofilter-headers) + (spam-bogofilter-bogosity-positive-spam-header): new variable, in + case more X-Bogosity is used than just "Yes/No" + (spam-ham-move-routine): semi-fixed, only first article is + properly moved now + 2003-01-27 Jesper Harder * gnus-util.el (gnus-kill-buffer): Remove buffer from gnus-buffers diff --git a/lisp/spam.el b/lisp/spam.el index 75dcfe5..96896e8 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -152,6 +152,11 @@ All unmarked article in such group receive the spam mark on group entry." :type '(repeat (string :tag "Server")) :group 'spam) +(defcustom spam-blackhole-good-server-regex nil + "String matching IP addresses that should not be checked in the blackholes" + :type 'regexp + :group 'spam) + (defcustom spam-ham-marks (list 'gnus-del-mark 'gnus-read-mark 'gnus-killed-mark 'gnus-kill-file-mark 'gnus-low-score-mark) @@ -240,6 +245,11 @@ your main source of newsgroup names." :type 'string :group 'spam-bogofilter) +(defcustom spam-bogofilter-bogosity-positive-spam-header "^\\(Yes\\|Spam\\)" + "The regex on `spam-bogofilter-header' for positive spam identification." + :type 'regexp + :group 'spam-bogofilter) + (defcustom spam-bogofilter-database-directory nil "Directory path of the Bogofilter databases." :type '(choice (directory :tag "Location of the Bogofilter database directory") @@ -400,15 +410,15 @@ your main source of newsgroup names." (defun spam-ham-move-routine (&optional group) (let ((articles gnus-newsgroup-articles) article ham-mark-values mark) + (dolist (mark spam-ham-marks) (push (symbol-value mark) ham-mark-values)) - - (while articles - (setq article (pop articles)) - (when (and (memq mark ham-mark-values) + + (dolist (article articles) + (when (and (memq (gnus-summary-article-mark article) ham-mark-values) (stringp group)) - (let ((gnus-current-article article)) - (gnus-summary-move-article nil group)))))) + (let ((gnus-current-article article)) + (gnus-summary-move-article nil group)))))) (defun spam-generic-register-routine (spam-func ham-func) (let ((articles gnus-newsgroup-articles) @@ -572,18 +582,20 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." ips))) (dolist (server spam-blackhole-servers) (dolist (ip ips) - (let ((query-string (concat ip "." server))) - (if spam-use-dig - (let ((query-result (query-dig query-string))) - (when query-result - (gnus-message 5 "(DIG): positive blackhole check '%s'" query-result) - (push (list ip server query-result) - matches))) - ;; else, if not using dig.el - (when (query-dns query-string) - (gnus-message 5 "positive blackhole check") - (push (list ip server (query-dns query-string 'TXT)) - matches))))))) + (unless (and spam-blackhole-good-server-regex + (string-match spam-blackhole-good-server-regex ip)) + (let ((query-string (concat ip "." server))) + (if spam-use-dig + (let ((query-result (query-dig query-string))) + (when query-result + (gnus-message 5 "(DIG): positive blackhole check '%s'" query-result) + (push (list ip server query-result) + matches))) + ;; else, if not using dig.el + (when (query-dns query-string) + (gnus-message 5 "positive blackhole check") + (push (list ip server (query-dns query-string 'TXT)) + matches)))))))) (when matches spam-split-group))) @@ -843,12 +855,12 @@ Uses `gnus-newsgroup-name' if category is nil (for ham registration)." (defun spam-check-bogofilter-headers (&optional score) (let ((header (message-fetch-field spam-bogofilter-header))) (when (and header - (string-match "^Yes" header)) + (string-match spam-bogofilter-bogosity-positive-spam-header + header)) (if score (when (string-match "spamicity=\\([0-9.]+\\)" header) (match-string 1 header)) spam-split-group)))) - ;; return something sensible if the score can't be determined (defun spam-bogofilter-score () diff --git a/texi/ChangeLog b/texi/ChangeLog index 7b556a4..0df312b 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,8 @@ +2003-01-27 Teodor Zlatanov + + * gnus.texi: replace `H' mark with `$' mark + (Blackholes): add spam-blackhole-good-server-regex variable + 2003-01-26 Simon Josefsson * sieve.texi (Installation): Extension .sv is also used. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 042441a..eb8acb6 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -20892,7 +20892,7 @@ Spam $B$H@o$&$?$a$N?7$7$$5;K!$O!"%a%C%;!<%8$rAw?.$9$k:]$K$$$/$P$/$+$NIiC4(B @findex gnus-summary-mark-as-spam @code{gnus-summary-mark-as-spam}$B!#(B -$B8=:_$N5-;v$K(B spam $B$H$7$F0u$rIU$1!"$=$l$r(B @samp{H} $B0u$GI=<($7$^$9!#(B +$B8=:_$N5-;v$K(B spam $B$H$7$F0u$rIU$1!"$=$l$r(B @samp{$} $B0u$GI=<($7$^$9!#(B Spam $B5-;v$r8+$?$H$-$O$$$D$G$b!"%0%k!<%W$rH4$1$kA0$KI,$:(B @kbd{M-d} $B$G$=$N(B $B35N,9T$K0u$rIU$1$k$h$&$K$7$F2<$5$$!#$3$l$O(B @emph{spam} $B%0%k!<%W$NL$FI5-(B $B;v$KBP$7$F$O<+F0E*$K9T$J$o$l$^$9!#(B @@ -20941,12 +20941,12 @@ gnus $B$O$"$J$?$,e$N(B spam $B$O%G%#%U%)%k%H$G$OL$J,N`$G$9!#(B Spam $B%0%k!<%W$G$O!"%G%#%U%)%k%H$G$9$Y$F$N%a%C%;!<%8$,(B spam $B$G$"$k$H2rC$5$J$1$l$P$J$j$^$;$s!#(B@samp{H} $B0u$r>C$9$K$O(B @kbd{M-u} $B$G(B +@samp{$} $B0u$r>C$5$J$1$l$P$J$j$^$;$s!#(B@samp{$} $B0u$r>C$9$K$O(B @kbd{M-u} $B$G(B $B$=$N5-;v$r!VL$FI!W$K$9$k$+!"$"$k$$$O(B @kbd{d} $B$G(B spam $B$G$O$J$$$b$N$H$7$F(B $BFI$s$@$3$H$r@k8@$9$l$PNI$$$G$7$g$&!#%0%k!<%W$rH4$1$k$H$-!"$9$Y$F$N(B spam -$B0u(B (@samp{H}) $B$,IU$$$?5-;v$O(B spam $B%W%m%;%C%5!<$KAw$i$l!"$=$l$i$r(B spam $B$N(B +$B0u(B (@samp{$}) $B$,IU$$$?5-;v$O(B spam $B%W%m%;%C%5!<$KAw$i$l!"$=$l$i$r(B spam $B$N(B $BI8K\$H$7$F3X=,$7$^$9!#(B $B%a%C%;!<%8$OB>$N$$$m$$$m$JJ}K!$K$h$C$F$b>C5n$5$l$k$+$b$7$l$^$;$s$7!"(B @@ -20974,7 +20974,7 @@ Spam $B%0%k!<%W$G$O!"%G%#%U%)%k%H$G$9$Y$F$N%a%C%;!<%8$,(B spam $B$G$"$k$H2rC5n$r9T$J$&$H!"$?$^$K$=$l$O8+$F$$$J$$(B @samp{K} $B0u$,IU(B $B$$$?5-;v$G=*$o$k$+$b$7$l$^$;$s!#$=$7$F$=$l$i$O6vA3$K(B spam $B$r4^$s$G$$$k$+(B -$B$b$7$l$^$;$s!#:G$bNI$$$N$O!"K\Ev$N(B spam $B$K(B @samp{H} $B$,IU$$$F$$$F!"B>$K2?(B +$B$b$7$l$^$;$s!#:G$bNI$$$N$O!"K\Ev$N(B spam $B$K(B @samp{$} $B$,IU$$$F$$$F!"B>$K2?(B $B$bL5$$$3$H$r3N$+$a$k$3$H$G$9!#(B @emph{Spam} $B%0%k!<%W$rH4$1$k$H$-$K!"(Bspam $B0u$,IU$$$F$$$k$9$Y$F$N5-;v(B @@ -21170,6 +21170,13 @@ spam-check-bogofilter$B!"(Bspam-check-ifile $B$^$?$O(B spam-check-stat ($B$ @end defvar +@defvar spam-blackhole-good-server-regex + +$B%V%i%C%/%[!<%k!&%5!<%P!<$N%j%9%H$H>H9g$5$l$F$O$J$i$J$$(B IP $B$N@55,I=8=!#(B +@code{nil} $B$K@_Dj$5$l$k$HL58z$G$9!#(B + +@end defvar + @defvar spam-use-dig @code{dns.el} $B%Q%C%1!<%8$NBe$o$j$K(B @code{dig.el} $B%Q%C%1!<%8$r;H$$$^$9!#(B @@ -21225,12 +21232,12 @@ spam-check-bogofilter$B!"(Bspam-check-ifile $B$^$?$O(B spam-check-stat ($B$ Eric Raymond $B$N?WB.$J(B Bogofilter $B$r(B @code{spam-split} $B$K;HMQ$7$?$$>l9g$O!"(B $B$3$NJQ?t$r%;%C%H$7$F$/$@$5$$!#(B -Spam $B5-;v$@$1$N(B @samp{H} $B0u$r4XO"IU$1$k:G>.$N@$OC$K$h$C$F!"(BBogofilter $B%H(B +Spam $B5-;v$@$1$N(B @samp{$} $B0u$r4XO"IU$1$k:G>.$N@$OC$K$h$C$F!"(BBogofilter $B%H(B $B%l!<%K%s%0$O$9$Y$F$+$J$j<+F0E*$K$J$j$^$9!#3F%+%F%4%j!<$N(B spam $B$+$=$&$G$J(B -$B$$?tI4(B (a few hundreds) $B$N5-;v$rF~