+2004-03-04 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * spam.el (spam-use-gmane-xref): new backend
+ (spam-gmane-xref-spam-group): variable to control the name of the
+ Gmane spam group
+ (spam-blackhole-servers, spam-blackhole-good-server-regex)
+ (spam-regex-headers-spam, spam-regex-headers-ham)
+ (spam-regex-body-spam, spam-regex-body-ham): clarified docs
+ (spam-list-of-checks): added spam-use-gmane-xref to list of
+ backends and checks
+ (spam-check-gmane-xref): function for spam-use-gmane-xref
+
+ * gnus.el (spam-autodetect-methods): add spam-use-gmane-xref as
+ an autodetect method
+
+2004-03-04 Kevin Greiner <kgreiner@xpediantsolutions.com>
+
+ * gnus-int.el (gnus-request-accept-article): Inform the agent that
+ articles are being added to a group.
+ (gnus-request-replace-article): Inform the agent that articles
+ need to be uncached as the cached contents are no longer valid.
+
2004-03-04 Katsumi Yamaoka <yamaoka@jpl.org>
* binhex.el: Don't autoload executable-find.
* uudecode.el: Don't autoload executable-find.
-2004-03-02 Kevin Greiner <kgreiner@xpediantsolutions.com>
+2004-03-04 Kevin Greiner <kgreiner@xpediantsolutions.com>
* gnus-agent.el (gnus-agent-file-header-cache): Removed.
(gnus-agent-possibly-alter-active): Avoid null in numeric
(setq gnus-command-method (gnus-server-to-method gnus-command-method)))
(when (and (not gnus-command-method)
(stringp group))
- (setq gnus-command-method (gnus-group-name-to-method group)))
+ (setq gnus-command-method (or (gnus-find-method-for-group group)
+ (gnus-group-name-to-method group))))
(goto-char (point-max))
(unless (bolp)
(insert "\n"))
(let ((gnus-command-method (or gnus-command-method
- (gnus-find-method-for-group group))))
- (funcall (gnus-get-function gnus-command-method 'request-accept-article)
+ (gnus-find-method-for-group group)))
+ (result (funcall (gnus-get-function gnus-command-method 'request-accept-article)
(if (stringp group) (gnus-group-real-name group) group)
(cadr gnus-command-method)
last)))
+ (when (and gnus-agent (gnus-agent-method-p gnus-command-method))
+ (gnus-agent-regenerate-group group (list (cdr result))))
+ result))
(defun gnus-request-replace-article (article group buffer &optional no-encode)
- (let ((func (car (gnus-group-name-to-method group))))
- (funcall (intern (format "%s-request-replace-article" func))
- article (gnus-group-real-name group) buffer)))
+ (let* ((func (car (gnus-group-name-to-method group)))
+ (result (funcall (intern (format "%s-request-replace-article" func))
+ article (gnus-group-real-name group) buffer)))
+ (when (and gnus-agent (gnus-agent-method-p gnus-command-method))
+ (gnus-agent-regenerate-group group (list article)))
+ result))
(defun gnus-request-associate-buffer (group)
(let ((gnus-command-method (gnus-find-method-for-group group)))
(const default)
(set :tag "Use specific methods"
(variable-item spam-use-blacklist)
+ (variable-item spam-use-gmane-xref)
(variable-item spam-use-regex-headers)
(variable-item spam-use-regex-body)
(variable-item spam-use-whitelist)
(const default)
(set :tag "Use specific methods"
(variable-item spam-use-blacklist)
+ (variable-item spam-use-gmane-xref)
(variable-item spam-use-regex-headers)
(variable-item spam-use-regex-body)
(variable-item spam-use-whitelist)
:type 'boolean
:group 'spam)
+(defcustom spam-use-gmane-xref nil
+ "Whether the Gmane spam xref should be used by `spam-split'."
+ :type 'boolean
+ :group 'spam)
+
(defcustom spam-use-blacklist nil
"Whether the blacklist should be used by `spam-split'."
:type 'boolean
(defcustom spam-install-hooks (or
spam-use-dig
+ spam-use-gmane-xref
spam-use-blacklist
spam-use-whitelist
spam-use-whitelist-exclusive
:type '(repeat (string :tag "Group"))
:group 'spam)
+
+(defcustom spam-gmane-xref-spam-group "gmane.spam.detected"
+ "The group where spam xrefs can be found on Gmane.
+Only meaningful if you enable `spam-use-gmane-xref'."
+ :type 'string
+ :group 'spam)
+
(defcustom spam-blackhole-servers '("bl.spamcop.net" "relays.ordb.org"
"dev.null.dk" "relays.visi.com")
- "List of blackhole servers."
+ "List of blackhole servers.
+Only meaningful if you enable `spam-use-blackholes'."
:type '(repeat (string :tag "Server"))
:group 'spam)
(defcustom spam-blackhole-good-server-regex nil
- "String matching IP addresses that should not be checked in the blackholes."
+ "String matching IP addresses that should not be checked in the blackholes.
+Only meaningful if you enable `spam-use-blackholes'."
:type '(radio (const nil)
(regexp :format "%t: %v\n" :size 0))
:group 'spam)
:group 'spam)
(defcustom spam-regex-headers-spam '("^X-Spam-Flag: YES")
- "Regular expression for positive header spam matches."
+ "Regular expression for positive header spam matches.
+Only meaningful if you enable `spam-use-regex-headers'."
:type '(repeat (regexp :tag "Regular expression to match spam header"))
:group 'spam)
(defcustom spam-regex-headers-ham '("^X-Spam-Flag: NO")
- "Regular expression for positive header ham matches."
+ "Regular expression for positive header ham matches.
+Only meaningful if you enable `spam-use-regex-headers'."
:type '(repeat (regexp :tag "Regular expression to match ham header"))
:group 'spam)
(defcustom spam-regex-body-spam '()
- "Regular expression for positive body spam matches."
+ "Regular expression for positive body spam matches.
+Only meaningful if you enable `spam-use-regex-body'."
:type '(repeat (regexp :tag "Regular expression to match spam body"))
:group 'spam)
(defcustom spam-regex-body-ham '()
- "Regular expression for positive body ham matches."
+ "Regular expression for positive body ham matches.
+Only meaningful if you enable `spam-use-regex-body'."
:type '(repeat (regexp :tag "Regular expression to match ham body"))
:group 'spam)
(defvar spam-list-of-checks
'((spam-use-blacklist . spam-check-blacklist)
(spam-use-regex-headers . spam-check-regex-headers)
+ (spam-use-gmane-xref . spam-check-gmane-xref)
(spam-use-regex-body . spam-check-regex-body)
(spam-use-whitelist . spam-check-whitelist)
(spam-use-BBDB . spam-check-BBDB)
(setq nnimap-split-download-body-default t))))
\f
+;;;; Gmane xrefs
+(defun spam-check-gmane-xref ()
+ (let ((header (or
+ (message-fetch-field "Xref")
+ (message-fetch-field "Newsgroups")))
+ (spam-split-group (if spam-split-symbolic-return
+ 'spam
+ spam-split-group)))
+ (when header ; return nil when no header
+ (when (string-match spam-gmane-xref-spam-group
+ header)
+ spam-split-group))))
+
+\f
;;;; Regex body
(defun spam-check-regex-body ()