projects
/
gnus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(spam-unregister-on-reregister): Add boolean variable.
[gnus]
/
lisp
/
spam.el
diff --git
a/lisp/spam.el
b/lisp/spam.el
index
d8643a8
..
c98fcf6
100644
(file)
--- a/
lisp/spam.el
+++ b/
lisp/spam.el
@@
-1,6
+1,7
@@
;;; spam.el --- Identifying spam
;;; spam.el --- Identifying spam
-;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Maintainer: Ted Zlatanov <tzz@lifelogs.com>
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Maintainer: Ted Zlatanov <tzz@lifelogs.com>
@@
-8,20
+9,18
@@
;; This file is part of GNU Emacs.
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software
;
you can redistribute it and/or modify
+;; GNU Emacs is free software
:
you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation
; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation
, either version 3 of the License, or
+;;
(at your option)
any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Commentary:
@@
-40,23
+39,26
@@
;;{{{ compilation directives and autoloads/requires
;;{{{ compilation directives and autoloads/requires
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(eval-when-compile (require 'cl))
(eval-when-compile (require 'cl))
-(eval-when-compile (require 'spam-report))
-(eval-when-compile (require 'hashcash))
+(require 'message) ;for the message-fetch-field functions
(require 'gnus-sum)
(require 'gnus-sum)
-
(require 'gnus-uu) ; because of key prefix issues
;;; for the definitions of group content classification and spam processors
(require 'gnus)
(require 'gnus-uu) ; because of key prefix issues
;;; for the definitions of group content classification and spam processors
(require 'gnus)
-(require 'message) ;for the message-fetch-field functions
+
+(eval-when-compile (require 'spam-report))
+(eval-when-compile (require 'hashcash))
;; for nnimap-split-download-body-default
(eval-when-compile (require 'nnimap))
;; autoload query-dig
;; for nnimap-split-download-body-default
(eval-when-compile (require 'nnimap))
;; autoload query-dig
-(eval-and-compile
- (autoload 'query-dig "dig"))
+(autoload 'query-dig "dig")
;; autoload spam-report
(eval-and-compile
;; autoload spam-report
(eval-and-compile
@@
-66,22
+68,20
@@
(autoload 'spam-report-resend "spam-report"))
;; autoload gnus-registry
(autoload 'spam-report-resend "spam-report"))
;; autoload gnus-registry
-(eval-and-compile
- (autoload 'gnus-registry-group-count "gnus-registry")
- (autoload 'gnus-registry-add-group "gnus-registry")
- (autoload 'gnus-registry-store-extra-entry "gnus-registry")
- (autoload 'gnus-registry-fetch-extra "gnus-registry"))
+(autoload 'gnus-registry-group-count "gnus-registry")
+(autoload 'gnus-registry-add-group "gnus-registry")
+(autoload 'gnus-registry-store-extra-entry "gnus-registry")
+(autoload 'gnus-registry-fetch-extra "gnus-registry")
-;; autoload query-dns
-(eval-and-compile
- (autoload 'query-dns "dns"))
+;; autoload dns-query
+(autoload 'dns-query "dns")
;;}}}
;;{{{ Main parameters.
(defvar spam-backends nil
"List of spam.el backends with all the pertinent data.
;;}}}
;;{{{ Main parameters.
(defvar spam-backends nil
"List of spam.el backends with all the pertinent data.
-Populated by
spam-install-backend-super
.")
+Populated by
`spam-install-backend-super'
.")
(defgroup spam nil
"Spam configuration."
(defgroup spam nil
"Spam configuration."
@@
-91,13
+91,13
@@
Populated by spam-install-backend-super.")
(defcustom spam-summary-exit-behavior 'default
"Exit behavior at the time of summary exit.
(defcustom spam-summary-exit-behavior 'default
"Exit behavior at the time of summary exit.
-Note that setting the
spam-use-move or spam-use-copy
backends on
+Note that setting the
`spam-use-move' or `spam-use-copy'
backends on
a group through group/topic parameters overrides this mechanism."
a group through group/topic parameters overrides this mechanism."
- :type '(choice (const 'default :tag
+ :type '(choice (const 'default :tag
"Move spam out of all groups. Move ham out of spam groups.")
"Move spam out of all groups. Move ham out of spam groups.")
- (const 'move-all :tag
+ (const 'move-all :tag
"Move spam out of all groups. Move ham out of all groups.")
"Move spam out of all groups. Move ham out of all groups.")
- (const 'move-none :tag
+ (const 'move-none :tag
"Never move spam or ham out of any groups."))
:group 'spam)
"Never move spam or ham out of any groups."))
:group 'spam)
@@
-124,8
+124,7
@@
a group through group/topic parameters overrides this mechanism."
(defcustom spam-split-symbolic-return-positive nil
"Whether `spam-split' should ALWAYS work with symbols or group names.
(defcustom spam-split-symbolic-return-positive nil
"Whether `spam-split' should ALWAYS work with symbols or group names.
-Do not set this if you use `spam-split' in a fancy split
- method."
+Do not set this if you use `spam-split' in a fancy split method."
:type 'boolean
:group 'spam)
:type 'boolean
:group 'spam)
@@
-139,7
+138,7
@@
without losing it to the automatic spam-marking process."
(defcustom spam-mark-ham-unread-before-move-from-spam-group nil
"Whether ham should be marked unread before it's moved.
(defcustom spam-mark-ham-unread-before-move-from-spam-group nil
"Whether ham should be marked unread before it's moved.
-The article is moved out of a spam group according to
ham-process-destination
.
+The article is moved out of a spam group according to
`ham-process-destination'
.
This variable is an official entry in the international Longest Variable Name
Competition."
:type 'boolean
This variable is an official entry in the international Longest Variable Name
Competition."
:type 'boolean
@@
-174,7
+173,7
@@
The regular expression is matched against the address."
:group 'spam)
(defcustom spam-use-dig t
:group 'spam)
(defcustom spam-use-dig t
- "Whether `query-dig' should be used instead of `
query-dns
'."
+ "Whether `query-dig' should be used instead of `
dns-query
'."
:type 'boolean
:group 'spam)
:type 'boolean
:group 'spam)
@@
-372,6
+371,7
@@
Only meaningful if you enable `spam-use-blackholes'."
:group 'spam)
;; backward-compatibility alias
(put 'spam-face 'face-alias 'spam)
:group 'spam)
;; backward-compatibility alias
(put 'spam-face 'face-alias 'spam)
+(put 'spam-face 'obsolete-face "22.1")
(defcustom spam-face 'spam
"Face for spam-marked articles."
(defcustom spam-face 'spam
"Face for spam-marked articles."
@@
-403,7
+403,7
@@
Only meaningful if you enable `spam-use-regex-body'."
:group 'spam)
(defcustom spam-summary-score-preferred-header nil
:group 'spam)
(defcustom spam-summary-score-preferred-header nil
- "Preferred header to use for
spam-summary-score
."
+ "Preferred header to use for
`spam-summary-score'
."
:type '(choice :tag "Header name"
(symbol :tag "SpamAssassin etc" X-Spam-Status)
(symbol :tag "Bogofilter" X-Bogosity)
:type '(choice :tag "Header name"
(symbol :tag "SpamAssassin etc" X-Spam-Status)
(symbol :tag "Bogofilter" X-Bogosity)
@@
-414,14
+414,18
@@
Only meaningful if you enable `spam-use-regex-body'."
"Spam ifile configuration."
:group 'spam)
"Spam ifile configuration."
:group 'spam)
-(defcustom spam-ifile-path (executable-find "ifile")
- "File path of the ifile executable program."
+(make-obsolete-variable 'spam-ifile-path 'spam-ifile-program
+ "Gnus 5.10.9 (Emacs 22.1)")
+(defcustom spam-ifile-program (executable-find "ifile")
+ "Name of the ifile program."
:type '(choice (file :tag "Location of ifile")
(const :tag "ifile is not installed"))
:group 'spam-ifile)
:type '(choice (file :tag "Location of ifile")
(const :tag "ifile is not installed"))
:group 'spam-ifile)
-(defcustom spam-ifile-database-path nil
- "File path of the ifile database."
+(make-obsolete-variable 'spam-ifile-database-path 'spam-ifile-database
+ "Gnus 5.10.9 (Emacs 22.1)")
+(defcustom spam-ifile-database nil
+ "File name of the ifile database."
:type '(choice (file :tag "Location of the ifile database")
(const :tag "Use the default"))
:group 'spam-ifile)
:type '(choice (file :tag "Location of the ifile database")
(const :tag "Use the default"))
:group 'spam-ifile)
@@
-449,8
+453,10
@@
your main source of newsgroup names."
"Spam bogofilter configuration."
:group 'spam)
"Spam bogofilter configuration."
:group 'spam)
-(defcustom spam-bogofilter-path (executable-find "bogofilter")
- "File path of the Bogofilter executable program."
+(make-obsolete-variable 'spam-bogofilter-path 'spam-bogofilter-program
+ "Gnus 5.10.9 (Emacs 22.1)")
+(defcustom spam-bogofilter-program (executable-find "bogofilter")
+ "Name of the Bogofilter program."
:type '(choice (file :tag "Location of bogofilter")
(const :tag "Bogofilter is not installed"))
:group 'spam-bogofilter)
:type '(choice (file :tag "Location of bogofilter")
(const :tag "Bogofilter is not installed"))
:group 'spam-bogofilter)
@@
-488,7
+494,8
@@
your main source of newsgroup names."
:group 'spam-bogofilter)
(defcustom spam-bogofilter-database-directory nil
:group 'spam-bogofilter)
(defcustom spam-bogofilter-database-directory nil
- "Directory path of the Bogofilter databases."
+ "Location of the Bogofilter database.
+When nil, use the default location."
:type '(choice (directory
:tag "Location of the Bogofilter database directory")
(const :tag "Use the default"))
:type '(choice (directory
:tag "Location of the Bogofilter database directory")
(const :tag "Use the default"))
@@
-498,8
+505,10
@@
your main source of newsgroup names."
"Spam bsfilter configuration."
:group 'spam)
"Spam bsfilter configuration."
:group 'spam)
-(defcustom spam-bsfilter-path (executable-find "bsfilter")
- "File path of the Bsfilter executable program."
+(make-obsolete-variable 'spam-bsfilter-path 'spam-bsfilter-program
+ "Gnus 5.10.9 (Emacs 22.1)")
+(defcustom spam-bsfilter-program (executable-find "bsfilter")
+ "Name of the Bsfilter program."
:type '(choice (file :tag "Location of bsfilter")
(const :tag "Bsfilter is not installed"))
:group 'spam-bsfilter)
:type '(choice (file :tag "Location of bsfilter")
(const :tag "Bsfilter is not installed"))
:group 'spam-bsfilter)
@@
-519,7
+528,7
@@
your main source of newsgroup names."
:type 'string
:group 'spam-bsfilter)
:type 'string
:group 'spam-bsfilter)
-(defcustom spam-bsfilter-ham-switch "--add-
ham
"
+(defcustom spam-bsfilter-ham-switch "--add-
clean
"
"The switch that Bsfilter uses to register ham messages."
:type 'string
:group 'spam-bsfilter)
"The switch that Bsfilter uses to register ham messages."
:type 'string
:group 'spam-bsfilter)
@@
-562,8
+571,10
@@
When nil, use the default spamoracle database."
"Spam SpamAssassin configuration."
:group 'spam)
"Spam SpamAssassin configuration."
:group 'spam)
-(defcustom spam-spamassassin-path (executable-find "spamassassin")
- "File path of the spamassassin executable program.
+(make-obsolete-variable 'spam-spamassassin-path
+ 'spam-spamassassin-program "Gnus 5.10.9 (Emacs 22.1)")
+(defcustom spam-assassin-program (executable-find "spamassassin")
+ "Name of the spamassassin program.
Hint: set this to \"spamc\" if you have spamd running. See the spamc and
spamd man pages for more information on these programs."
:type '(choice (file :tag "Location of spamc")
Hint: set this to \"spamc\" if you have spamd running. See the spamc and
spamd man pages for more information on these programs."
:type '(choice (file :tag "Location of spamc")
@@
-592,8
+603,10
@@
identification"
:type 'string
:group 'spam-spamassassin)
:type 'string
:group 'spam-spamassassin)
-(defcustom spam-sa-learn-path (executable-find "sa-learn")
- "File path of the sa-learn executable program."
+(make-obsolete-variable 'spam-sa-learn-path 'spam-sa-learn-program
+ "Gnus 5.10.9 (Emacs 22.1)")
+(defcustom spam-sa-learn-program (executable-find "sa-learn")
+ "Name of the sa-learn program."
:type '(choice (file :tag "Location of spamassassin")
(const :tag "spamassassin is not installed"))
:group 'spam-spamassassin)
:type '(choice (file :tag "Location of spamassassin")
(const :tag "spamassassin is not installed"))
:group 'spam-spamassassin)
@@
-608,17
+621,17
@@
order for SpamAssassin to recognize the new registered spam."
:group 'spam-spamassassin)
(defcustom spam-sa-learn-spam-switch "--spam"
:group 'spam-spamassassin)
(defcustom spam-sa-learn-spam-switch "--spam"
- "The switch that sa-learn uses to register spam messages"
+ "The switch that sa-learn uses to register spam messages
.
"
:type 'string
:group 'spam-spamassassin)
(defcustom spam-sa-learn-ham-switch "--ham"
:type 'string
:group 'spam-spamassassin)
(defcustom spam-sa-learn-ham-switch "--ham"
- "The switch that sa-learn uses to register ham messages"
+ "The switch that sa-learn uses to register ham messages
.
"
:type 'string
:group 'spam-spamassassin)
(defcustom spam-sa-learn-unregister-switch "--forget"
:type 'string
:group 'spam-spamassassin)
(defcustom spam-sa-learn-unregister-switch "--forget"
- "The switch that sa-learn uses to unregister messages messages"
+ "The switch that sa-learn uses to unregister messages messages
.
"
:type 'string
:group 'spam-spamassassin)
:type 'string
:group 'spam-spamassassin)
@@
-647,12
+660,12
@@
order for SpamAssassin to recognize the new registered spam."
:type 'string
:group 'spam-crm114)
:type 'string
:group 'spam-crm114)
-(defcustom spam-crm114-spam-strong-switch "--
UNKNOWN
"
+(defcustom spam-crm114-spam-strong-switch "--
unlearn
"
"The switch that CRM114 Mailfilter uses to unregister ham messages."
:type 'string
:group 'spam-crm114)
"The switch that CRM114 Mailfilter uses to unregister ham messages."
:type 'string
:group 'spam-crm114)
-(defcustom spam-crm114-ham-strong-switch "--
UNKNOWN
"
+(defcustom spam-crm114-ham-strong-switch "--
unlearn
"
"The switch that CRM114 Mailfilter uses to unregister spam messages."
:type 'string
:group 'spam-crm114)
"The switch that CRM114 Mailfilter uses to unregister spam messages."
:type 'string
:group 'spam-crm114)
@@
-709,7
+722,7
@@
finds ham or spam.")
;;{{{ convenience functions
(defun spam-clear-cache (symbol)
;;{{{ convenience functions
(defun spam-clear-cache (symbol)
- "Clear the
spam-caches
entry for a check."
+ "Clear the
`spam-caches'
entry for a check."
(remhash symbol spam-caches))
(defun spam-xor (a b)
(remhash symbol spam-caches))
(defun spam-xor (a b)
@@
-717,7
+730,7
@@
finds ham or spam.")
(and (or a b) (not (and a b))))
(defun spam-set-difference (list1 list2)
(and (or a b) (not (and a b))))
(defun spam-set-difference (list1 list2)
- "Return a set difference of LIST1 and LIST2.
+ "Return a set difference of LIST1 and LIST2.
When either list is nil, the other is returned."
(if (and list1 list2)
;; we have two non-nil lists
When either list is nil, the other is returned."
(if (and list1 list2)
;; we have two non-nil lists
@@
-824,15
+837,14
@@
Accepts incoming CHECK, ham registration function HRF, spam
registration function SRF, ham unregistration function HUF, spam
unregistration function SUF, and an indication whether the
backend is STATISTICAL."
registration function SRF, ham unregistration function HUF, spam
unregistration function SUF, and an indication whether the
backend is STATISTICAL."
-
(setq spam-backends (add-to-list 'spam-backends backend))
(while properties
(let ((property (pop properties))
(value (pop properties)))
(if (spam-backend-property-valid-p property)
(put backend property value)
(setq spam-backends (add-to-list 'spam-backends backend))
(while properties
(let ((property (pop properties))
(value (pop properties)))
(if (spam-backend-property-valid-p property)
(put backend property value)
- (gnus-error
- 5
+ (gnus-error
+ 5
"spam-install-backend-super got an invalid property %s"
property)))))
"spam-install-backend-super got an invalid property %s"
property)))))
@@
-862,7
+874,7
@@
The value nil means that the check does not yield a decision, and
so, that further checks are needed. The value t means that the
message is definitely not spam, and that further spam checks
should be inhibited. Otherwise, a mailgroup name or the symbol
so, that further checks are needed. The value t means that the
message is definitely not spam, and that further spam checks
should be inhibited. Otherwise, a mailgroup name or the symbol
-'spam (depending on
spam-split-symbolic-return
) is returned where
+'spam (depending on
`spam-split-symbolic-return'
) is returned where
the mail should go, and further checks are also inhibited. The
usual mailgroup name is the value of `spam-split-group', meaning
that the message is definitely a spam."
the mail should go, and further checks are also inhibited. The
usual mailgroup name is the value of `spam-split-group', meaning
that the message is definitely a spam."
@@
-879,7
+891,7
@@
that the message is definitely a spam."
(setq info (format "Backend %s has the following properties:\n"
backend))
(dolist (property (spam-backend-properties))
(setq info (format "Backend %s has the following properties:\n"
backend))
(dolist (property (spam-backend-properties))
- (setq info (format "%s%s=%s\n"
+ (setq info (format "%s%s=%s\n"
info
property
(get backend property))))
info
property
(get backend property))))
@@
-894,13
+906,13
@@
CLASSIFICATION is 'ham or 'spam."
(if (and
(spam-classification-valid-p classification)
(spam-backend-function-type-valid-p type))
(if (and
(spam-classification-valid-p classification)
(spam-backend-function-type-valid-p type))
- (let ((retrieval
- (intern
+ (let ((retrieval
+ (intern
(format "spam-backend-%s-%s-function"
classification
type))))
(funcall retrieval backend))
(format "spam-backend-%s-%s-function"
classification
type))))
(funcall retrieval backend))
- (gnus-error
+ (gnus-error
5
"%s was passed invalid backend %s, classification %s, or type %s"
"spam-backend-function"
5
"%s was passed invalid backend %s, classification %s, or type %s"
"spam-backend-function"
@@
-908,21
+920,21
@@
CLASSIFICATION is 'ham or 'spam."
classification
type)))
classification
type)))
-(defun spam-backend-article-list-property (classification
+(defun spam-backend-article-list-property (classification
&optional unregister)
"Property name of article list with CLASSIFICATION and UNREGISTER."
(let* ((r (if unregister "unregister" "register"))
(prop (format "%s-%s" classification r)))
prop))
&optional unregister)
"Property name of article list with CLASSIFICATION and UNREGISTER."
(let* ((r (if unregister "unregister" "register"))
(prop (format "%s-%s" classification r)))
prop))
-(defun spam-backend-get-article-todo-list (backend
- classification
+(defun spam-backend-get-article-todo-list (backend
+ classification
&optional unregister)
&optional unregister)
- "Get the articles to be processed for BACKEND and CLASSIFICATION.
+ "Get the articles to be processed for BACKEND and CLASSIFICATION.
With UNREGISTER, get articles to be unregistered.
This is a temporary storage function - nothing here persists."
(get
With UNREGISTER, get articles to be unregistered.
This is a temporary storage function - nothing here persists."
(get
- backend
+ backend
(intern (spam-backend-article-list-property classification unregister))))
(defun spam-backend-put-article-todo-list (backend classification list &optional unregister)
(intern (spam-backend-article-list-property classification unregister))))
(defun spam-backend-put-article-todo-list (backend classification list &optional unregister)
@@
-964,7
+976,7
@@
The previous backend settings for ALIAS are erased."
;; install alias with no properties at first
(spam-install-backend-super alias)
;; install alias with no properties at first
(spam-install-backend-super alias)
-
+
(dolist (property (spam-backend-properties))
(put alias property (get backend property))))
(dolist (property (spam-backend-properties))
(put alias property (get backend property))))
@@
-978,8
+990,8
@@
Accepts ham registration function HRF, spam registration function
SRF, ham unregistration function HUF, spam unregistration
function SUF. The backend has no incoming check and can't be
statistical."
SRF, ham unregistration function HUF, spam unregistration
function SUF. The backend has no incoming check and can't be
statistical."
- (spam-install-backend-super
- backend
+ (spam-install-backend-super
+ backend
'hrf hrf 'srf srf 'huf huf 'suf suf 'mover t))
(defun spam-install-nocheck-backend (backend hrf srf huf suf)
'hrf hrf 'srf srf 'huf huf 'suf suf 'mover t))
(defun spam-install-nocheck-backend (backend hrf srf huf suf)
@@
-988,7
+1000,7
@@
Accepts ham registration function HRF, spam registration function
SRF, ham unregistration function HUF, spam unregistration
function SUF. The backend has no incoming check and can't be
statistical (it could be, but in practice that doesn't happen)."
SRF, ham unregistration function HUF, spam unregistration
function SUF. The backend has no incoming check and can't be
statistical (it could be, but in practice that doesn't happen)."
- (spam-install-backend-super
+ (spam-install-backend-super
backend
'hrf hrf 'srf srf 'huf huf 'suf suf))
backend
'hrf hrf 'srf srf 'huf huf 'suf suf))
@@
-997,8
+1009,8
@@
statistical (it could be, but in practice that doesn't happen)."
Accepts incoming CHECK, ham registration function HRF, spam
registration function SRF, ham unregistration function HUF, spam
unregistration function SUF. The backend won't be
Accepts incoming CHECK, ham registration function HRF, spam
registration function SRF, ham unregistration function HUF, spam
unregistration function SUF. The backend won't be
-statistical (use
spam-install-statistical-backend
for that)."
- (spam-install-backend-super
+statistical (use
`spam-install-statistical-backend'
for that)."
+ (spam-install-backend-super
backend
'check check 'hrf hrf 'srf srf 'huf huf 'suf suf))
backend
'check check 'hrf hrf 'srf srf 'huf huf 'suf suf))
@@
-1007,15
+1019,15
@@
statistical (use spam-install-statistical-backend for that)."
Accepts incoming CHECK, ham registration function HRF, spam
registration function SRF, ham unregistration function HUF, spam
unregistration function SUF. The backend will be
Accepts incoming CHECK, ham registration function HRF, spam
registration function SRF, ham unregistration function HUF, spam
unregistration function SUF. The backend will be
-statistical (use
spam-install-backend
for non-statistical
+statistical (use
`spam-install-backend'
for non-statistical
backends)."
backends)."
- (spam-install-backend-super
+ (spam-install-backend-super
backend
'check check 'statistical t 'hrf hrf 'srf srf 'huf huf 'suf suf))
(defun spam-install-statistical-checkonly-backend (backend check)
"Install a statistical BACKEND than can only CHECK for spam."
backend
'check check 'statistical t 'hrf hrf 'srf srf 'huf huf 'suf suf))
(defun spam-install-statistical-checkonly-backend (backend check)
"Install a statistical BACKEND than can only CHECK for spam."
- (spam-install-backend-super
+ (spam-install-backend-super
backend
'check check 'statistical t))
backend
'check check 'statistical t))
@@
-1071,7
+1083,7
@@
backends)."
nil
nil)
nil
nil)
-(spam-install-backend 'spam-use-BBDB
+(spam-install-backend 'spam-use-BBDB
'spam-check-BBDB
'spam-BBDB-register-routine
nil
'spam-check-BBDB
'spam-BBDB-register-routine
nil
@@
-1115,7
+1127,7
@@
backends)."
'spam-stat-unregister-ham-routine
'spam-stat-unregister-spam-routine)
'spam-stat-unregister-ham-routine
'spam-stat-unregister-spam-routine)
-(spam-install-statistical-backend 'spam-use-spamassassin
+(spam-install-statistical-backend 'spam-use-spamassassin
'spam-check-spamassassin
'spam-spamassassin-register-ham-routine
'spam-spamassassin-register-spam-routine
'spam-check-spamassassin
'spam-spamassassin-register-ham-routine
'spam-spamassassin-register-spam-routine
@@
-1140,10
+1152,8
@@
backends)."
'spam-check-crm114
'spam-crm114-register-ham-routine
'spam-crm114-register-spam-routine
'spam-check-crm114
'spam-crm114-register-ham-routine
'spam-crm114-register-spam-routine
- ;; does CRM114 Mailfilter support unregistration?
- nil
- nil)
-
+ 'spam-crm114-unregister-ham-routine
+ 'spam-crm114-unregister-spam-routine)
;;}}}
;;{{{ scoring and summary formatting
;;}}}
;;{{{ scoring and summary formatting
@@
-1211,13
+1221,13
@@
Note this has to be fast."
With SPECIFIC-HEADER, returns only that header's score.
Will not return a nil score."
(let (score)
With SPECIFIC-HEADER, returns only that header's score.
Will not return a nil score."
(let (score)
- (dolist (header
+ (dolist (header
(if specific-header
(list specific-header)
(spam-necessary-extra-headers)))
(if specific-header
(list specific-header)
(spam-necessary-extra-headers)))
- (setq score
+ (setq score
(spam-extra-header-to-number header headers))
(spam-extra-header-to-number header headers))
- (when score
+ (when score
(return)))
(or score 0)))
(return)))
(or score 0)))
@@
-1245,7
+1255,7
@@
Will not return a nil score."
(let (found)
(dolist (backend (spam-backend-list))
(when (and (spam-backend-statistical-p backend)
(let (found)
(dolist (backend (spam-backend-list))
(when (and (spam-backend-statistical-p backend)
- (or (symbol-value backend)
+ (or (symbol-value backend)
(memq backend force-symbols)))
(setq found backend)))
found))
(memq backend force-symbols)))
(setq found backend)))
found))
@@
-1274,14
+1284,14
@@
This list contains pairs associating the obsolete ham/spam exit
processor variables with a classification and a spam-use-*
variable. When the processor variable is nil, just the
classification and spam-use-* check variable are used. This is
processor variables with a classification and a spam-use-*
variable. When the processor variable is nil, just the
classification and spam-use-* check variable are used. This is
-super
c
eded by the new spam backend code, so it's only consulted
+super
s
eded by the new spam backend code, so it's only consulted
for backwards compatibility.")
(defun spam-group-processor-p (group backend &optional classification)
"Checks if GROUP has a BACKEND with CLASSIFICATION registered.
Also accepts the obsolete processors, which can be found in
gnus.el and in spam-list-of-processors. In the case of mover
for backwards compatibility.")
(defun spam-group-processor-p (group backend &optional classification)
"Checks if GROUP has a BACKEND with CLASSIFICATION registered.
Also accepts the obsolete processors, which can be found in
gnus.el and in spam-list-of-processors. In the case of mover
-backends, checks the setting of
spam-summary-exit-behavior
in
+backends, checks the setting of
`spam-summary-exit-behavior'
in
addition to the set values for the group."
(if (and (stringp group)
(symbolp backend))
addition to the set values for the group."
(if (and (stringp group)
(symbolp backend))
@@
-1302,7
+1312,7
@@
addition to the set values for the group."
;; spam-summary-exit-behavior-logic for mover backends
(unless found
(when (spam-backend-mover-p backend)
;; spam-summary-exit-behavior-logic for mover backends
(unless found
(when (spam-backend-mover-p backend)
- (setq
+ (setq
found
(cond
((eq spam-summary-exit-behavior 'move-all) t)
found
(cond
((eq spam-summary-exit-behavior 'move-all) t)
@@
-1312,7
+1322,7
@@
addition to the set values for the group."
;; move ham out of spam groups
(and (eq classification 'ham)
(spam-group-spam-contents-p group))))
;; move ham out of spam groups
(and (eq classification 'ham)
(spam-group-spam-contents-p group))))
- (t (gnus-error 5 "Unknown spam-summary-exit-behavior: %s"
+ (t (gnus-error 5 "Unknown spam-summary-exit-behavior: %s"
spam-summary-exit-behavior))))))
found))
spam-summary-exit-behavior))))))
found))
@@
-1372,8
+1382,8
@@
addition to the set values for the group."
;; call spam-register-routine with specific articles to unregister,
;; when there are articles to unregister and the check is enabled
(when (and unregister-list (symbol-value backend))
;; call spam-register-routine with specific articles to unregister,
;; when there are articles to unregister and the check is enabled
(when (and unregister-list (symbol-value backend))
- (spam-backend-put-article-todo-list backend
- classification
+ (spam-backend-put-article-todo-list backend
+ classification
unregister-list
t))))))
unregister-list
t))))))
@@
-1385,7
+1395,7
@@
addition to the set values for the group."
gnus-newsgroup-name
backend
classification)
gnus-newsgroup-name
backend
classification)
- (spam-backend-put-article-todo-list backend
+ (spam-backend-put-article-todo-list backend
classification
(spam-list-articles
gnus-newsgroup-articles
classification
(spam-list-articles
gnus-newsgroup-articles
@@
-1444,11
+1454,11
@@
addition to the set values for the group."
article)
(gnus-summary-mark-article article gnus-expirable-mark))
(gnus-summary-set-process-mark article)
article)
(gnus-summary-mark-article article gnus-expirable-mark))
(gnus-summary-set-process-mark article)
-
+
(if respool ; respooling is with a "fake" group
(let ((spam-split-disabled
(or spam-split-disabled
(if respool ; respooling is with a "fake" group
(let ((spam-split-disabled
(or spam-split-disabled
- (and (eq classification 'ham)
+ (and (eq classification 'ham)
spam-disable-spam-split-during-ham-respool))))
(gnus-message 9 "Respooling article %d with method %s"
article respool-method)
spam-disable-spam-split-during-ham-respool))))
(gnus-message 9 "Respooling article %d with method %s"
article respool-method)
@@
-1463,7
+1473,7
@@
addition to the set values for the group."
(gnus-message 9 "Moving article %d to group %s"
article group)
(gnus-summary-move-article nil group))))) ; else move articles
(gnus-message 9 "Moving article %d to group %s"
article group)
(gnus-summary-move-article nil group))))) ; else move articles
-
+
;; now delete the articles, unless a) copy is t, and there was a copy done
;; b) a move was done to a single group
;; c) backend-supports-deletions is nil
;; now delete the articles, unless a) copy is t, and there was a copy done
;; b) a move was done to a single group
;; c) backend-supports-deletions is nil
@@
-1475,33
+1485,33
@@
addition to the set values for the group."
(when articles
(let ((gnus-novice-user nil)) ; don't ask me if I'm sure
(gnus-summary-delete-article nil)))))
(when articles
(let ((gnus-novice-user nil)) ; don't ask me if I'm sure
(gnus-summary-delete-article nil)))))
-
+
(gnus-summary-yank-process-mark)
(length articles))))
(defun spam-copy-spam-routine (articles)
(gnus-summary-yank-process-mark)
(length articles))))
(defun spam-copy-spam-routine (articles)
- (spam-copy-or-move-routine
- t
+ (spam-copy-or-move-routine
+ t
(gnus-parameter-spam-process-destination gnus-newsgroup-name)
articles
'spam))
(defun spam-move-spam-routine (articles)
(gnus-parameter-spam-process-destination gnus-newsgroup-name)
articles
'spam))
(defun spam-move-spam-routine (articles)
- (spam-copy-or-move-routine
+ (spam-copy-or-move-routine
nil
(gnus-parameter-spam-process-destination gnus-newsgroup-name)
articles
'spam))
(defun spam-copy-ham-routine (articles)
nil
(gnus-parameter-spam-process-destination gnus-newsgroup-name)
articles
'spam))
(defun spam-copy-ham-routine (articles)
- (spam-copy-or-move-routine
- t
+ (spam-copy-or-move-routine
+ t
(gnus-parameter-ham-process-destination gnus-newsgroup-name)
articles
'ham))
(defun spam-move-ham-routine (articles)
(gnus-parameter-ham-process-destination gnus-newsgroup-name)
articles
'ham))
(defun spam-move-ham-routine (articles)
- (spam-copy-or-move-routine
+ (spam-copy-or-move-routine
nil
(gnus-parameter-ham-process-destination gnus-newsgroup-name)
articles
nil
(gnus-parameter-ham-process-destination gnus-newsgroup-name)
articles
@@
-1557,9
+1567,9
@@
to find it out)."
((equal field 'extra)
(mail-header-extra data-header))
(t
((equal field 'extra)
(mail-header-extra data-header))
(t
- (gnus-error
- 5
- "spam-fetch-field-fast: unknown field %s requested"
+ (gnus-error
+ 5
+ "spam-fetch-field-fast: unknown field %s requested"
field)
nil))
(gnus-message 6 "Article %d has a nil data header" article)))))
field)
nil))
(gnus-message 6 "Article %d has a nil data header" article)))))
@@
-1608,7
+1618,7
@@
to find it out)."
This function can be used as an entry in the variable `nnmail-split-fancy',
for example like this: (: spam-split). It can take checks as
parameters. A string as a parameter will set the
This function can be used as an entry in the variable `nnmail-split-fancy',
for example like this: (: spam-split). It can take checks as
parameters. A string as a parameter will set the
-
spam-split-group
to that string.
+
`spam-split-group'
to that string.
See the Info node `(gnus)Fancy Mail Splitting' for more details."
(interactive)
See the Info node `(gnus)Fancy Mail Splitting' for more details."
(interactive)
@@
-1660,7
+1670,7
@@
See the Info node `(gnus)Fancy Mail Splitting' for more details."
decision))))))))
(defun spam-find-spam ()
decision))))))))
(defun spam-find-spam ()
- "
This function will detect spam in the current newsgroup using spam-split
."
+ "
Detect spam in the current newsgroup using `spam-split'
."
(interactive)
(let* ((group gnus-newsgroup-name)
(interactive)
(let* ((group gnus-newsgroup-name)
@@
-1672,7
+1682,7
@@
See the Info node `(gnus)Fancy Mail Splitting' for more details."
gnus-newsgroup-unseen))
article-cannot-be-faked)
gnus-newsgroup-unseen))
article-cannot-be-faked)
-
+
(dolist (backend methods)
(when (spam-backend-statistical-p backend)
(setq article-cannot-be-faked t)
(dolist (backend methods)
(when (spam-backend-statistical-p backend)
(setq article-cannot-be-faked t)
@@
-1689,10
+1699,10
@@
See the Info node `(gnus)Fancy Mail Splitting' for more details."
(subject (spam-fetch-field-subject-fast article))
(sender (spam-fetch-field-from-fast article))
registry-lookup)
(subject (spam-fetch-field-subject-fast article))
(sender (spam-fetch-field-from-fast article))
registry-lookup)
-
+
(unless id
(gnus-message 6 "Article %d has no message ID!" article))
(unless id
(gnus-message 6 "Article %d has no message ID!" article))
-
+
(when (and id spam-log-to-registry)
(setq registry-lookup (spam-log-registration-type id 'incoming))
(when registry-lookup
(when (and id spam-log-to-registry)
(setq registry-lookup (spam-log-registration-type id 'incoming))
(when registry-lookup
@@
-1719,12
+1729,12
@@
See the Info node `(gnus)Fancy Mail Splitting' for more details."
(apply 'spam-split methods))))))
(if (equal split-return 'spam)
(gnus-summary-mark-article article gnus-spam-mark))
(apply 'spam-split methods))))))
(if (equal split-return 'spam)
(gnus-summary-mark-article article gnus-spam-mark))
-
+
(when (and id split-return spam-log-to-registry)
(when (zerop (gnus-registry-group-count id))
(gnus-registry-add-group
id group subject sender))
(when (and id split-return spam-log-to-registry)
(when (zerop (gnus-registry-group-count id))
(gnus-registry-add-group
id group subject sender))
-
+
(unless registry-lookup
(spam-log-processing-to-registry
id
(unless registry-lookup
(spam-log-processing-to-registry
id
@@
-1750,11
+1760,11
@@
See the Info node `(gnus)Fancy Mail Splitting' for more details."
(delcount 0))
;; clear the old lists right away
(delcount 0))
;; clear the old lists right away
- (spam-backend-put-article-todo-list backend
+ (spam-backend-put-article-todo-list backend
classification
nil
nil)
classification
nil
nil)
- (spam-backend-put-article-todo-list backend
+ (spam-backend-put-article-todo-list backend
classification
nil
t)
classification
nil
t)
@@
-1765,29
+1775,29
@@
See the Info node `(gnus)Fancy Mail Splitting' for more details."
(incf delcount)
(setq rlist (delq article rlist))
(setq ulist (delq article ulist))))
(incf delcount)
(setq rlist (delq article rlist))
(setq ulist (delq article ulist))))
-
+
(unless (zerop delcount)
(unless (zerop delcount)
- (gnus-message
- 9
+ (gnus-message
+ 9
"%d messages were saved the trouble of unregistering and then registering"
delcount))
"%d messages were saved the trouble of unregistering and then registering"
delcount))
-
+
;; unregister articles
(unless (zerop (length ulist))
(let ((num (spam-unregister-routine classification backend ulist)))
(when (> num 0)
;; unregister articles
(unless (zerop (length ulist))
(let ((num (spam-unregister-routine classification backend ulist)))
(when (> num 0)
- (gnus-message
+ (gnus-message
6
"%d %s messages were unregistered by backend %s."
num
classification
backend))))
6
"%d %s messages were unregistered by backend %s."
num
classification
backend))))
-
+
;; register articles
(unless (zerop (length rlist))
(let ((num (spam-register-routine classification backend rlist)))
(when (> num 0)
;; register articles
(unless (zerop (length rlist))
(let ((num (spam-register-routine classification backend rlist)))
(when (> num 0)
- (gnus-message
+ (gnus-message
6
"%d %s messages were registered by backend %s."
num
6
"%d %s messages were registered by backend %s."
num
@@
-1795,12
+1805,12
@@
See the Info node `(gnus)Fancy Mail Splitting' for more details."
backend)))))))))
(defun spam-unregister-routine (classification
backend)))))))))
(defun spam-unregister-routine (classification
- backend
+ backend
specific-articles)
(spam-register-routine classification backend specific-articles t))
(defun spam-register-routine (classification
specific-articles)
(spam-register-routine classification backend specific-articles t))
(defun spam-register-routine (classification
- backend
+ backend
specific-articles
&optional unregister)
(when (and (spam-classification-valid-p classification)
specific-articles
&optional unregister)
(when (and (spam-classification-valid-p classification)
@@
-2027,9
+2037,9
@@
See the Info node `(gnus)Fancy Mail Splitting' for more details."
(push (list ip server query-result)
matches)))
;; else, if not using dig.el
(push (list ip server query-result)
matches)))
;; else, if not using dig.el
- (when (
query-dns
query-string)
+ (when (
dns-query
query-string)
(gnus-message 6 "positive blackhole check")
(gnus-message 6 "positive blackhole check")
- (push (list ip server (
query-dns
query-string 'TXT))
+ (push (list ip server (
dns-query
query-string 'TXT))
matches)))))))))
(when matches
spam-split-group)))
matches)))))))))
(when matches
spam-split-group)))
@@
-2055,6
+2065,9
@@
See the Info node `(gnus)Fancy Mail Splitting' for more details."
(autoload 'bbdb-create-internal "bbdb")
(autoload 'bbdb-search-simple "bbdb"))
(autoload 'bbdb-create-internal "bbdb")
(autoload 'bbdb-search-simple "bbdb"))
+;; Autoloaded in message, which we require.
+(declare-function gnus-extract-address-components "gnus-util" (from))
+
(eval-and-compile
(when (condition-case nil
(progn
(eval-and-compile
(when (condition-case nil
(progn
@@
-2121,7
+2134,7
@@
See the Info node `(gnus)Fancy Mail Splitting' for more details."
(save-excursion
(save-window-excursion
(bbdb-records nil t)
(save-excursion
(save-window-excursion
(bbdb-records nil t)
- (mapatoms
+ (mapatoms
(lambda (symbol)
(intern (downcase (symbol-name symbol)) bbdb-cache))
bbdb-hashtable))))
(lambda (symbol)
(intern (downcase (symbol-name symbol)) bbdb-cache))
bbdb-hashtable))))
@@
-2144,11
+2157,12
@@
See the Info node `(gnus)Fancy Mail Splitting' for more details."
;;; check the ifile backend; return nil if the mail was NOT classified
;;; as spam
;;; check the ifile backend; return nil if the mail was NOT classified
;;; as spam
+
(defun spam-get-ifile-database-parameter ()
(defun spam-get-ifile-database-parameter ()
- "
Get the command-line parameter for ifile's database from
-
spam-ifile-database-path
."
- (if spam-ifile-database
-path
- (format "--db-file=%s" spam-ifile-database
-path
)
+ "
Return the command-line parameter for ifile's database.
+
See `spam-ifile-database'
."
+ (if spam-ifile-database
+ (format "--db-file=%s" spam-ifile-database)
nil))
(defun spam-check-ifile ()
nil))
(defun spam-check-ifile ()
@@
-2161,7
+2175,7
@@
See the Info node `(gnus)Fancy Mail Splitting' for more details."
(save-excursion
(set-buffer article-buffer-name)
(apply 'call-process-region
(save-excursion
(set-buffer article-buffer-name)
(apply 'call-process-region
- (point-min) (point-max) spam-ifile-p
ath
+ (point-min) (point-max) spam-ifile-p
rogram
nil temp-buffer-name nil "-c"
(if db-param `(,db-param "-q") `("-q"))))
;; check the return now (we're back in the temp buffer)
nil temp-buffer-name nil "-c"
(if db-param `(,db-param "-q") `("-q"))))
;; check the return now (we're back in the temp buffer)
@@
-2189,7
+2203,7
@@
Uses `gnus-newsgroup-name' if category is nil (for ham registration)."
(when (stringp article-string)
(insert article-string))))
(apply 'call-process-region
(when (stringp article-string)
(insert article-string))))
(apply 'call-process-region
- (point-min) (point-max) spam-ifile-p
ath
+ (point-min) (point-max) spam-ifile-p
rogram
nil nil nil
add-or-delete-option category
(if db `(,db "-h") `("-h"))))))
nil nil nil
add-or-delete-option category
(if db `(,db "-h") `("-h"))))))
@@
-2297,8
+2311,8
@@
With a non-nil REMOVE, remove them."
(defun spam-enter-list (addresses file &optional remove)
"Enter ADDRESSES into the given FILE.
(defun spam-enter-list (addresses file &optional remove)
"Enter ADDRESSES into the given FILE.
-Either the whitelist or the blacklist files can be used.
With
-
REMOVE not nil
, remove the ADDRESSES."
+Either the whitelist or the blacklist files can be used.
+
With a non-nil REMOVE
, remove the ADDRESSES."
(if (stringp addresses)
(spam-enter-list (list addresses) file remove)
;; else, we have a list of addresses here
(if (stringp addresses)
(spam-enter-list (list addresses) file remove)
;; else, we have a list of addresses here
@@
-2453,7
+2467,7
@@
REMOVE not nil, remove the ADDRESSES."
(spam-report-resend-register-routine articles t))
(defun spam-report-resend-register-routine (articles &optional ham)
(spam-report-resend-register-routine articles t))
(defun spam-report-resend-register-routine (articles &optional ham)
- (let* ((resend-to-gp
+ (let* ((resend-to-gp
(if ham
(gnus-parameter-ham-resend-to gnus-newsgroup-name)
(gnus-parameter-spam-resend-to gnus-newsgroup-name)))
(if ham
(gnus-parameter-ham-resend-to gnus-newsgroup-name)
(gnus-parameter-spam-resend-to gnus-newsgroup-name)))
@@
-2478,7
+2492,7
@@
REMOVE not nil, remove the ADDRESSES."
;; return something sensible if the score can't be determined
(defun spam-bogofilter-score (&optional recheck)
;; return something sensible if the score can't be determined
(defun spam-bogofilter-score (&optional recheck)
- "Get the Bogofilter spamicity score"
+ "Get the Bogofilter spamicity score
.
"
(interactive "P")
(save-window-excursion
(gnus-summary-show-article t)
(interactive "P")
(save-window-excursion
(gnus-summary-show-article t)
@@
-2495,10
+2509,10
@@
REMOVE not nil, remove the ADDRESSES."
(when (eq spam-bogofilter-valid 'unknown)
(setq spam-bogofilter-valid
(not (string-match "^bogofilter version 0\\.\\([0-9]\\|1[01]\\)\\."
(when (eq spam-bogofilter-valid 'unknown)
(setq spam-bogofilter-valid
(not (string-match "^bogofilter version 0\\.\\([0-9]\\|1[01]\\)\\."
- (shell-command-to-string
- (format "%s -V" spam-bogofilter-p
ath
))))))
+ (shell-command-to-string
+ (format "%s -V" spam-bogofilter-p
rogram
))))))
spam-bogofilter-valid)
spam-bogofilter-valid)
-
+
(defun spam-check-bogofilter (&optional score)
"Check the Bogofilter backend for the classification of this message."
(if (spam-verify-bogofilter)
(defun spam-check-bogofilter (&optional score)
"Check the Bogofilter backend for the classification of this message."
(if (spam-verify-bogofilter)
@@
-2511,7
+2525,7
@@
REMOVE not nil, remove the ADDRESSES."
(set-buffer article-buffer-name)
(apply 'call-process-region
(point-min) (point-max)
(set-buffer article-buffer-name)
(apply 'call-process-region
(point-min) (point-max)
- spam-bogofilter-p
ath
+ spam-bogofilter-p
rogram
nil temp-buffer-name nil
(if db `("-d" ,db "-v") `("-v"))))
(setq return (spam-check-bogofilter-headers score))))
nil temp-buffer-name nil
(if db `("-d" ,db "-v") `("-v"))))
(setq return (spam-check-bogofilter-headers score))))
@@
-2536,10
+2550,10
@@
REMOVE not nil, remove the ADDRESSES."
(when (stringp article-string)
(with-temp-buffer
(insert article-string)
(when (stringp article-string)
(with-temp-buffer
(insert article-string)
-
+
(apply 'call-process-region
(point-min) (point-max)
(apply 'call-process-region
(point-min) (point-max)
- spam-bogofilter-p
ath
+ spam-bogofilter-p
rogram
nil nil nil switch
(if db `("-d" ,db "-v") `("-v")))))))
(gnus-error 5 "`spam.el' doesn't support obsolete bogofilter versions")))
nil nil nil switch
(if db `("-d" ,db "-v") `("-v")))))))
(gnus-error 5 "`spam.el' doesn't support obsolete bogofilter versions")))
@@
-2645,7
+2659,7
@@
REMOVE not nil, remove the ADDRESSES."
(save-excursion
(set-buffer article-buffer-name)
(apply 'call-process-region
(save-excursion
(set-buffer article-buffer-name)
(apply 'call-process-region
- (point-min) (point-max) spam-
spamassassin-path
+ (point-min) (point-max) spam-
assassin-program
nil temp-buffer-name nil spam-spamassassin-arguments))
;; check the return now (we're back in the temp buffer)
(goto-char (point-min))
nil temp-buffer-name nil spam-spamassassin-arguments))
;; check the return now (we're back in the temp buffer)
(goto-char (point-min))
@@
-2689,7
+2703,7
@@
REMOVE not nil, remove the ADDRESSES."
;; call sa-learn on all messages at the same time
(apply 'call-process-region
(point-min) (point-max)
;; call sa-learn on all messages at the same time
(apply 'call-process-region
(point-min) (point-max)
- spam-sa-learn-p
ath
+ spam-sa-learn-p
rogram
nil nil nil "--mbox"
(if spam-sa-learn-rebuild
(list action)
nil nil nil "--mbox"
(if spam-sa-learn-rebuild
(list action)
@@
-2722,7
+2736,7
@@
REMOVE not nil, remove the ADDRESSES."
;; return something sensible if the score can't be determined
(defun spam-bsfilter-score (&optional recheck)
;; return something sensible if the score can't be determined
(defun spam-bsfilter-score (&optional recheck)
- "Get the Bsfilter spamicity score"
+ "Get the Bsfilter spamicity score
.
"
(interactive "P")
(save-window-excursion
(gnus-summary-show-article t)
(interactive "P")
(save-window-excursion
(gnus-summary-show-article t)
@@
-2735,7
+2749,7
@@
REMOVE not nil, remove the ADDRESSES."
(or score "0"))))
(defun spam-check-bsfilter (&optional score)
(or score "0"))))
(defun spam-check-bsfilter (&optional score)
- "Check the Bsfilter backend for the classification of this message"
+ "Check the Bsfilter backend for the classification of this message
.
"
(let ((article-buffer-name (buffer-name))
(dir spam-bsfilter-database-directory)
return)
(let ((article-buffer-name (buffer-name))
(dir spam-bsfilter-database-directory)
return)
@@
-2745,7
+2759,7
@@
REMOVE not nil, remove the ADDRESSES."
(set-buffer article-buffer-name)
(apply 'call-process-region
(point-min) (point-max)
(set-buffer article-buffer-name)
(apply 'call-process-region
(point-min) (point-max)
- spam-bsfilter-p
ath
+ spam-bsfilter-p
rogram
nil temp-buffer-name nil
"--pipe"
"--insert-flag"
nil temp-buffer-name nil
"--pipe"
"--insert-flag"
@@
-2773,7
+2787,7
@@
REMOVE not nil, remove the ADDRESSES."
(insert article-string)
(apply 'call-process-region
(point-min) (point-max)
(insert article-string)
(apply 'call-process-region
(point-min) (point-max)
- spam-bsfilter-p
ath
+ spam-bsfilter-p
rogram
nil nil nil switch
"--update"
(when spam-bsfilter-database-directory
nil nil nil switch
"--update"
(when spam-bsfilter-database-directory
@@
-2809,7
+2823,7
@@
REMOVE not nil, remove the ADDRESSES."
;; return something sensible if the score can't be determined
(defun spam-crm114-score ()
;; return something sensible if the score can't be determined
(defun spam-crm114-score ()
- "Get the CRM114 Mailfilter pR"
+ "Get the CRM114 Mailfilter pR
.
"
(interactive)
(save-window-excursion
(gnus-summary-show-article t)
(interactive)
(save-window-excursion
(gnus-summary-show-article t)
@@
-2821,7
+2835,7
@@
REMOVE not nil, remove the ADDRESSES."
(or score "0"))))
(defun spam-check-crm114 (&optional score)
(or score "0"))))
(defun spam-check-crm114 (&optional score)
- "Check the CRM114 Mailfilter backend for the classification of this message"
+ "Check the CRM114 Mailfilter backend for the classification of this message
.
"
(let ((article-buffer-name (buffer-name))
(db spam-crm114-database-directory)
return)
(let ((article-buffer-name (buffer-name))
(db spam-crm114-database-directory)
return)
@@
-2883,9
+2897,9
@@
REMOVE not nil, remove the ADDRESSES."
(defun spam-initialize (&rest symbols)
"Install the spam.el hooks and do other initialization.
When SYMBOLS is given, set those variables to t. This is so you
(defun spam-initialize (&rest symbols)
"Install the spam.el hooks and do other initialization.
When SYMBOLS is given, set those variables to t. This is so you
-can call
spam-initialize
before you set spam-use-* variables on
+can call
`spam-initialize'
before you set spam-use-* variables on
explicitly, and matters only if you need the extra headers
explicitly, and matters only if you need the extra headers
-installed through
spam-necessary-extra-headers
."
+installed through
`spam-necessary-extra-headers'
."
(interactive)
(dolist (var symbols)
(interactive)
(dolist (var symbols)
@@
-2909,7
+2923,7
@@
installed through spam-necessary-extra-headers."
(add-hook 'gnus-summary-prepared-hook 'spam-find-spam))
(defun spam-unload-hook ()
(add-hook 'gnus-summary-prepared-hook 'spam-find-spam))
(defun spam-unload-hook ()
- "Uninstall the spam.el hooks"
+ "Uninstall the spam.el hooks
.
"
(interactive)
(remove-hook 'gnus-save-newsrc-hook 'spam-maybe-spam-stat-save)
(remove-hook 'gnus-get-top-new-news-hook 'spam-maybe-spam-stat-load)
(interactive)
(remove-hook 'gnus-save-newsrc-hook 'spam-maybe-spam-stat-save)
(remove-hook 'gnus-get-top-new-news-hook 'spam-maybe-spam-stat-load)
@@
-2927,5
+2941,5
@@
installed through spam-necessary-extra-headers."
(provide 'spam)
(provide 'spam)
-;;
;
arch-tag: 07e6e0ca-ab0a-4412-b445-1f6c72a4f27f
+;; arch-tag: 07e6e0ca-ab0a-4412-b445-1f6c72a4f27f
;;; spam.el ends here
;;; spam.el ends here