aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2004-09-10 21:36:15 +0000
committerMiles Bader2004-09-10 21:36:15 +0000
commit7cb0aa56ca5374e0cff9bf0ff815559bb5954a52 (patch)
tree4c6de170cf680ea1a6c85a8a6b5d97e0484c0e14
parentd528bff7457eee0a714a17b8f8f68e2cfe4d3314 (diff)
downloademacs-7cb0aa56ca5374e0cff9bf0ff815559bb5954a52.tar.gz
emacs-7cb0aa56ca5374e0cff9bf0ff815559bb5954a52.zip
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-539
Merge from gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-21 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-22 Update from CVS: lisp/nndb.el (require): Remove tcp and duplicate cl. * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-23 Update from CVS
-rw-r--r--lisp/gnus/ChangeLog12
-rw-r--r--lisp/gnus/gnus-registry.el26
-rw-r--r--lisp/gnus/nndb.el8
-rw-r--r--lisp/gnus/nnimap.el7
-rw-r--r--man/ChangeLog25
-rw-r--r--man/gnus.texi250
6 files changed, 189 insertions, 139 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 0f0f4697c47..5d3e2fa8957 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,15 @@
12004-09-10 Teodor Zlatanov <tzz@lifelogs.com>
2
3 * nnimap.el (nnimap-open-connection): allow 'imaps' as a synonym
4 for the 'imap' port in netrc files
5
6 * gnus-registry.el (gnus-registry-trim): watch out for negatives
7 in gnus-registry-trim
8
92004-09-10 Simon Josefsson <jas@extundo.com>
10
11 * nndb.el (require): Remove tcp and duplicate cl.
12
12004-09-08 Reiner Steib <Reiner.Steib@gmx.de> 132004-09-08 Reiner Steib <Reiner.Steib@gmx.de>
2 14
3 * nntp.el (nntp): New customization group. 15 * nntp.el (nntp): New customization group.
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index 9a8d77d3b24..33238ef4552 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -266,25 +266,27 @@ way."
266(defun gnus-registry-trim (alist) 266(defun gnus-registry-trim (alist)
267 "Trim alist to size, using gnus-registry-max-entries." 267 "Trim alist to size, using gnus-registry-max-entries."
268 (if (null gnus-registry-max-entries) 268 (if (null gnus-registry-max-entries)
269 alist ; just return the alist 269 alist ; just return the alist
270 ;; else, when given max-entries, trim the alist 270 ;; else, when given max-entries, trim the alist
271 (let ((timehash (make-hash-table 271 (let* ((timehash (make-hash-table
272 :size 4096 272 :size 4096
273 :test 'equal))) 273 :test 'equal))
274 (trim-length (- (length alist) gnus-registry-max-entries))
275 (trim-length (if (natnump trim-length) trim-length 0)))
274 (maphash 276 (maphash
275 (lambda (key value) 277 (lambda (key value)
276 (puthash key (gnus-registry-fetch-extra key 'mtime) timehash)) 278 (puthash key (gnus-registry-fetch-extra key 'mtime) timehash))
277 gnus-registry-hashtb) 279 gnus-registry-hashtb)
278 280
279 ;; we use the return value of this setq, which is the trimmed alist 281 ;; we use the return value of this setq, which is the trimmed alist
280 (setq alist 282 (setq alist
281 (nthcdr 283 (nthcdr
282 (- (length alist) gnus-registry-max-entries) 284 trim-length
283 (sort alist 285 (sort alist
284 (lambda (a b) 286 (lambda (a b)
285 (time-less-p 287 (time-less-p
286 (cdr (gethash (car a) timehash)) 288 (cdr (gethash (car a) timehash))
287 (cdr (gethash (car b) timehash)))))))))) 289 (cdr (gethash (car b) timehash))))))))))
288 290
289(defun alist-to-hashtable (alist) 291(defun alist-to-hashtable (alist)
290 "Build a hashtable from the values in ALIST." 292 "Build a hashtable from the values in ALIST."
diff --git a/lisp/gnus/nndb.el b/lisp/gnus/nndb.el
index d29d16fa690..bd8523f11b2 100644
--- a/lisp/gnus/nndb.el
+++ b/lisp/gnus/nndb.el
@@ -1,6 +1,6 @@
1;;; nndb.el --- nndb access for Gnus 1;;; nndb.el --- nndb access for Gnus
2 2
3;; Copyright (C) 1997, 1998, 2000, 2003 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
4 4
5;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> 5;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
6;; Kai Grossjohann <grossjohann@ls6.informatik.uni-dortmund.de> 6;; Kai Grossjohann <grossjohann@ls6.informatik.uni-dortmund.de>
@@ -60,12 +60,6 @@
60(eval-when-compile (require 'cl)) 60(eval-when-compile (require 'cl))
61 61
62(eval-and-compile 62(eval-and-compile
63 (unless (fboundp 'open-network-stream)
64 (require 'tcp)))
65
66(eval-when-compile (require 'cl))
67
68(eval-and-compile
69 (autoload 'news-setup "rnewspost") 63 (autoload 'news-setup "rnewspost")
70 (autoload 'news-reply-mode "rnewspost") 64 (autoload 'news-reply-mode "rnewspost")
71 (autoload 'cancel-timer "timer") 65 (autoload 'cancel-timer "timer")
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index fc33b9a48eb..782e987862b 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -723,10 +723,15 @@ If EXAMINE is non-nil the group is selected read-only."
723 (int-to-string nnimap-server-port) 723 (int-to-string nnimap-server-port)
724 "imap")) 724 "imap"))
725 (alist (or (gnus-netrc-machine list server port "imap") 725 (alist (or (gnus-netrc-machine list server port "imap")
726 (gnus-netrc-machine list server port "imaps")
726 (gnus-netrc-machine list 727 (gnus-netrc-machine list
727 (or nnimap-server-address 728 (or nnimap-server-address
728 nnimap-address) 729 nnimap-address)
729 port "imap"))) 730 port "imap"))
731 (gnus-netrc-machine list
732 (or nnimap-server-address
733 nnimap-address)
734 port "imaps")))
730 (user (gnus-netrc-get alist "login")) 735 (user (gnus-netrc-get alist "login"))
731 (passwd (gnus-netrc-get alist "password"))) 736 (passwd (gnus-netrc-get alist "password")))
732 (if (imap-authenticate user passwd nnimap-server-buffer) 737 (if (imap-authenticate user passwd nnimap-server-buffer)
diff --git a/man/ChangeLog b/man/ChangeLog
index fd7e5fcfe6a..1dea7a26a39 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,28 @@
12004-09-10 Simon Josefsson <jas@extundo.com>
2
3 * gnus.texi (IMAP): Add example. Suggested and partially written
4 by Steinar Bang <sb@dod.no>.
5
62004-09-10 Teodor Zlatanov <tzz@lifelogs.com>
7
8 * gnus.texi (IMAP): add comments about imaps synonym to imap in
9 netrc syntax
10
112004-09-10 Teodor Zlatanov <tzz@lifelogs.com>
12
13 * gnus.texi (Spam ELisp Package Sequence of Events): some clarifications
14 (Spam ELisp Package Global Variables)
15 (Spam ELisp Package Global Variables): more clarifications
16
172004-09-10 Teodor Zlatanov <tzz@lifelogs.com>
18
19 * gnus.texi (Spam ELisp Package Filtering of Incoming Mail):
20 mention spam-split does not modify incoming mail
21
222004-09-10 Teodor Zlatanov <tzz@lifelogs.com>
23
24 * gnus.texi (Spam ELisp Package Sequence of Events): fix typo
25
12004-09-10 Eli Zaretskii <eliz@gnu.org> 262004-09-10 Eli Zaretskii <eliz@gnu.org>
2 27
3 * Makefile.in (../info/gnus, gnus.dvi): Depend on gnus-faq.texi 28 * Makefile.in (../info/gnus, gnus.dvi): Depend on gnus-faq.texi
diff --git a/man/gnus.texi b/man/gnus.texi
index 763fe0c98a9..b435a34b462 100644
--- a/man/gnus.texi
+++ b/man/gnus.texi
@@ -14011,8 +14011,8 @@ is run. That's why @code{(widen)} needs to be called after
14011@code{save-excursion} and @code{save-restriction} in the example 14011@code{save-excursion} and @code{save-restriction} in the example
14012above. Also note that with the nnimap backend, message bodies will 14012above. Also note that with the nnimap backend, message bodies will
14013not be downloaded by default. You need to set 14013not be downloaded by default. You need to set
14014@code{nnimap-split-download-body} to t to do that (@pxref{Splitting in 14014@code{nnimap-split-download-body} to @code{t} to do that
14015IMAP}). 14015(@pxref{Splitting in IMAP}).
14016 14016
14017@item (! @var{func} @var{split}) 14017@item (! @var{func} @var{split})
14018If the split is a list, and the first element is @code{!}, then 14018If the split is a list, and the first element is @code{!}, then
@@ -16209,7 +16209,17 @@ RFC 2060 for more information on valid strings.
16209A file containing credentials used to log in on servers. The format is 16209A file containing credentials used to log in on servers. The format is
16210(almost) the same as the @code{ftp} @file{~/.netrc} file. See the 16210(almost) the same as the @code{ftp} @file{~/.netrc} file. See the
16211variable @code{nntp-authinfo-file} for exact syntax; also see 16211variable @code{nntp-authinfo-file} for exact syntax; also see
16212@ref{NNTP}. 16212@ref{NNTP}. An example of an .authinfo line for an IMAP server, is:
16213
16214@example
16215machine students.uio.no login larsi password geheimnis port imap
16216@end example
16217
16218Note that it should be @code{port imap}, or @code{port 143}, if you
16219use a @code{nnimap-stream} of @code{tls} or @code{ssl}, even if the
16220actual port number used is port 993 for secured IMAP. For
16221convenience, Gnus will accept @code{port imaps} as a synonym of
16222@code{port imap}.
16213 16223
16214@item nnimap-need-unselect-to-notice-new-mail 16224@item nnimap-need-unselect-to-notice-new-mail
16215@vindex nnimap-need-unselect-to-notice-new-mail 16225@vindex nnimap-need-unselect-to-notice-new-mail
@@ -22249,16 +22259,18 @@ server or when you sort through incoming mail. If you get 200 spam
22249messages per day from @samp{random-address@@vmadmin.com}, you block 22259messages per day from @samp{random-address@@vmadmin.com}, you block
22250@samp{vmadmin.com}. If you get 200 messages about @samp{VIAGRA}, you 22260@samp{vmadmin.com}. If you get 200 messages about @samp{VIAGRA}, you
22251discard all messages with @samp{VIAGRA} in the message. If you get 22261discard all messages with @samp{VIAGRA} in the message. If you get
22252lots of spam from China, for example, you try to filter all mail from 22262lots of spam from Bulgaria, for example, you try to filter all mail
22253Chinese IPs. 22263from Bulgarian IPs.
22264
22265This, unfortunately, is a great way to discard legitimate e-mail. The
22266risks of blocking a whole country (Bulgaria, Norway, Nigeria, China,
22267etc.) or even a continent (Asia, Africa, Europe, etc.) from contacting
22268you should be obvious, so don't do it if you have the choice.
22254 22269
22255This, unfortunately, is a great way to discard legitimate e-mail. For 22270In another instance, the very informative and useful RISKS digest has
22256instance, the very informative and useful RISKS digest has been 22271been blocked by overzealous mail filters because it @strong{contained}
22257blocked by overzealous mail filters because it @strong{contained} 22272words that were common in spam messages. Nevertheless, in isolated
22258words that were common in spam messages. The risks of blocking a 22273cases, with great care, direct filtering of mail can be useful.
22259whole country from contacting you should also be obvious, so don't do
22260it if you have the choice. Nevertheless, in isolated cases, with
22261great care, direct filtering of mail can be useful.
22262 22274
22263Another approach to filtering e-mail is the distributed spam 22275Another approach to filtering e-mail is the distributed spam
22264processing, for instance DCC implements such a system. In essence, 22276processing, for instance DCC implements such a system. In essence,
@@ -22435,8 +22447,8 @@ call the external tools during splitting. Example fancy split method:
22435 22447
22436Note that with the nnimap backend, message bodies will not be 22448Note that with the nnimap backend, message bodies will not be
22437downloaded by default. You need to set 22449downloaded by default. You need to set
22438@code{nnimap-split-download-body} to t to do that (@pxref{Splitting in 22450@code{nnimap-split-download-body} to @code{t} to do that
22439IMAP}). 22451(@pxref{Splitting in IMAP}).
22440 22452
22441That is about it. As some spam is likely to get through anyway, you 22453That is about it. As some spam is likely to get through anyway, you
22442might want to have a nifty function to call when you happen to read 22454might want to have a nifty function to call when you happen to read
@@ -22672,8 +22684,8 @@ any are set, and the processed mail is moved to the
22672@code{ham-process-destination} or the @code{spam-process-destination} 22684@code{ham-process-destination} or the @code{spam-process-destination}
22673depending on the article's classification. If the 22685depending on the article's classification. If the
22674@code{ham-process-destination} or the @code{spam-process-destination}, 22686@code{ham-process-destination} or the @code{spam-process-destination},
22675whichever is appropriate, are nil, the article is left in the current 22687whichever is appropriate, are @code{nil}, the article is left in the
22676group. 22688current group.
22677 22689
22678If a spam is found in any group (this can be changed to only non-spam 22690If a spam is found in any group (this can be changed to only non-spam
22679groups with @code{spam-move-spam-nonspam-groups-only}), it is 22691groups with @code{spam-move-spam-nonspam-groups-only}), it is
@@ -22685,11 +22697,11 @@ You have to load the @code{gnus-registry.el} package and enable the
22685@code{spam-log-to-registry} variable if you want spam to be processed 22697@code{spam-log-to-registry} variable if you want spam to be processed
22686no more than once. Thus, spam is detected and processed everywhere, 22698no more than once. Thus, spam is detected and processed everywhere,
22687which is what most people want. If the 22699which is what most people want. If the
22688@code{spam-process-destination} is nil, the spam is marked as 22700@code{spam-process-destination} is @code{nil}, the spam is marked as
22689expired, which is usually the right thing to do. 22701expired, which is usually the right thing to do.
22690 22702
22691If spam can not be moved - because of a read-only backend such as NNTP, 22703If spam can not be moved---because of a read-only backend such as
22692for example, it will be copied. 22704@acronym{NNTP}, for example, it will be copied.
22693 22705
22694If a ham mail is found in a ham group, as determined by the 22706If a ham mail is found in a ham group, as determined by the
22695@code{ham-marks} parameter, it is processed as ham by the active ham 22707@code{ham-marks} parameter, it is processed as ham by the active ham
@@ -22703,11 +22715,11 @@ no more than once. Thus, ham is detected and processed only when
22703necessary, which is what most people want. More on this in 22715necessary, which is what most people want. More on this in
22704@xref{Spam ELisp Package Configuration Examples}. 22716@xref{Spam ELisp Package Configuration Examples}.
22705 22717
22706If ham can not be moved - because of a read-only backend such as NNTP, 22718If ham can not be moved---because of a read-only backend such as
22707for example, it will be copied. 22719@acronym{NNTP}, for example, it will be copied.
22708 22720
22709If all this seems confusing, don't worry. Soon it will be as natural 22721If all this seems confusing, don't worry. Soon it will be as natural
22710as typing Lisp one-liners on a neural interface... err, sorry, that's 22722as typing Lisp one-liners on a neural interface@dots{} err, sorry, that's
2271150 years in the future yet. Just trust us, it's not so bad. 2272350 years in the future yet. Just trust us, it's not so bad.
22712 22724
22713@node Spam ELisp Package Filtering of Incoming Mail 22725@node Spam ELisp Package Filtering of Incoming Mail
@@ -22728,6 +22740,8 @@ Note that the fancy split may be called @code{nnmail-split-fancy} or
22728@code{nnimap-split-fancy}, depending on whether you use the nnmail or 22740@code{nnimap-split-fancy}, depending on whether you use the nnmail or
22729nnimap back ends to retrieve your mail. 22741nnimap back ends to retrieve your mail.
22730 22742
22743Also, @code{spam-split} will not modify incoming mail in any way.
22744
22731The @code{spam-split} function will process incoming mail and send the 22745The @code{spam-split} function will process incoming mail and send the
22732mail considered to be spam into the group name given by the variable 22746mail considered to be spam into the group name given by the variable
22733@code{spam-split-group}. By default that group name is @samp{spam}, 22747@code{spam-split-group}. By default that group name is @samp{spam},
@@ -22741,7 +22755,7 @@ actually give you the group
22741work depending on your server's tolerance for strange group names. 22755work depending on your server's tolerance for strange group names.
22742 22756
22743You can also give @code{spam-split} a parameter, 22757You can also give @code{spam-split} a parameter,
22744e.g. @samp{'spam-use-regex-headers} or @samp{"maybe-spam"}. Why is 22758e.g. @code{spam-use-regex-headers} or @code{"maybe-spam"}. Why is
22745this useful? 22759this useful?
22746 22760
22747Take these split rules (with @code{spam-use-regex-headers} and 22761Take these split rules (with @code{spam-use-regex-headers} and
@@ -22751,7 +22765,7 @@ Take these split rules (with @code{spam-use-regex-headers} and
22751 nnimap-split-fancy '(| 22765 nnimap-split-fancy '(|
22752 (any "ding" "ding") 22766 (any "ding" "ding")
22753 (: spam-split) 22767 (: spam-split)
22754 ;; default mailbox 22768 ;; @r{default mailbox}
22755 "mail") 22769 "mail")
22756@end example 22770@end example
22757 22771
@@ -22767,14 +22781,15 @@ You can let SpamAssassin headers supersede ding rules, but all other
22767regex-headers check) will be after the ding rule: 22781regex-headers check) will be after the ding rule:
22768 22782
22769@example 22783@example
22770 nnimap-split-fancy '(| 22784nnimap-split-fancy
22771;;; all spam detected by spam-use-regex-headers goes to "regex-spam" 22785 '(|
22772 (: spam-split "regex-spam" 'spam-use-regex-headers) 22786 ;; @r{all spam detected by @code{spam-use-regex-headers} goes to @samp{regex-spam}}
22773 (any "ding" "ding") 22787 (: spam-split "regex-spam" 'spam-use-regex-headers)
22774;;; all other spam detected by spam-split goes to spam-split-group 22788 (any "ding" "ding")
22775 (: spam-split) 22789 ;; @r{all other spam detected by spam-split goes to @code{spam-split-group}}
22776 ;; default mailbox 22790 (: spam-split)
22777 "mail") 22791 ;; @r{default mailbox}
22792 "mail")
22778@end example 22793@end example
22779 22794
22780This lets you invoke specific @code{spam-split} checks depending on 22795This lets you invoke specific @code{spam-split} checks depending on
@@ -22827,7 +22842,7 @@ processors take mail known to be spam and process it so similar spam
22827will be detected later. 22842will be detected later.
22828 22843
22829The format of the spam or ham processor entry used to be a symbol, 22844The format of the spam or ham processor entry used to be a symbol,
22830but now it is a cons cell. See the individual spam processor entries 22845but now it is a @sc{cons} cell. See the individual spam processor entries
22831for more information. 22846for more information.
22832 22847
22833@vindex gnus-spam-newsgroup-contents 22848@vindex gnus-spam-newsgroup-contents
@@ -22905,18 +22920,16 @@ not done for @emph{unclassified} or @emph{ham} groups. Also, any
22905determined by either the @code{ham-process-destination} group 22920determined by either the @code{ham-process-destination} group
22906parameter or a match in the @code{gnus-ham-process-destinations} 22921parameter or a match in the @code{gnus-ham-process-destinations}
22907variable, which is a list of regular expressions matched with group 22922variable, which is a list of regular expressions matched with group
22908names (it's easiest to customize this variable with 22923names (it's easiest to customize this variable with @kbd{M-x
22909@code{customize-variable gnus-ham-process-destinations}). Each 22924customize-variable @key{RET} gnus-ham-process-destinations}). Each
22910newsgroup specification has the format (REGEXP PROCESSOR) in a 22925group name list is a standard Lisp list, if you prefer to customize
22911standard Lisp list, if you prefer to customize the variable manually. 22926the variable manually. If the @code{ham-process-destination}
22912The ultimate location is a group name or names. If the 22927parameter is not set, ham articles are left in place. If the
22913@code{ham-process-destination} parameter is not set, ham articles are
22914left in place. If the
22915@code{spam-mark-ham-unread-before-move-from-spam-group} parameter is 22928@code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
22916set, the ham articles are marked as unread before being moved. 22929set, the ham articles are marked as unread before being moved.
22917 22930
22918If ham can not be moved - because of a read-only backend such as NNTP, 22931If ham can not be moved---because of a read-only backend such as
22919for example, it will be copied. 22932@acronym{NNTP}, for example, it will be copied.
22920 22933
22921Note that you can use multiples destinations per group or regular 22934Note that you can use multiples destinations per group or regular
22922expression! This enables you to send your ham to a regular mail 22935expression! This enables you to send your ham to a regular mail
@@ -22944,18 +22957,16 @@ When you leave a @emph{ham} or @emph{unclassified} group, all
22944the @code{spam-process-destination} group parameter or a match in the 22957the @code{spam-process-destination} group parameter or a match in the
22945@code{gnus-spam-process-destinations} variable, which is a list of 22958@code{gnus-spam-process-destinations} variable, which is a list of
22946regular expressions matched with group names (it's easiest to 22959regular expressions matched with group names (it's easiest to
22947customize this variable with @code{customize-variable 22960customize this variable with @kbd{M-x customize-variable @key{RET}
22948gnus-spam-process-destinations}). Each newsgroup specification has 22961gnus-spam-process-destinations}). Each group name list is a standard
22949the repeated format (REGEXP GROUP) and they are all in a standard Lisp 22962Lisp list, if you prefer to customize the variable manually. If the
22950list, if you prefer to customize the variable manually. The ultimate
22951location is a group name or names. If the
22952@code{spam-process-destination} parameter is not set, the spam 22963@code{spam-process-destination} parameter is not set, the spam
22953articles are only expired. The group name is fully qualified, meaning 22964articles are only expired. The group name is fully qualified, meaning
22954that if you see @samp{nntp:servername} before the group name in the 22965that if you see @samp{nntp:servername} before the group name in the
22955group buffer then you need it here as well. 22966group buffer then you need it here as well.
22956 22967
22957If spam can not be moved - because of a read-only backend such as NNTP, 22968If spam can not be moved---because of a read-only backend such as
22958for example, it will be copied. 22969@acronym{NNTP}, for example, it will be copied.
22959 22970
22960Note that you can use multiples destinations per group or regular 22971Note that you can use multiples destinations per group or regular
22961expression! This enables you to send your spam to multiple @emph{spam 22972expression! This enables you to send your spam to multiple @emph{spam
@@ -22971,15 +22982,15 @@ entries, this won't work as well as it does without a limit.
22971 22982
22972@vindex spam-mark-only-unseen-as-spam 22983@vindex spam-mark-only-unseen-as-spam
22973Set this variable if you want only unseen articles in spam groups to 22984Set this variable if you want only unseen articles in spam groups to
22974be marked as spam. By default, it is set. If you set it to nil, 22985be marked as spam. By default, it is set. If you set it to
22975unread articles will also be marked as spam. 22986@code{nil}, unread articles will also be marked as spam.
22976 22987
22977@vindex spam-mark-ham-unread-before-move-from-spam-group 22988@vindex spam-mark-ham-unread-before-move-from-spam-group
22978Set this variable if you want ham to be unmarked before it is moved 22989Set this variable if you want ham to be unmarked before it is moved
22979out of the spam group. This is very useful when you use something 22990out of the spam group. This is very useful when you use something
22980like the tick mark @samp{!} to mark ham - the article will be placed 22991like the tick mark @samp{!} to mark ham---the article will be placed
22981in your ham-process-destination, unmarked as if it came fresh from 22992in your @code{ham-process-destination}, unmarked as if it came fresh
22982the mail server. 22993from the mail server.
22983 22994
22984@vindex spam-autodetect-recheck-messages 22995@vindex spam-autodetect-recheck-messages
22985When autodetecting spam, this variable tells @code{spam.el} whether 22996When autodetecting spam, this variable tells @code{spam.el} whether
@@ -22997,87 +23008,86 @@ spam. It is recommended that you leave it off.
22997 23008
22998From Ted Zlatanov <tzz@@lifelogs.com>. 23009From Ted Zlatanov <tzz@@lifelogs.com>.
22999@example 23010@example
23000 23011;; @r{for @code{gnus-registry-split-fancy-with-parent} and spam autodetection}
23001;; for gnus-registry-split-fancy-with-parent and spam autodetection 23012;; @r{see @file{gnus-registry.el} for more information}
23002;; see gnus-registry.el for more information
23003(gnus-registry-initialize) 23013(gnus-registry-initialize)
23004(spam-initialize) 23014(spam-initialize)
23005 23015
23006;; I like control-S for marking spam 23016;; @r{I like @kbd{C-s} for marking spam}
23007(define-key gnus-summary-mode-map "\C-s" 'gnus-summary-mark-as-spam) 23017(define-key gnus-summary-mode-map "\C-s" 'gnus-summary-mark-as-spam)
23008 23018
23009(setq 23019(setq
23010 spam-log-to-registry t ;; for spam autodetection 23020 spam-log-to-registry t ; @r{for spam autodetection}
23011 spam-use-BBDB t 23021 spam-use-BBDB t
23012 spam-use-regex-headers t ; catch X-Spam-Flag (SpamAssassin) 23022 spam-use-regex-headers t ; @r{catch X-Spam-Flag (SpamAssassin)}
23013 ;; all groups with "spam" in the name contain spam 23023 ;; @r{all groups with @samp{spam} in the name contain spam}
23014 gnus-spam-newsgroup-contents '(("spam" gnus-group-spam-classification-spam)) 23024 gnus-spam-newsgroup-contents
23015 ;; see documentation for these 23025 '(("spam" gnus-group-spam-classification-spam))
23026 ;; @r{see documentation for these}
23016 spam-move-spam-nonspam-groups-only nil 23027 spam-move-spam-nonspam-groups-only nil
23017 spam-mark-only-unseen-as-spam t 23028 spam-mark-only-unseen-as-spam t
23018 spam-mark-ham-unread-before-move-from-spam-group t 23029 spam-mark-ham-unread-before-move-from-spam-group t
23019 nnimap-split-rule 'nnimap-split-fancy 23030 nnimap-split-rule 'nnimap-split-fancy
23020 ;; understand what this does before you copy it to your own setup! 23031 ;; @r{understand what this does before you copy it to your own setup!}
23021 nnimap-split-fancy '(| 23032 nnimap-split-fancy '(|
23022 ;; trace references to parents and put in their group 23033 ;; @r{trace references to parents and put in their group}
23023 (: gnus-registry-split-fancy-with-parent) 23034 (: gnus-registry-split-fancy-with-parent)
23024 ;; this will catch server-side SpamAssassin tags 23035 ;; @r{this will catch server-side SpamAssassin tags}
23025 (: spam-split 'spam-use-regex-headers) 23036 (: spam-split 'spam-use-regex-headers)
23026 (any "ding" "ding") 23037 (any "ding" "ding")
23027 ;; note that spam by default will go to "spam" 23038 ;; @r{note that spam by default will go to @samp{spam}}
23028 (: spam-split) 23039 (: spam-split)
23029 ;; default mailbox 23040 ;; @r{default mailbox}
23030 "mail")) 23041 "mail"))
23031 23042
23032;; my parameters, set with `G p' 23043;; @r{my parameters, set with @kbd{G p}}
23033 23044
23034;; all nnml groups, and all nnimap groups except 23045;; @r{all nnml groups, and all nnimap groups except}
23035;; "nnimap+mail.lifelogs.com:train" and 23046;; @r{@samp{nnimap+mail.lifelogs.com:train} and}
23036;; "nnimap+mail.lifelogs.com:spam": any spam goes to nnimap training, 23047;; @r{@samp{nnimap+mail.lifelogs.com:spam}: any spam goes to nnimap training,}
23037;; because it must have been detected manually 23048;; @r{because it must have been detected manually}
23038 23049
23039((spam-process-destination . "nnimap+mail.lifelogs.com:train")) 23050((spam-process-destination . "nnimap+mail.lifelogs.com:train"))
23040 23051
23041;; all NNTP groups 23052;; @r{all @acronym{NNTP} groups}
23042;; autodetect spam with the blacklist and ham with the BBDB 23053;; @r{autodetect spam with the blacklist and ham with the BBDB}
23043((spam-autodetect-methods spam-use-blacklist spam-use-BBDB) 23054((spam-autodetect-methods spam-use-blacklist spam-use-BBDB)
23044;; send all spam to the training group 23055;; @r{send all spam to the training group}
23045 (spam-process-destination . "nnimap+mail.lifelogs.com:train")) 23056 (spam-process-destination . "nnimap+mail.lifelogs.com:train"))
23046 23057
23047;; only some NNTP groups, where I want to autodetect spam 23058;; @r{only some @acronym{NNTP} groups, where I want to autodetect spam}
23048((spam-autodetect . t)) 23059((spam-autodetect . t))
23049 23060
23050;; my nnimap "nnimap+mail.lifelogs.com:spam" group 23061;; @r{my nnimap @samp{nnimap+mail.lifelogs.com:spam} group}
23051 23062
23052;; this is a spam group 23063;; @r{this is a spam group}
23053((spam-contents gnus-group-spam-classification-spam) 23064((spam-contents gnus-group-spam-classification-spam)
23054 23065
23055 ;; any spam (which happens when I enter for all unseen messages, 23066 ;; @r{any spam (which happens when I enter for all unseen messages,}
23056 ;; because of the gnus-spam-newsgroup-contents setting above), goes to 23067 ;; @r{because of the @code{gnus-spam-newsgroup-contents} setting above), goes to}
23057 ;; "nnimap+mail.lifelogs.com:train" unless I mark it as ham 23068 ;; @r{@samp{nnimap+mail.lifelogs.com:train} unless I mark it as ham}
23058 23069
23059 (spam-process-destination "nnimap+mail.lifelogs.com:train") 23070 (spam-process-destination "nnimap+mail.lifelogs.com:train")
23060 23071
23061 ;; any ham goes to my "nnimap+mail.lifelogs.com:mail" folder, but 23072 ;; @r{any ham goes to my @samp{nnimap+mail.lifelogs.com:mail} folder, but}
23062 ;; also to my "nnimap+mail.lifelogs.com:trainham" folder for training 23073 ;; @r{also to my @samp{nnimap+mail.lifelogs.com:trainham} folder for training}
23063 23074
23064 (ham-process-destination "nnimap+mail.lifelogs.com:mail" 23075 (ham-process-destination "nnimap+mail.lifelogs.com:mail"
23065 "nnimap+mail.lifelogs.com:trainham") 23076 "nnimap+mail.lifelogs.com:trainham")
23066 ;; in this group, only '!' marks are ham 23077 ;; @r{in this group, only @samp{!} marks are ham}
23067 (ham-marks 23078 (ham-marks
23068 (gnus-ticked-mark)) 23079 (gnus-ticked-mark))
23069 ;; remembers senders in the blacklist on the way out - this is 23080 ;; @r{remembers senders in the blacklist on the way out---this is}
23070 ;; definitely not needed, it just makes me feel better 23081 ;; @r{definitely not needed, it just makes me feel better}
23071 (spam-process (gnus-group-spam-exit-processor-blacklist))) 23082 (spam-process (gnus-group-spam-exit-processor-blacklist)))
23072 23083
23073;; Later, on the IMAP server I use the "train" group for training 23084;; @r{Later, on the @acronym{IMAP} server I use the @samp{train} group for training}
23074;; SpamAssassin to recognize spam, and the "trainham" group for 23085;; @r{SpamAssassin to recognize spam, and the @samp{trainham} group fora}
23075;; recognizing ham - but Gnus has nothing to do with it. 23086;; @r{recognizing ham---but Gnus has nothing to do with it.}
23076 23087
23077@end example 23088@end example
23078 23089
23079@subsubheading Using @file{spam.el} on an IMAP server with a statistical filter on the server 23090@subsubheading Using @file{spam.el} on an IMAP server with a statistical filter on the server
23080
23081From Reiner Steib <reiner.steib@@gmx.de>. 23091From Reiner Steib <reiner.steib@@gmx.de>.
23082 23092
23083My provider has set up bogofilter (in combination with @acronym{DCC}) on 23093My provider has set up bogofilter (in combination with @acronym{DCC}) on
@@ -23115,7 +23125,7 @@ Because of the @code{gnus-group-spam-classification-spam} entry, all
23115messages are marked as spam (with @code{$}). When I find a false 23125messages are marked as spam (with @code{$}). When I find a false
23116positive, I mark the message with some other ham mark (@code{ham-marks}, 23126positive, I mark the message with some other ham mark (@code{ham-marks},
23117@ref{Spam ELisp Package Global Variables}). On group exit, those 23127@ref{Spam ELisp Package Global Variables}). On group exit, those
23118messages are copied to both groups, @samp{INBOX} (were I want to have 23128messages are copied to both groups, @samp{INBOX} (where I want to have
23119the article) and @samp{training.ham} (for training bogofilter) and 23129the article) and @samp{training.ham} (for training bogofilter) and
23120deleted from the @samp{spam.detected} folder. 23130deleted from the @samp{spam.detected} folder.
23121 23131
@@ -23147,7 +23157,7 @@ groups as spam and reports the to Gmane at group exit:
23147 (spam-process (gnus-group-spam-exit-processor-report-gmane))) 23157 (spam-process (gnus-group-spam-exit-processor-report-gmane)))
23148@end lisp 23158@end lisp
23149 23159
23150Additionally, I use `(setq spam-report-gmane-use-article-number nil)' 23160Additionally, I use @code{(setq spam-report-gmane-use-article-number nil)}
23151because I don't read the groups directly from news.gmane.org, but 23161because I don't read the groups directly from news.gmane.org, but
23152through my local news server (leafnode). I.e. the article numbers are 23162through my local news server (leafnode). I.e. the article numbers are
23153not the same as on news.gmane.org, thus @code{spam-report.el} has to check 23163not the same as on news.gmane.org, thus @code{spam-report.el} has to check
@@ -23702,7 +23712,7 @@ the same way, we promise.
23702Add this symbol to a group's @code{spam-process} parameter by 23712Add this symbol to a group's @code{spam-process} parameter by
23703customizing the group parameter or the 23713customizing the group parameter or the
23704@code{gnus-spam-process-newsgroups} variable. When this symbol is added 23714@code{gnus-spam-process-newsgroups} variable. When this symbol is added
23705to a grup's @code{spam-process} parameter, the ham-marked articles in 23715to a group's @code{spam-process} parameter, the ham-marked articles in
23706@emph{ham} groups will be sent to the SpamOracle as samples of ham 23716@emph{ham} groups will be sent to the SpamOracle as samples of ham
23707messages. Note that this ham processor has no effect in @emph{spam} or 23717messages. Note that this ham processor has no effect in @emph{spam} or
23708@emph{unclassified} groups. 23718@emph{unclassified} groups.
@@ -23742,7 +23752,7 @@ incoming mail, provide the following:
23742@enumerate 23752@enumerate
23743 23753
23744@item 23754@item
23745code 23755Code
23746 23756
23747@lisp 23757@lisp
23748(defvar spam-use-blackbox nil 23758(defvar spam-use-blackbox nil
@@ -23750,32 +23760,34 @@ code
23750@end lisp 23760@end lisp
23751 23761
23752Add 23762Add
23753@example 23763@lisp
23754 (spam-use-blackbox . spam-check-blackbox) 23764(spam-use-blackbox . spam-check-blackbox)
23755@end example 23765@end lisp
23756to @code{spam-list-of-checks}. 23766to @code{spam-list-of-checks}.
23757 23767
23758Add 23768Add
23759@example 23769@lisp
23760 (gnus-group-ham-exit-processor-blackbox ham spam-use-blackbox) 23770(gnus-group-ham-exit-processor-blackbox ham spam-use-blackbox)
23761 (gnus-group-spam-exit-processor-blackbox spam spam-use-blackbox) 23771(gnus-group-spam-exit-processor-blackbox spam spam-use-blackbox)
23762@end example 23772@end lisp
23773
23763to @code{spam-list-of-processors}. 23774to @code{spam-list-of-processors}.
23764 23775
23765Add 23776Add
23766@example 23777@lisp
23767 (spam-use-blackbox spam-blackbox-register-routine 23778(spam-use-blackbox spam-blackbox-register-routine
23768 nil 23779 nil
23769 spam-blackbox-unregister-routine 23780 spam-blackbox-unregister-routine
23770 nil) 23781 nil)
23771@end example 23782@end lisp
23783
23772to @code{spam-registration-functions}. Write the register/unregister 23784to @code{spam-registration-functions}. Write the register/unregister
23773routines using the bogofilter register/unregister routines as a 23785routines using the bogofilter register/unregister routines as a
23774start, or other restister/unregister routines more appropriate to 23786start, or other restister/unregister routines more appropriate to
23775Blackbox. 23787Blackbox.
23776 23788
23777@item 23789@item
23778functionality 23790Functionality
23779 23791
23780Write the @code{spam-check-blackbox} function. It should return 23792Write the @code{spam-check-blackbox} function. It should return
23781@samp{nil} or @code{spam-split-group}, observing the other 23793@samp{nil} or @code{spam-split-group}, observing the other
@@ -23794,7 +23806,7 @@ For processing spam and ham messages, provide the following:
23794@enumerate 23806@enumerate
23795 23807
23796@item 23808@item
23797code 23809Code
23798 23810
23799Note you don't have to provide a spam or a ham processor. Only 23811Note you don't have to provide a spam or a ham processor. Only
23800provide them if Blackbox supports spam or ham processing. 23812provide them if Blackbox supports spam or ham processing.
@@ -23819,18 +23831,18 @@ Only applicable to non-spam (unclassified and ham) groups.")
23819Gnus parameters 23831Gnus parameters
23820 23832
23821Add 23833Add
23822@example 23834@lisp
23823 (const :tag "Spam: Blackbox" (spam spam-use-blackbox)) 23835(const :tag "Spam: Blackbox" (spam spam-use-blackbox))
23824 (const :tag "Ham: Blackbox" (ham spam-use-blackbox)) 23836(const :tag "Ham: Blackbox" (ham spam-use-blackbox))
23825@end example 23837@end lisp
23826to the @code{spam-process} group parameter in @code{gnus.el}. Make 23838to the @code{spam-process} group parameter in @code{gnus.el}. Make
23827sure you do it twice, once for the parameter and once for the 23839sure you do it twice, once for the parameter and once for the
23828variable customization. 23840variable customization.
23829 23841
23830Add 23842Add
23831@example 23843@lisp
23832 (variable-item spam-use-blackbox) 23844(variable-item spam-use-blackbox)
23833@end example 23845@end lisp
23834to the @code{spam-autodetect-methods} group parameter in 23846to the @code{spam-autodetect-methods} group parameter in
23835@code{gnus.el}. 23847@code{gnus.el}.
23836 23848