+2003-02-28 Vasily Korytov <deskpot@myrealbox.com>
+
+ * gnus-art.el (gnus-boring-article-headers): New values:
+ 'to-list and 'cc-list.
+
+2003-02-28 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * spam.el (spam-setup-widening): new function to set
+ nnimap-split-download-body, we add it to gnus-get-new-news-hook
+ (spam-list-of-statistical-checks): list of statistical splitter
+ checks
+ (spam-split): added a widen call when a statistical check is
+ enabled
+
+2003-02-28 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus-msg.el (gnus-user-agent): Changed default to
+ 'emacs-gnus-type, renamed 'full.
+
2003-02-28 ShengHuo ZHU <zsh@cs.rochester.edu>
* nnfolder.el (nnfolder-request-accept-article): Don't use
'empty Headers with no content.
'newsgroups Newsgroup identical to Gnus group.
'to-address To identical to To-address.
+ 'to-list To identical to To-list.
+ 'cc-list CC identical to To-list.
'followup-to Followup-to identical to Newsgroups.
'reply-to Reply-to identical to From.
'date Date less than four days old.
:type '(set (const :tag "Headers with no content." empty)
(const :tag "Newsgroups identical to Gnus group." newsgroups)
(const :tag "To identical to To-address." to-address)
+ (const :tag "To identical to To-list." to-list)
+ (const :tag "CC identical to To-list." cc-list)
(const :tag "Followup-to identical to Newsgroups." followup-to)
(const :tag "Reply-to identical to From." reply-to)
(const :tag "Date less than four days old." date)
(nth 1 (mail-extract-address-components to))
to-address)))
(gnus-article-hide-header "to"))))
+ ((eq elem 'to-list)
+ (let ((to (message-fetch-field "to"))
+ (to-list
+ (gnus-parameter-to-list
+ (if (boundp 'gnus-newsgroup-name)
+ gnus-newsgroup-name ""))))
+ (when (and to to-list
+ (ignore-errors
+ (gnus-string-equal
+ ;; only one address in To
+ (nth 1 (mail-extract-address-components to))
+ to-list)))
+ (gnus-article-hide-header "to"))))
+ ((eq elem 'cc-list)
+ (let ((cc (message-fetch-field "cc"))
+ (to-list
+ (gnus-parameter-to-list
+ (if (boundp 'gnus-newsgroup-name)
+ gnus-newsgroup-name ""))))
+ (when (and cc to-list
+ (ignore-errors
+ (gnus-string-equal
+ ;; only one address in CC
+ (nth 1 (mail-extract-address-components cc))
+ to-list)))
+ (gnus-article-hide-header "cc"))))
((eq elem 'followup-to)
(when (gnus-string-equal
(message-fetch-field "followup-to")
:group 'gnus-message
:type 'boolean)
-(defcustom gnus-user-agent 'full
+(defcustom gnus-user-agent 'emacs-gnus-type
"Which information should be exposed in the User-Agent header.
-It can be one of the symbols `full' \(show full information, i.e. Emacs and
-Gnus version and system configuration\), `emacs-gnus' \(show only Emacs and
-Gnus version\), `emacs-gnus-type' \(same as `emacs-gnus' plus system type\),
-`gnus' \(show only Gnus version\) or a custom string. If you set it to a
+It can be one of the symbols `gnus' \(show only Gnus version\) `emacs-gnus'
+\(show only Emacs and Gnus versions\), `emacs-gnus-config' \(same as
+`emacs-gnus' plus system configuration\), `emacs-gnus-type' \(same as
+`emacs-gnus' plus system type\) or a custom string. If you set it to a
string, be sure to use a valid format, see RFC 2616."
:group 'gnus-message
- :type '(choice (item :tag "Show full info" full)
- (item :tag "Show Gnus and Emacs versions and system type"
- emacs-gnus-type)
- (item :tag "Show Gnus and Emacs versions" emacs-gnus)
- (item :tag "Show only Gnus version" gnus)
- (string :tag "Other")))
+ :type '(choice
+ (item :tag "Show Gnus and Emacs versions and system type"
+ emacs-gnus-type)
+ (item :tag "Show Gnus and Emacs versions and system configuration"
+ emacs-gnus-config)
+ (item :tag "Show Gnus and Emacs versions" emacs-gnus)
+ (item :tag "Show only Gnus version" gnus)
+ (string :tag "Other")))
;;; Internal variables.
;;; imap.el --- imap library
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
;; Free Software Foundation, Inc.
;; Author: Simon Josefsson <jas@pdc.kth.se>
name is the value of `spam-split-group', meaning that the message is
definitely a spam.")
+(defvar spam-list-of-statistical-checks
+ '(spam-use-ifile spam-use-stat spam-use-bogofilter)
+"The spam-list-of-statistical-checks list contains all the mail
+splitters that need to have the full message body available.")
+
(defun spam-split ()
"Split this message into the `spam' group if it is spam.
This function can be used as an entry in `nnmail-split-fancy', for
See the Info node `(gnus)Fancy Mail Splitting' for more details."
(interactive)
-
+
+ (dolist (check spam-list-of-statistical-checks)
+ (when (symbol-value check)
+ (widen)
+ (gnus-message 8 "spam-split: widening the buffer (%s requires it)"
+ (symbol-name check))
+ (return)))
+;; (progn (widen) (debug (buffer-string)))
(let ((list-of-checks spam-list-of-checks)
decision)
(while (and list-of-checks (not decision))
(if (eq decision t)
nil
decision)))
+
+(defun spam-setup-widening ()
+ (dolist (check spam-list-of-statistical-checks)
+ (when (symbol-value check)
+ (setq nnimap-split-download-body t)
+ (return))))
+
+(add-hook 'gnus-get-new-news-hook 'spam-setup-widening)
+
\f
;;;; Regex headers
+2003-02-28 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * gnus.texi (Extending the spam elisp package): added mention of
+ spam-list-of-statistical-checks
+
2003-02-27 ShengHuo ZHU <zsh@cs.rochester.edu>
* gnus.texi: Remove the dependence on ssl.el.
@code{spam-check-blackbox} \e$B4X?t$r=q$$$F2<$5$$!#$=$l\e(B
\e$B$O\e(B @samp{nil} \e$B$+\e(B @code{spam-split-group} \e$B$rJV$5$J$1$l$P$J$j$^$;$s!#$"$J\e(B
\e$B$?$K$G$-$k$3$H$NNc$O!"4{B8$N\e(B @code{spam-check-*} \e$B4X?t$r;2>H$7$F$/$@$5$$!#\e(B
+
+\e$B%V%i%C%/%\%C%/%9$,!"$=$l$,F0:n$9$k$?$a$K%a%C%;!<%8A4BN$rI,MW$H$9$kE}7WE*\e(B
+\e$B%a!<%kJ,@O4o$G$"$k$N$J$i$P!"\e(B
+@code{spam-list-of-statistical-checks} \e$B$K\e(B @code{spam-use-blackbox} \e$B$rDI\e(B
+\e$B2C$9$k$3$H$rK:$l$J$$$G2<$5$$!#\e(B
@end enumerate
Spam \e$B$H\e(B ham \e$B%a%C%;!<%8$r=hM}$9$k$K$O!"0J2<$rMQ0U$7$F2<$5$$\e(B:
Write the @code{spam-check-blackbox} function. It should return
@samp{nil} or @code{spam-split-group}. See the existing
@code{spam-check-*} functions for examples of what you can do.
+
+Make sure to add @code{spam-use-blackbox} to
+@code{spam-list-of-statistical-checks} if Blackbox is a statistical
+mail analyzer that needs the full message body to operate.
+
@end enumerate
For processing spam and ham messages, provide the following: