From: yamaoka Date: Fri, 3 Oct 2003 22:14:22 +0000 (+0000) Subject: Synch to Gnus 200310031858. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=18e59665f777faad9b85cdaffec9e29311d4ba4d;p=elisp%2Fgnus.git- Synch to Gnus 200310031858. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 25fb007..7af98bf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2003-10-03 Teodor Zlatanov + + * spam.el (spam-check-blackholes): exit the loop if matches are + found (idea from Adrian Lanz ) + (spam-check-bogofilter-headers, spam-check-blackholes, spam-check-BBDB) + (spam-from-listed-p): use nnmail-fetch-field instead of message-fetch-field + + 2003-10-03 Katsumi Yamaoka * mm-decode.el (mm-attachment-file-modes): Change the default diff --git a/lisp/spam.el b/lisp/spam.el index a12d45e..c592b51 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -762,7 +762,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (defun spam-check-blackholes () "Check the Received headers for blackholed relays." - (let ((headers (message-fetch-field "received")) + (let ((headers (nnmail-fetch-field "received")) ips matches) (when headers (with-temp-buffer @@ -780,19 +780,20 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (dolist (ip ips) (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)))))))) + (unless matches + (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))) @@ -844,7 +845,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (defun spam-check-BBDB () "Mail from people in the BBDB is classified as ham or non-spam" - (let ((who (message-fetch-field "from"))) + (let ((who (nnmail-fetch-field "from"))) (when who (setq who (cadr (gnus-extract-address-components who))) (if (bbdb-search-simple nil who) @@ -1045,7 +1046,7 @@ Uses `gnus-newsgroup-name' if category is nil (for ham registration)." (nreverse contents)))) (defun spam-from-listed-p (cache) - (let ((from (message-fetch-field "from")) + (let ((from (nnmail-fetch-field "from")) found) (while cache (let ((address (pop cache))) @@ -1089,7 +1090,7 @@ Uses `gnus-newsgroup-name' if category is nil (for ham registration)." ;;;; Bogofilter (defun spam-check-bogofilter-headers (&optional score) - (let ((header (message-fetch-field spam-bogofilter-header))) + (let ((header (nnmail-fetch-field spam-bogofilter-header))) (when header ; return nil when no header (if score ; scoring mode (if (string-match "spamicity=\\([0-9.]+\\)" header)