+2003-01-27 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * 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 <harder@ifa.au.dk>
* gnus-util.el (gnus-kill-buffer): Remove buffer from gnus-buffers
: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)
: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")
(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)
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)))
\f
(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 ()
+2003-01-27 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * gnus.texi: replace `H' mark with `$' mark
+ (Blackholes): add spam-blackhole-good-server-regex variable
+
2003-01-26 Simon Josefsson <jas@extundo.com>
* sieve.texi (Installation): Extension .sv is also used.
@findex gnus-summary-mark-as-spam
@code{gnus-summary-mark-as-spam}\e$B!#\e(B
-\e$B8=:_$N5-;v$K\e(B spam \e$B$H$7$F0u$rIU$1!"$=$l$r\e(B @samp{H} \e$B0u$GI=<($7$^$9!#\e(B
+\e$B8=:_$N5-;v$K\e(B spam \e$B$H$7$F0u$rIU$1!"$=$l$r\e(B @samp{$} \e$B0u$GI=<($7$^$9!#\e(B
Spam \e$B5-;v$r8+$?$H$-$O$$$D$G$b!"%0%k!<%W$rH4$1$kA0$KI,$:\e(B @kbd{M-d} \e$B$G$=$N\e(B
\e$B35N,9T$K0u$rIU$1$k$h$&$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B
\e$BI8K\$H$7$F3X=,$7$^$9!#\e(B
\e$B%a%C%;!<%8$OB>$N$$$m$$$m$JJ}K!$K$h$C$F$b>C5n$5$l$k$+$b$7$l$^$;$s$7!"\e(B
\e$B5-;v$O\e(B spam \e$B%W%m%;%C%5!<$KAw$i$l!"$=$l$i$r\e(B spam \e$B$NI8K\$H$7$F3X=,$7$^$9!#\e(B
\e$B0U?^E*$K$?$/$5$s$N>C5n$r9T$J$&$H!"$?$^$K$=$l$O8+$F$$$J$$\e(B @samp{K} \e$B0u$,IU\e(B
\e$B$$$?5-;v$G=*$o$k$+$b$7$l$^$;$s!#$=$7$F$=$l$i$O6vA3$K\e(B spam \e$B$r4^$s$G$$$k$+\e(B
-\e$B$b$7$l$^$;$s!#:G$bNI$$$N$O!"K\Ev$N\e(B spam \e$B$K\e(B @samp{H} \e$B$,IU$$$F$$$F!"B>$K2?\e(B
+\e$B$b$7$l$^$;$s!#:G$bNI$$$N$O!"K\Ev$N\e(B spam \e$B$K\e(B @samp{$} \e$B$,IU$$$F$$$F!"B>$K2?\e(B
\e$B$bL5$$$3$H$r3N$+$a$k$3$H$G$9!#\e(B
@emph{Spam} \e$B%0%k!<%W$rH4$1$k$H$-$K!"\e(Bspam \e$B0u$,IU$$$F$$$k$9$Y$F$N5-;v\e(B
@end defvar
+@defvar spam-blackhole-good-server-regex
+
+\e$B%V%i%C%/%[!<%k!&%5!<%P!<$N%j%9%H$H>H9g$5$l$F$O$J$i$J$$\e(B IP \e$B$N@55,I=8=!#\e(B
+@code{nil} \e$B$K@_Dj$5$l$k$HL58z$G$9!#\e(B
+
+@end defvar
+
@defvar spam-use-dig
@code{dns.el} \e$B%Q%C%1!<%8$NBe$o$j$K\e(B @code{dig.el} \e$B%Q%C%1!<%8$r;H$$$^$9!#\e(B
Eric Raymond \e$B$N?WB.$J\e(B Bogofilter \e$B$r\e(B @code{spam-split} \e$B$K;HMQ$7$?$$>l9g$O!"\e(B
\e$B$3$NJQ?t$r%;%C%H$7$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spam
@code{gnus-summary-mark-as-spam}.
-Mark current article as spam, showing it with the @samp{H} mark.
+Mark current article as spam, showing it with the @samp{$} mark.
Whenever you see a spam article, make sure to mark its summary line
with @kbd{M-d} before leaving the group. This is done automatically
for unread articles in @emph{spam} groups.
default.
In spam groups, all messages are considered to be spam by default:
-they get the @samp{H} mark when you enter the group. You must review
-these messages from time to time and remove the @samp{H} mark for
-every message that is not spam after all. To remove the @samp{H}
+they get the @samp{$} mark when you enter the group. You must review
+these messages from time to time and remove the @samp{$} mark for
+every message that is not spam after all. To remove the @samp{$}
mark, you can use @kbd{M-u} to "unread" the article, or @kbd{d} for
declaring it read the non-spam way. When you leave a group, all
-spam-marked (@samp{H}) articles are sent to a spam processor which
+spam-marked (@samp{$}) articles are sent to a spam processor which
will study them as spam samples.
Messages may also be deleted in various other ways, and unless
to a spam processor, which will study these as spam samples. If you
explicit kill a lot, you might sometimes end up with articles marked
@samp{K} which you never saw, and which might accidentally contain
-spam. Best is to make sure that real spam is marked with @samp{H},
+spam. Best is to make sure that real spam is marked with @samp{$},
and nothing else.
When you leave a @emph{spam} group, all spam-marked articles are
@end defvar
+@defvar spam-blackhole-good-server-regex
+
+A regular expression for IPs that should not be checked against the
+blackhole server list. When set to nil, it has no effect.
+
+@end defvar
+
@defvar spam-use-dig
Use the @code{dig.el} package instead of the @code{dns.el} package.
Set this variable if you want @code{spam-split} to use Eric Raymond's
speedy Bogofilter.
-With a minimum of care for associating the @samp{H} mark for spam
+With a minimum of care for associating the @samp{$} mark for spam
articles only, Bogofilter training all gets fairly automatic. You
should do this until you get a few hundreds of articles in each
category, spam or not. The command @kbd{S t} in summary mode, either