diff options
| author | Miles Bader | 2004-09-10 21:36:15 +0000 |
|---|---|---|
| committer | Miles Bader | 2004-09-10 21:36:15 +0000 |
| commit | 7cb0aa56ca5374e0cff9bf0ff815559bb5954a52 (patch) | |
| tree | 4c6de170cf680ea1a6c85a8a6b5d97e0484c0e14 | |
| parent | d528bff7457eee0a714a17b8f8f68e2cfe4d3314 (diff) | |
| download | emacs-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/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/gnus/gnus-registry.el | 26 | ||||
| -rw-r--r-- | lisp/gnus/nndb.el | 8 | ||||
| -rw-r--r-- | lisp/gnus/nnimap.el | 7 | ||||
| -rw-r--r-- | man/ChangeLog | 25 | ||||
| -rw-r--r-- | man/gnus.texi | 250 |
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 @@ | |||
| 1 | 2004-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 | |||
| 9 | 2004-09-10 Simon Josefsson <jas@extundo.com> | ||
| 10 | |||
| 11 | * nndb.el (require): Remove tcp and duplicate cl. | ||
| 12 | |||
| 1 | 2004-09-08 Reiner Steib <Reiner.Steib@gmx.de> | 13 | 2004-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 @@ | |||
| 1 | 2004-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 | |||
| 6 | 2004-09-10 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 7 | |||
| 8 | * gnus.texi (IMAP): add comments about imaps synonym to imap in | ||
| 9 | netrc syntax | ||
| 10 | |||
| 11 | 2004-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 | |||
| 17 | 2004-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 | |||
| 22 | 2004-09-10 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 23 | |||
| 24 | * gnus.texi (Spam ELisp Package Sequence of Events): fix typo | ||
| 25 | |||
| 1 | 2004-09-10 Eli Zaretskii <eliz@gnu.org> | 26 | 2004-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 |
| 14012 | above. Also note that with the nnimap backend, message bodies will | 14012 | above. Also note that with the nnimap backend, message bodies will |
| 14013 | not be downloaded by default. You need to set | 14013 | not 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 |
| 14015 | IMAP}). | 14015 | (@pxref{Splitting in IMAP}). |
| 14016 | 14016 | ||
| 14017 | @item (! @var{func} @var{split}) | 14017 | @item (! @var{func} @var{split}) |
| 14018 | If the split is a list, and the first element is @code{!}, then | 14018 | If the split is a list, and the first element is @code{!}, then |
| @@ -16209,7 +16209,17 @@ RFC 2060 for more information on valid strings. | |||
| 16209 | A file containing credentials used to log in on servers. The format is | 16209 | A 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 |
| 16211 | variable @code{nntp-authinfo-file} for exact syntax; also see | 16211 | variable @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 | ||
| 16215 | machine students.uio.no login larsi password geheimnis port imap | ||
| 16216 | @end example | ||
| 16217 | |||
| 16218 | Note that it should be @code{port imap}, or @code{port 143}, if you | ||
| 16219 | use a @code{nnimap-stream} of @code{tls} or @code{ssl}, even if the | ||
| 16220 | actual port number used is port 993 for secured IMAP. For | ||
| 16221 | convenience, 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 | |||
| 22249 | messages per day from @samp{random-address@@vmadmin.com}, you block | 22259 | messages 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 |
| 22251 | discard all messages with @samp{VIAGRA} in the message. If you get | 22261 | discard all messages with @samp{VIAGRA} in the message. If you get |
| 22252 | lots of spam from China, for example, you try to filter all mail from | 22262 | lots of spam from Bulgaria, for example, you try to filter all mail |
| 22253 | Chinese IPs. | 22263 | from Bulgarian IPs. |
| 22264 | |||
| 22265 | This, unfortunately, is a great way to discard legitimate e-mail. The | ||
| 22266 | risks of blocking a whole country (Bulgaria, Norway, Nigeria, China, | ||
| 22267 | etc.) or even a continent (Asia, Africa, Europe, etc.) from contacting | ||
| 22268 | you should be obvious, so don't do it if you have the choice. | ||
| 22254 | 22269 | ||
| 22255 | This, unfortunately, is a great way to discard legitimate e-mail. For | 22270 | In another instance, the very informative and useful RISKS digest has |
| 22256 | instance, the very informative and useful RISKS digest has been | 22271 | been blocked by overzealous mail filters because it @strong{contained} |
| 22257 | blocked by overzealous mail filters because it @strong{contained} | 22272 | words that were common in spam messages. Nevertheless, in isolated |
| 22258 | words that were common in spam messages. The risks of blocking a | 22273 | cases, with great care, direct filtering of mail can be useful. |
| 22259 | whole country from contacting you should also be obvious, so don't do | ||
| 22260 | it if you have the choice. Nevertheless, in isolated cases, with | ||
| 22261 | great care, direct filtering of mail can be useful. | ||
| 22262 | 22274 | ||
| 22263 | Another approach to filtering e-mail is the distributed spam | 22275 | Another approach to filtering e-mail is the distributed spam |
| 22264 | processing, for instance DCC implements such a system. In essence, | 22276 | processing, 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 | ||
| 22436 | Note that with the nnimap backend, message bodies will not be | 22448 | Note that with the nnimap backend, message bodies will not be |
| 22437 | downloaded by default. You need to set | 22449 | downloaded 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 |
| 22439 | IMAP}). | 22451 | (@pxref{Splitting in IMAP}). |
| 22440 | 22452 | ||
| 22441 | That is about it. As some spam is likely to get through anyway, you | 22453 | That is about it. As some spam is likely to get through anyway, you |
| 22442 | might want to have a nifty function to call when you happen to read | 22454 | might 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} |
| 22673 | depending on the article's classification. If the | 22685 | depending 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}, |
| 22675 | whichever is appropriate, are nil, the article is left in the current | 22687 | whichever is appropriate, are @code{nil}, the article is left in the |
| 22676 | group. | 22688 | current group. |
| 22677 | 22689 | ||
| 22678 | If a spam is found in any group (this can be changed to only non-spam | 22690 | If a spam is found in any group (this can be changed to only non-spam |
| 22679 | groups with @code{spam-move-spam-nonspam-groups-only}), it is | 22691 | groups 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 |
| 22686 | no more than once. Thus, spam is detected and processed everywhere, | 22698 | no more than once. Thus, spam is detected and processed everywhere, |
| 22687 | which is what most people want. If the | 22699 | which 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 |
| 22689 | expired, which is usually the right thing to do. | 22701 | expired, which is usually the right thing to do. |
| 22690 | 22702 | ||
| 22691 | If spam can not be moved - because of a read-only backend such as NNTP, | 22703 | If spam can not be moved---because of a read-only backend such as |
| 22692 | for example, it will be copied. | 22704 | @acronym{NNTP}, for example, it will be copied. |
| 22693 | 22705 | ||
| 22694 | If a ham mail is found in a ham group, as determined by the | 22706 | If 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 | |||
| 22703 | necessary, which is what most people want. More on this in | 22715 | necessary, 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 | ||
| 22706 | If ham can not be moved - because of a read-only backend such as NNTP, | 22718 | If ham can not be moved---because of a read-only backend such as |
| 22707 | for example, it will be copied. | 22719 | @acronym{NNTP}, for example, it will be copied. |
| 22708 | 22720 | ||
| 22709 | If all this seems confusing, don't worry. Soon it will be as natural | 22721 | If all this seems confusing, don't worry. Soon it will be as natural |
| 22710 | as typing Lisp one-liners on a neural interface... err, sorry, that's | 22722 | as typing Lisp one-liners on a neural interface@dots{} err, sorry, that's |
| 22711 | 50 years in the future yet. Just trust us, it's not so bad. | 22723 | 50 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 |
| 22729 | nnimap back ends to retrieve your mail. | 22741 | nnimap back ends to retrieve your mail. |
| 22730 | 22742 | ||
| 22743 | Also, @code{spam-split} will not modify incoming mail in any way. | ||
| 22744 | |||
| 22731 | The @code{spam-split} function will process incoming mail and send the | 22745 | The @code{spam-split} function will process incoming mail and send the |
| 22732 | mail considered to be spam into the group name given by the variable | 22746 | mail 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 | |||
| 22741 | work depending on your server's tolerance for strange group names. | 22755 | work depending on your server's tolerance for strange group names. |
| 22742 | 22756 | ||
| 22743 | You can also give @code{spam-split} a parameter, | 22757 | You can also give @code{spam-split} a parameter, |
| 22744 | e.g. @samp{'spam-use-regex-headers} or @samp{"maybe-spam"}. Why is | 22758 | e.g. @code{spam-use-regex-headers} or @code{"maybe-spam"}. Why is |
| 22745 | this useful? | 22759 | this useful? |
| 22746 | 22760 | ||
| 22747 | Take these split rules (with @code{spam-use-regex-headers} and | 22761 | Take 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 | |||
| 22767 | regex-headers check) will be after the ding rule: | 22781 | regex-headers check) will be after the ding rule: |
| 22768 | 22782 | ||
| 22769 | @example | 22783 | @example |
| 22770 | nnimap-split-fancy '(| | 22784 | nnimap-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 | ||
| 22780 | This lets you invoke specific @code{spam-split} checks depending on | 22795 | This 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 | |||
| 22827 | will be detected later. | 22842 | will be detected later. |
| 22828 | 22843 | ||
| 22829 | The format of the spam or ham processor entry used to be a symbol, | 22844 | The format of the spam or ham processor entry used to be a symbol, |
| 22830 | but now it is a cons cell. See the individual spam processor entries | 22845 | but now it is a @sc{cons} cell. See the individual spam processor entries |
| 22831 | for more information. | 22846 | for 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 | |||
| 22905 | determined by either the @code{ham-process-destination} group | 22920 | determined by either the @code{ham-process-destination} group |
| 22906 | parameter or a match in the @code{gnus-ham-process-destinations} | 22921 | parameter or a match in the @code{gnus-ham-process-destinations} |
| 22907 | variable, which is a list of regular expressions matched with group | 22922 | variable, which is a list of regular expressions matched with group |
| 22908 | names (it's easiest to customize this variable with | 22923 | names (it's easiest to customize this variable with @kbd{M-x |
| 22909 | @code{customize-variable gnus-ham-process-destinations}). Each | 22924 | customize-variable @key{RET} gnus-ham-process-destinations}). Each |
| 22910 | newsgroup specification has the format (REGEXP PROCESSOR) in a | 22925 | group name list is a standard Lisp list, if you prefer to customize |
| 22911 | standard Lisp list, if you prefer to customize the variable manually. | 22926 | the variable manually. If the @code{ham-process-destination} |
| 22912 | The ultimate location is a group name or names. If the | 22927 | parameter is not set, ham articles are left in place. If the |
| 22913 | @code{ham-process-destination} parameter is not set, ham articles are | ||
| 22914 | left 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 |
| 22916 | set, the ham articles are marked as unread before being moved. | 22929 | set, the ham articles are marked as unread before being moved. |
| 22917 | 22930 | ||
| 22918 | If ham can not be moved - because of a read-only backend such as NNTP, | 22931 | If ham can not be moved---because of a read-only backend such as |
| 22919 | for example, it will be copied. | 22932 | @acronym{NNTP}, for example, it will be copied. |
| 22920 | 22933 | ||
| 22921 | Note that you can use multiples destinations per group or regular | 22934 | Note that you can use multiples destinations per group or regular |
| 22922 | expression! This enables you to send your ham to a regular mail | 22935 | expression! 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 | |||
| 22944 | the @code{spam-process-destination} group parameter or a match in the | 22957 | the @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 |
| 22946 | regular expressions matched with group names (it's easiest to | 22959 | regular expressions matched with group names (it's easiest to |
| 22947 | customize this variable with @code{customize-variable | 22960 | customize this variable with @kbd{M-x customize-variable @key{RET} |
| 22948 | gnus-spam-process-destinations}). Each newsgroup specification has | 22961 | gnus-spam-process-destinations}). Each group name list is a standard |
| 22949 | the repeated format (REGEXP GROUP) and they are all in a standard Lisp | 22962 | Lisp list, if you prefer to customize the variable manually. If the |
| 22950 | list, if you prefer to customize the variable manually. The ultimate | ||
| 22951 | location 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 |
| 22953 | articles are only expired. The group name is fully qualified, meaning | 22964 | articles are only expired. The group name is fully qualified, meaning |
| 22954 | that if you see @samp{nntp:servername} before the group name in the | 22965 | that if you see @samp{nntp:servername} before the group name in the |
| 22955 | group buffer then you need it here as well. | 22966 | group buffer then you need it here as well. |
| 22956 | 22967 | ||
| 22957 | If spam can not be moved - because of a read-only backend such as NNTP, | 22968 | If spam can not be moved---because of a read-only backend such as |
| 22958 | for example, it will be copied. | 22969 | @acronym{NNTP}, for example, it will be copied. |
| 22959 | 22970 | ||
| 22960 | Note that you can use multiples destinations per group or regular | 22971 | Note that you can use multiples destinations per group or regular |
| 22961 | expression! This enables you to send your spam to multiple @emph{spam | 22972 | expression! 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 |
| 22973 | Set this variable if you want only unseen articles in spam groups to | 22984 | Set this variable if you want only unseen articles in spam groups to |
| 22974 | be marked as spam. By default, it is set. If you set it to nil, | 22985 | be marked as spam. By default, it is set. If you set it to |
| 22975 | unread 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 |
| 22978 | Set this variable if you want ham to be unmarked before it is moved | 22989 | Set this variable if you want ham to be unmarked before it is moved |
| 22979 | out of the spam group. This is very useful when you use something | 22990 | out of the spam group. This is very useful when you use something |
| 22980 | like the tick mark @samp{!} to mark ham - the article will be placed | 22991 | like the tick mark @samp{!} to mark ham---the article will be placed |
| 22981 | in your ham-process-destination, unmarked as if it came fresh from | 22992 | in your @code{ham-process-destination}, unmarked as if it came fresh |
| 22982 | the mail server. | 22993 | from the mail server. |
| 22983 | 22994 | ||
| 22984 | @vindex spam-autodetect-recheck-messages | 22995 | @vindex spam-autodetect-recheck-messages |
| 22985 | When autodetecting spam, this variable tells @code{spam.el} whether | 22996 | When autodetecting spam, this variable tells @code{spam.el} whether |
| @@ -22997,87 +23008,86 @@ spam. It is recommended that you leave it off. | |||
| 22997 | 23008 | ||
| 22998 | From Ted Zlatanov <tzz@@lifelogs.com>. | 23009 | From 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 | |||
| 23081 | From Reiner Steib <reiner.steib@@gmx.de>. | 23091 | From Reiner Steib <reiner.steib@@gmx.de>. |
| 23082 | 23092 | ||
| 23083 | My provider has set up bogofilter (in combination with @acronym{DCC}) on | 23093 | My 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 | |||
| 23115 | messages are marked as spam (with @code{$}). When I find a false | 23125 | messages are marked as spam (with @code{$}). When I find a false |
| 23116 | positive, I mark the message with some other ham mark (@code{ham-marks}, | 23126 | positive, 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 |
| 23118 | messages are copied to both groups, @samp{INBOX} (were I want to have | 23128 | messages are copied to both groups, @samp{INBOX} (where I want to have |
| 23119 | the article) and @samp{training.ham} (for training bogofilter) and | 23129 | the article) and @samp{training.ham} (for training bogofilter) and |
| 23120 | deleted from the @samp{spam.detected} folder. | 23130 | deleted 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 | ||
| 23150 | Additionally, I use `(setq spam-report-gmane-use-article-number nil)' | 23160 | Additionally, I use @code{(setq spam-report-gmane-use-article-number nil)} |
| 23151 | because I don't read the groups directly from news.gmane.org, but | 23161 | because I don't read the groups directly from news.gmane.org, but |
| 23152 | through my local news server (leafnode). I.e. the article numbers are | 23162 | through my local news server (leafnode). I.e. the article numbers are |
| 23153 | not the same as on news.gmane.org, thus @code{spam-report.el} has to check | 23163 | not the same as on news.gmane.org, thus @code{spam-report.el} has to check |
| @@ -23702,7 +23712,7 @@ the same way, we promise. | |||
| 23702 | Add this symbol to a group's @code{spam-process} parameter by | 23712 | Add this symbol to a group's @code{spam-process} parameter by |
| 23703 | customizing the group parameter or the | 23713 | customizing 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 |
| 23705 | to a grup's @code{spam-process} parameter, the ham-marked articles in | 23715 | to 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 |
| 23707 | messages. Note that this ham processor has no effect in @emph{spam} or | 23717 | messages. 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 |
| 23745 | code | 23755 | Code |
| 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 | ||
| 23752 | Add | 23762 | Add |
| 23753 | @example | 23763 | @lisp |
| 23754 | (spam-use-blackbox . spam-check-blackbox) | 23764 | (spam-use-blackbox . spam-check-blackbox) |
| 23755 | @end example | 23765 | @end lisp |
| 23756 | to @code{spam-list-of-checks}. | 23766 | to @code{spam-list-of-checks}. |
| 23757 | 23767 | ||
| 23758 | Add | 23768 | Add |
| 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 | |||
| 23763 | to @code{spam-list-of-processors}. | 23774 | to @code{spam-list-of-processors}. |
| 23764 | 23775 | ||
| 23765 | Add | 23776 | Add |
| 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 | |||
| 23772 | to @code{spam-registration-functions}. Write the register/unregister | 23784 | to @code{spam-registration-functions}. Write the register/unregister |
| 23773 | routines using the bogofilter register/unregister routines as a | 23785 | routines using the bogofilter register/unregister routines as a |
| 23774 | start, or other restister/unregister routines more appropriate to | 23786 | start, or other restister/unregister routines more appropriate to |
| 23775 | Blackbox. | 23787 | Blackbox. |
| 23776 | 23788 | ||
| 23777 | @item | 23789 | @item |
| 23778 | functionality | 23790 | Functionality |
| 23779 | 23791 | ||
| 23780 | Write the @code{spam-check-blackbox} function. It should return | 23792 | Write 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 |
| 23797 | code | 23809 | Code |
| 23798 | 23810 | ||
| 23799 | Note you don't have to provide a spam or a ham processor. Only | 23811 | Note you don't have to provide a spam or a ham processor. Only |
| 23800 | provide them if Blackbox supports spam or ham processing. | 23812 | provide them if Blackbox supports spam or ham processing. |
| @@ -23819,18 +23831,18 @@ Only applicable to non-spam (unclassified and ham) groups.") | |||
| 23819 | Gnus parameters | 23831 | Gnus parameters |
| 23820 | 23832 | ||
| 23821 | Add | 23833 | Add |
| 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 |
| 23826 | to the @code{spam-process} group parameter in @code{gnus.el}. Make | 23838 | to the @code{spam-process} group parameter in @code{gnus.el}. Make |
| 23827 | sure you do it twice, once for the parameter and once for the | 23839 | sure you do it twice, once for the parameter and once for the |
| 23828 | variable customization. | 23840 | variable customization. |
| 23829 | 23841 | ||
| 23830 | Add | 23842 | Add |
| 23831 | @example | 23843 | @lisp |
| 23832 | (variable-item spam-use-blackbox) | 23844 | (variable-item spam-use-blackbox) |
| 23833 | @end example | 23845 | @end lisp |
| 23834 | to the @code{spam-autodetect-methods} group parameter in | 23846 | to the @code{spam-autodetect-methods} group parameter in |
| 23835 | @code{gnus.el}. | 23847 | @code{gnus.el}. |
| 23836 | 23848 | ||