: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
(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
;; Add hooks for loading and saving the spam stats
(add-hook 'gnus-save-newsrc-hook 'spam-maybe-spam-stat-save)
- (add-hook 'gnus-get-new-news-hook 'spam-maybe-spam-stat-load)
+ (add-hook 'gnus-get-top-new-news-hook 'spam-maybe-spam-stat-load)
(add-hook 'gnus-startup-hook 'spam-maybe-spam-stat-load))
(file-error (progn
(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