From: yamaoka Date: Tue, 1 Oct 2002 01:35:26 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_8-04-quimby~10 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0b0d961a30dfbd24a96808491445569058dcb99;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/spam.el b/lisp/spam.el index 0e45d38..1e6bc45 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -253,21 +253,22 @@ The regular expression is matched against the address.") (insert address "\n") (save-buffer))) +;;; returns nil if the sender is in the whitelist, spam-split-group otherwise (defun spam-check-whitelist () ;; FIXME! Should it detect when file timestamps change? (unless spam-whitelist-cache (setq spam-whitelist-cache (spam-parse-list spam-whitelist))) - (and (spam-from-listed-p spam-whitelist-cache) t)) + (if (spam-from-listed-p spam-whitelist-cache) nil spam-split-group)) ;;; copied from code by Alexander Kotelnikov ;; FIXME: assumes that bbdb.el is loaded -;; FIXME: not sure about the logic... +;; FIXME: broken right now, if the "from" field can't be retrieved (defun spam-check-bbdb () - "We want people, who are in bbdb not to be splitted to spam" - (let ((who (cadr - (gnus-extract-address-components (message-fetch-field "from")) - ))) - (bbdb-search (bbdb-records) nil nil (regexp-quote who)))) + "We want messages from people who are in the BBDB not to be split to spam" + (let ((who (message-fetch-field "from"))) + (when who + (setq who (regexp-quote (cadr (gnus-extract-address-components who)))) + (if (bbdb-search (bbdb-records) nil nil who) nil spam-split-group)))) (defun spam-check-blacklist () ;; FIXME! Should it detect when file timestamps change?