From 9583793cac5d1e2eacd29d1847596d5e84e19f87 Mon Sep 17 00:00:00 2001 From: Teodor Zlatanov Date: Thu, 6 Mar 2003 16:06:32 +0000 Subject: [PATCH] (spam-bogofilter-register-with-bogofilter): use spam-bogofilter-spam-switch and spam-bogofilter-ham-switch (spam-bogofilter-spam-switch, spam-bogofilter-ham-switch): new custom variables to replace "-s" and "-n" --- lisp/ChangeLog | 4 ++++ lisp/spam.el | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 40b9c22ab..7e261c60d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -9,6 +9,10 @@ * spam.el: add spam-maybe-spam-stat-load to gnus-get-top-new-news-hook, remove it from gnus-get-new-news-hook + (spam-bogofilter-register-with-bogofilter): use + spam-bogofilter-spam-switch and spam-bogofilter-ham-switch + (spam-bogofilter-spam-switch, spam-bogofilter-ham-switch): new + custom variables to replace "-s" and "-n" * gnus-group.el (gnus-group-get-new-news): call the new gnus-get-top-new-news-hook hook diff --git a/lisp/spam.el b/lisp/spam.el index 4afcb07e5..35f221362 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -262,6 +262,16 @@ your main source of newsgroup names." :type 'string :group 'spam-bogofilter) +(defcustom spam-bogofilter-spam-switch "-s" + "The switch that Bogofilter uses to register spam messages." + :type 'string + :group 'spam-bogofilter) + +(defcustom spam-bogofilter-ham-switch "-n" + "The switch that Bogofilter uses to register ham messages." + :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 @@ -648,7 +658,8 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (if spam-use-dig (let ((query-result (query-dig query-string))) (when query-result - (gnus-message 5 "(DIG): positive blackhole check '%s'" 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 @@ -969,7 +980,8 @@ Uses `gnus-newsgroup-name' if category is nil (for ham registration)." (defun spam-bogofilter-register-with-bogofilter (article-string spam) "Register an article, given as a string, as spam or non-spam." (when (stringp article-string) - (let ((switch (if spam "-s" "-n"))) + (let ((switch (if spam spam-bogofilter-spam-switch + spam-bogofilter-ham-switch))) (with-temp-buffer (insert article-string) (if spam-bogofilter-database-directory -- 2.25.1