From: yamaoka Date: Wed, 5 Feb 2003 21:55:33 +0000 (+0000) Subject: Synch to Oort Gnus. X-Git-Tag: t-gnus-6_15_16-00-quimby~8 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4f91bfe2875995e5c7ad4ef092bc17be1560d73c;p=elisp%2Fgnus.git- Synch to Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a8d4886..86c5ae7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2003-02-05 Teodor Zlatanov + + * spam.el (spam-check-BBDB): no need to regexp-quote the argument + of bbdb-search-simple, use spam-use-BBDB-exclusive + (spam-check-whitelist): use spam-use-whitelist-exclusive + (spam-use-whitelist-exclusive): new variable affecting + spam-use-whitelist + (spam-use-BBDB-exclusive): new variable affecting spam-use-BBDB + 2003-02-05 Simon Josefsson * gnus-agent.el (gnus-agent-expire-days): Change default to nil. diff --git a/lisp/spam.el b/lisp/spam.el index 32b1a6b..7328c04 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -97,6 +97,13 @@ The regular expression is matched against the address." :type 'boolean :group 'spam) +(defcustom spam-use-whitelist-exclusive nil + "Whether whitelist-exclusive should be used by spam-split. +Exclusive whitelisting means that all messages from senders not in the whitelist +are considered spam." + :type 'boolean + :group 'spam) + (defcustom spam-use-blackholes nil "Whether blackholes should be used by spam-split." :type 'boolean @@ -125,6 +132,13 @@ Enable this if you want Gnus to invoke Bogofilter on new messages." :type 'boolean :group 'spam) +(defcustom spam-use-BBDB-exclusive nil + "Whether BBDB-exclusive should be used by spam-split. +Exclusive BBDB means that all messages from senders not in the BBDB are +considered spam." + :type 'boolean + :group 'spam) + (defcustom spam-use-ifile nil "Whether ifile should be used by spam-split." :type 'boolean @@ -632,13 +646,15 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (spam-enter-ham-BBDB (spam-fetch-field-from-fast article))))) (defun spam-check-BBDB () - "Mail from people in the BBDB is never considered spam" + "Mail from people in the BBDB is classified as ham or non-spam" (let ((who (message-fetch-field "from"))) (when who - (setq who (regexp-quote (cadr - (gnus-extract-address-components who)))) + (setq who (cadr (gnus-extract-address-components who))) (if (bbdb-search-simple nil who) - nil spam-split-group))))) + t + (if spam-use-BBDB-exclusive + spam-split-group + nil)))))) (file-error (progn (defalias 'bbdb-search-simple 'ignore) @@ -792,12 +808,16 @@ Uses `gnus-newsgroup-name' if category is nil (for ham registration)." (insert address "\n") (save-buffer))) -;;; returns nil if the sender is in the whitelist, spam-split-group otherwise +;;; returns t if the sender is in the whitelist, nil or 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))) - (if (spam-from-listed-p spam-whitelist-cache) nil spam-split-group)) + (if (spam-from-listed-p spam-whitelist-cache) + t + (if spam-use-whitelist-exclusive + spam-split-group + nil))) (defun spam-check-blacklist () ;; FIXME! Should it detect when file timestamps change?