From c0b0d961a30dfbd24a96808491445569058dcb99 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 1 Oct 2002 01:35:26 +0000 Subject: [PATCH] Synch with Oort Gnus. --- lisp/spam.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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? -- 1.7.10.4