X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=texi%2Fgnus.texi;h=b927a84fc31bb68d540e1a0ace0ec944f69e307e;hb=70d70d813d38d4dffd13ecf6c2240b8f24c6a7a7;hp=92eb70d92d9bba10ef92bf3f7e3e1f4cfbb9a0c4;hpb=d58520446fb563465097c5635f015d89f3a60607;p=elisp%2Fgnus.git- diff --git a/texi/gnus.texi b/texi/gnus.texi index 92eb70d..b927a84 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -33,7 +33,7 @@ \makeindex \begin{document} -\newcommand{\gnusversionname}{Oort Gnus v0.06} +\newcommand{\gnusversionname}{Oort Gnus v0.07} \newcommand{\gnuschaptername}{} \newcommand{\gnussectionname}{} @@ -848,6 +848,12 @@ Picons * Hard Picons:: The way you should do it. You'll learn something. * Picon Useless Configuration:: Other variables you can trash/tweak/munge/play with. +Thwarting Email Spam + +* Anti-Spam Basics:: Simple steps to reduce the amount of spam. +* SpamAssassin:: How to use external anti-spam tools. +* Hashcash:: Reduce spam by burning CPU time. + Appendices * XEmacs:: Requirements for installing under XEmacs. @@ -1790,6 +1796,10 @@ Full group name. @item G Group name. +@item C +Group comment (@pxref{Group Parameters}) or group name if there is no +comment element in the group parameters. + @item D Newsgroup description. @@ -1883,15 +1893,15 @@ background is dark: (cond (window-system (setq custom-background-mode 'light) (defface my-group-face-1 - '((t (:foreground "Red" :bold t))) "First group face") + '((t (:foreground "Red" :bold t))) "First group face") (defface my-group-face-2 - '((t (:foreground "DarkSeaGreen4" :bold t))) "Second group face") + '((t (:foreground "DarkSeaGreen4" :bold t))) "Second group face") (defface my-group-face-3 - '((t (:foreground "Green4" :bold t))) "Third group face") + '((t (:foreground "Green4" :bold t))) "Third group face") (defface my-group-face-4 - '((t (:foreground "SteelBlue" :bold t))) "Fourth group face") + '((t (:foreground "SteelBlue" :bold t))) "Fourth group face") (defface my-group-face-5 - '((t (:foreground "Blue" :bold t))) "Fifth group face"))) + '((t (:foreground "Blue" :bold t))) "Fifth group face"))) (setq gnus-group-highlight '(((> unread 200) . my-group-face-1) @@ -2566,20 +2576,19 @@ Create one of the groups mentioned in @code{gnus-useful-groups} @item G w @kindex G w (Group) @findex gnus-group-make-web-group -@cindex DejaNews -@cindex Alta Vista -@cindex InReference +@cindex Google @cindex nnweb +@cindex gmane Make an ephemeral group based on a web search (@code{gnus-group-make-web-group}). If you give a prefix to this command, make a solid group instead. You will be prompted for the search engine type and the search string. Valid search engine types -include @code{dejanews}, @code{altavista} and @code{reference}. +include @code{google}, @code{dejanews}, and @code{gmane}. @xref{Web Searches}. -If you use the @code{dejanews} search engine, you can limit the search +If you use the @code{google} search engine, you can limit the search to a particular group by using a match string like -@samp{~g alt.sysadmin.recovery shaving}. +@samp{shaving group:alt.sysadmin.recovery}. @item G DEL @kindex G DEL (Group) @@ -2696,9 +2705,10 @@ See also @code{gnus-parameter-to-list-alist}. @cindex subscribed If this parameter is set to @code{t}, Gnus will consider the to-address and to-list parameters for this group as addresses of -mailing lists you are subscribed to. Giving Gnus this information -will help it to generate correct Mail-Followup-To headers for your -posts to these lists. +mailing lists you are subscribed to. Giving Gnus this information is +(only) a first step in getting it to generate correct Mail-Followup-To +headers for your posts to these lists. Look here @pxref{(message)Mailing +Lists} for a complete treatment of available MFT support. See also @code{gnus-find-subscribed-addresses}, the function that directly uses this group parameter. @@ -2835,10 +2845,9 @@ command (@pxref{Limiting}). @item comment @cindex comment -Elements that look like @code{(comment . "This is a comment")} -are arbitrary comments on the group. They are currently ignored by -gnus, but provide a place for you to store information on particular -groups. +Elements that look like @code{(comment . "This is a comment")} are +arbitrary comments on the group. You can display comments in the +group line (@pxref{Group Line Specification}). @item charset @cindex charset @@ -3238,6 +3247,11 @@ Sort the groups by group rank Sort the groups alphabetically by back end name (@code{gnus-group-sort-selected-groups-by-method}). +@item G P s +@kindex G P s (Group) +@findex gnus-group-sort-selected-groups +Sort the groups according to @code{gnus-group-sort-function}. + @end table And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually @@ -4229,8 +4243,8 @@ the line containing the call to @code{stop} is removed.) @example if address "sender" "owner-ding@@hpc.uh.edu" @{ - fileinto "INBOX.ding"; - stop; + fileinto "INBOX.ding"; + stop; @} @end example @@ -4387,8 +4401,8 @@ Full @code{From} header. @item n The name (from the @code{From} header). @item f -The name, code @code{To} header or the @code{Newsgroups} header -(@pxref{To From Newsgroups}). +The name, @code{To} header or the @code{Newsgroups} header (@pxref{To +From Newsgroups}). @item a The name (from the @code{From} header). This differs from the @code{n} spec in that it uses the function designated by the @@ -4402,6 +4416,9 @@ Number of lines in the article. @item c Number of characters in the article. This specifier is not supported in some methods (like nnfolder). +@item k +Pretty-printed version of the number of characters in the article; +for example, @samp{1.2k} or @samp{0.4M}. @item I Indentation based on thread level (@pxref{Customizing Threading}). @item B @@ -4539,7 +4556,8 @@ headers are used instead. A related variable is @code{nnmail-extra-headers}, which controls when to include extra headers when generating overview (@sc{nov}) files. If you have old overview files, you should regenerate them after changing -this variable. +this variable, by entering the server buffer using `^', and then `g' on +the appropriate mail server (e.g. nnml) to cause regeneration. @vindex gnus-summary-line-format You also have to instruct Gnus to display the data by changing the @@ -4562,9 +4580,13 @@ In summary, you'd typically put something like the following in (The values listed above are the default values in Gnus. Alter them to fit your needs.) -Now, this is mostly useful for mail groups, where you have control over +A note for news server administrators, or for users who wish to try to +convince their news server administrator to provide some additional +support: + +The above is mostly useful for mail groups, where you have control over the @sc{nov} files that are created. However, if you can persuade your -nntp admin to add: +nntp admin to add (in the usual implementation, notably INN): @example Newsgroups:full @@ -5049,6 +5071,13 @@ that goes out to all people listed in the @code{To}, @code{From} (or @code{Reply-to}) and @code{Cc} headers in all the process/prefixed articles. This command uses the process/prefix convention. +@item S V +@kindex S V (Summary) +@findex gnus-summary-very-wide-reply-with-original +Mail a very wide reply to the author of the current article and include the +original message (@code{gnus-summary-very-wide-reply-with-original}). This +command uses the process/prefix convention. + @item S o m @itemx C-c C-f @kindex S o m (Summary) @@ -6269,6 +6298,10 @@ Simplify fuzzily. @item gnus-simplify-whitespace @findex gnus-simplify-whitespace Remove excessive whitespace. + +@item gnus-simplify-all-whitespace +@findex gnus-simplify-all-whitespace +Remove all whitespace. @end table You may also write your own functions, of course. @@ -6622,6 +6655,7 @@ Matching}). @findex gnus-thread-sort-by-subject @findex gnus-thread-sort-by-author @findex gnus-thread-sort-by-number +@findex gnus-thread-sort-by-random @vindex gnus-thread-sort-functions @findex gnus-thread-sort-by-most-recent-thread If you are using a threaded summary display, you can sort the threads by @@ -6634,7 +6668,8 @@ predicate functions include @code{gnus-thread-sort-by-number}, @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject}, @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score}, @code{gnus-thread-sort-by-most-recent-number}, -@code{gnus-thread-sort-by-most-recent-date} and +@code{gnus-thread-sort-by-most-recent-date}, +@code{gnus-thread-sort-by-random} and @code{gnus-thread-sort-by-total-score}. Each function takes two threads and returns non-@code{nil} if the first @@ -6685,14 +6720,18 @@ tickles your fancy. @findex gnus-article-sort-by-score @findex gnus-article-sort-by-subject @findex gnus-article-sort-by-author +@findex gnus-article-sort-by-random @findex gnus-article-sort-by-number -If you are using an unthreaded display for some strange reason or other, -you have to fiddle with the @code{gnus-article-sort-functions} variable. -It is very similar to the @code{gnus-thread-sort-functions}, except that -it uses slightly different functions for article comparison. Available -sorting predicate functions are @code{gnus-article-sort-by-number}, -@code{gnus-article-sort-by-author}, @code{gnus-article-sort-by-subject}, -@code{gnus-article-sort-by-date}, and @code{gnus-article-sort-by-score}. +If you are using an unthreaded display for some strange reason or +other, you have to fiddle with the @code{gnus-article-sort-functions} +variable. It is very similar to the +@code{gnus-thread-sort-functions}, except that it uses slightly +different functions for article comparison. Available sorting +predicate functions are @code{gnus-article-sort-by-number}, +@code{gnus-article-sort-by-author}, +@code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date}, +@code{gnus-article-sort-by-random}, and +@code{gnus-article-sort-by-score}. If you want to sort an unthreaded summary display by subject, you could say something like: @@ -6958,6 +6997,10 @@ processing of the article is done before it is saved). For a different approach (uudecoding, unsharing) you should use @code{gnus-uu} (@pxref{Decoding Articles}). +For the commands listed here, the target is a file. If you want to +save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article}) +command (@pxref{Mail Group Commands}). + @vindex gnus-save-all-headers If @code{gnus-save-all-headers} is non-@code{nil}, gnus will not delete unwanted headers before saving the article. @@ -7851,8 +7894,8 @@ headers, PGP, cited text and the signature. @item W W h @kindex W W h (Summary) -@findex gnus-article-toggle-headers -Toggle hiding of headers (@code{gnus-article-toggle-headers}). @xref{Hiding +@findex gnus-article-hide-headers +Hide headers (@code{gnus-article-hide-headers}). @xref{Hiding Headers}. @item W W b @@ -8057,15 +8100,15 @@ is rumored to have employed this form of, uh, somewhat weak encryption. @item t @kindex W t (Summary) @kindex t (Summary) -@findex gnus-article-toggle-headers +@findex gnus-summary-toggle-header Toggle whether to display all headers in the article buffer -(@code{gnus-article-toggle-headers}). +(@code{gnus-summary-toggle-header}). @item W v @kindex W v (Summary) -@findex gnus-summary-verbose-header +@findex gnus-summary-verbose-headers Toggle whether to display all headers in the article buffer permanently -(@code{gnus-summary-verbose-header}). +(@code{gnus-summary-verbose-headers}). @item W m @kindex W m (Summary) @@ -8135,7 +8178,7 @@ CRs into LF (this takes care of Mac line endings) @findex gnus-article-de-base64-unreadable Treat base64 (@code{gnus-article-de-base64-unreadable}). Base64 is one common @sc{mime} encoding employed when sending non-ASCII -(i. e., 8-bit) articles. Note that the this is usually done +(i. e., 8-bit) articles. Note that this is usually done automatically by Gnus if the message in question has a @code{Content-Transfer-Encoding} header that says that this encoding has been done. @@ -8159,26 +8202,36 @@ the newlines (@code{gnus-article-unsplit-urls}). @item W h @kindex W h (Summary) @findex gnus-article-wash-html -Treat @sc{html} (@code{gnus-article-wash-html}). Note that the this is +Treat @sc{html} (@code{gnus-article-wash-html}). Note that this is usually done automatically by Gnus if the message in question has a @code{Content-Type} header that says that the message is @sc{html}. If a prefix is given, a charset will be asked for. @vindex gnus-article-wash-function -The default is to use w3 to convert the @sc{html}, but this is -controlled by the @code{gnus-article-wash-function} variable. -Pre-defined functions you can use include: +The default is to use the function specified by +@code{mm-inline-text-html-renderer} (@pxref{Customization, , , emacs-mime}) +to convert the @sc{html}, but this is controlled by the +@code{gnus-article-wash-function} variable. Pre-defined functions you +can use include: @table @code -@item gnus-article-wash-html-with-w3 -@findex gnus-article-wash-html-with-w3 -Use w3 (this is the default). +@item w3 +Use Emacs/w3. -@item gnus-article-wash-html-with-w3m -@findex gnus-article-wash-html-with-w3m +@item w3m Use emacs-w3m (see @uref{http://emacs-w3m.namazu.org/} for more information). + +@item links +Use Links (see @uref{http://artax.karlin.mff.cuni.cz/~mikulas/links/}). + +@item lynx +Use Lynx (see @uref{http://lynx.browser.org/}). + +@item html2text +Use html2text -- a simple @sc{html} converter included with Gnus. + @end table @item W b @@ -8325,7 +8378,8 @@ This is an alist where each entry has this form: @item regexp All text that match this regular expression will be considered an external reference. Here's a typical regexp that matches embedded URLs: -@samp{]*\\)>}. +@samp{]*\\)>}. This can also be a variable containing a +regexp, useful variables to use include @code{gnus-button-url-regexp}. @item button-par Gnus has to know which parts of the matches is to be highlighted. This @@ -8945,6 +8999,11 @@ Sort by article length (@code{gnus-summary-sort-by-chars}). @findex gnus-summary-sort-by-score Sort by score (@code{gnus-summary-sort-by-score}). +@item C-c C-s C-r +@kindex C-c C-s C-r (Summary) +@findex gnus-summary-sort-by-random +Randomize (@code{gnus-summary-sort-by-random}). + @item C-c C-s C-o @kindex C-c C-s C-o (Summary) @findex gnus-summary-sort-by-original @@ -9040,12 +9099,12 @@ is a list, Gnus will try all the methods in the list until it finds a match. Here's an example setting that will first try the current method, and -then ask Deja if that fails: +then ask Google if that fails: @lisp (setq gnus-refer-article-method '(current - (nnweb "refer" (nnweb-type dejanews)))) + (nnweb "refer" (nnweb-type google)))) @end lisp Most of the mail back ends support fetching by @code{Message-ID}, but @@ -9550,7 +9609,7 @@ buffers. For example: (setq gnus-newsgroup-variables '(message-use-followup-to (gnus-visible-headers . - "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:"))) + "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:"))) @end lisp @end table @@ -10618,6 +10677,12 @@ headers will be included in the sequence they are matched. If non-@code{nil}, add a @code{to-list} group parameter to mail groups that have none when you do a @kbd{a}. +@item gnus-confirm-mail-reply-to-news +@vindex gnus-confirm-mail-reply-to-news +If non-@code{nil}, Gnus requests confirmation when replying to news. +If you find yourself never wanting to reply to mail, but occasionally +press R anyway, this variable might be for you. + @end table @@ -10740,6 +10805,10 @@ store the messages. If you want to disable this completely, the @code{gnus-message-archive-group} variable should be @code{nil}, which is the default. +For archiving interesting messages in a group you read, see the +@kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail +Group Commands}). + @vindex gnus-message-archive-method @code{gnus-message-archive-method} says what virtual server gnus is to use to store sent messages. The default is: @@ -10982,7 +11051,7 @@ So here's a new example: (window-system ;; A value symbol ("X-Window-System" (format "%s" window-system))) ;; If I'm replying to Larsi, set the Organization header. - ((header "to" "larsi.*org") + ((header "from" "larsi.*org") (Organization "Somewhere, Inc.")) ((posting-from-work-p) ;; A user defined function (signature-file "~/.work-signature") @@ -11108,6 +11177,14 @@ For PGP, Gnus supports two external libraries, @sc{gpg.el} and @sc{Mailcrypt}, you need to install at least one of them. The @sc{s/mime} support in Gnus requires the external program OpenSSL. +Often, you would like to sign replies to people who send you signed +messages. Even more often, you might want to encrypt messages which +are in reply to encrypted messages. Gnus offers +@code{gnus-message-replysign} to enable the former, and +@code{gnus-message-replyencrypt} for the latter. In addition, setting +@code{gnus-message-replysignencrypted} (on by default) will sign +automatically encrypted messages. + Instructing MML to perform security operations on a @sc{mime} part is done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c C-m c} key map for encryption, as follows. @@ -11116,39 +11193,39 @@ C-m c} key map for encryption, as follows. @item C-c C-m s s @kindex C-c C-m s s -@findex mml-secure-sign-smime +@findex mml-secure-message-sign-smime -Digitally sign current @sc{mime} part using @sc{s/mime}. +Digitally sign current message using @sc{s/mime}. @item C-c C-m s o @kindex C-c C-m s o -@findex mml-secure-sign-pgp +@findex mml-secure-message-sign-pgp -Digitally sign current @sc{mime} part using PGP. +Digitally sign current message using PGP. @item C-c C-m s p @kindex C-c C-m s p -@findex mml-secure-sign-pgp +@findex mml-secure-message-sign-pgp -Digitally sign current @sc{mime} part using @sc{pgp/mime}. +Digitally sign current message using @sc{pgp/mime}. @item C-c C-m c s @kindex C-c C-m c s -@findex mml-secure-encrypt-smime +@findex mml-secure-message-encrypt-smime -Digitally encrypt current @sc{mime} part using @sc{s/mime}. +Digitally encrypt current message using @sc{s/mime}. @item C-c C-m c o @kindex C-c C-m c o -@findex mml-secure-encrypt-pgp +@findex mml-secure-message-encrypt-pgp -Digitally encrypt current @sc{mime} part using PGP. +Digitally encrypt current message using PGP. @item C-c C-m c p @kindex C-c C-m c p -@findex mml-secure-encrypt-pgpmime +@findex mml-secure-message-encrypt-pgpmime -Digitally encrypt current @sc{mime} part using @sc{pgp/mime}. +Digitally encrypt current message using @sc{pgp/mime}. @item C-c C-m C-n @kindex C-c C-m C-n @@ -11423,6 +11500,8 @@ configuration to the example above: (nntp-via-rlogin-command "ssh") @end lisp +See also @code{nntp-via-rlogin-command-switches}. + If you're behind a firewall, but have direct access to the outside world through a wrapper command like "runsocks", you could open a socksified telnet connection to the news server as follows: @@ -11965,6 +12044,15 @@ you need to connect to a firewall machine first. @vindex nntp-via-rlogin-command Command used to log in on the intermediate host. The default is @samp{rsh}, but @samp{ssh} is a popular alternative. + +@item nntp-via-rlogin-command-switches +@vindex nntp-via-rlogin-command-switches +List of strings to be used as the switches to +@code{nntp-via-rlogin-command}. The default is @code{nil}. If you use +@samp{ssh} for `nntp-via-rlogin-command', you may set this to +@samp{("-C")} in order to compress all data connections, otherwise set +this to @samp{("-t")} or @samp{("-C" "-t")} if the telnet command +requires a pseudo-tty allocation on an intermediate host. @end table @item nntp-open-via-telnet-and-telnet @@ -12346,6 +12434,15 @@ Header lines longer than the value of @code{nnmail-split-header-length-limit} are excluded from the split function. +@vindex nnmail-mail-splitting-charset +@vindex nnmail-mail-splitting-decodes +By default the splitting codes MIME decodes headers so you can match +on non-ASCII strings. The @code{nnmail-mail-splitting-charset} +variable specifies the default charset for decoding. The behaviour +can be turned off completely by binding +@code{nnmail-mail-splitting-decodes} to nil, which is useful if you +want to match articles based on the raw header data. + Gnus gives you all the opportunity you could possibly want for shooting yourself in the foot. Let's say you create a group that will contain all the mail you get from your boss. And then you accidentally @@ -12745,15 +12842,12 @@ An example @sc{imap} mail source: @item webmail Get mail from a webmail server, such as @uref{www.hotmail.com}, @uref{webmail.netscape.com}, @uref{www.netaddress.com}, -@uref{www.my-deja.com}. - -NOTE: Now @uref{mail.yahoo.com} provides POP3 service, so @sc{pop} mail source -is suggested. +@uref{mail.yahoo..com}. NOTE: Webmail largely depends cookies. A "one-line-cookie" patch is required for url "4.0pre.46". -WARNING: Mails may lost. NO WARRANTY. +WARNING: Mails may be lost. NO WARRANTY. Keywords: @@ -12980,6 +13074,16 @@ If non-@code{nil}, put the @code{Message-ID}s of articles imported into the back end (via @code{Gcc}, for instance) into the mail duplication discovery cache. The default is @code{nil}. +@item nnmail-cache-ignore-groups +@vindex nnmail-cache-ignore-groups +This can be a regular expression or a list of regular expressions. +Group names that match any of the regular expressions will never be +recorded in the @code{Message-ID} cache. + +This can be useful, for example, when using Fancy Splitting +(@pxref{Fancy Mail Splitting}) together with the function +@code{nnmail-split-fancy-with-parent}. + @end table @@ -13139,7 +13243,9 @@ To use this feature, you have to set @code{nnmail-treat-duplicates} and you can include @code{nnmail-split-fancy-with-parent} using the colon feature, like so: @lisp -(setq nnmail-split-fancy +(setq nnmail-treat-duplicates 'warn ; or 'delete + nnmail-cache-accepted-message-ids t + nnmail-split-fancy '(| (: nnmail-split-fancy-with-parent) ;; other splits go here )) @@ -13164,6 +13270,13 @@ When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus also records the message ids of moved articles, so that the followup messages goes into the new group. +Also see the variable @code{nnmail-cache-ignore-groups} if you don't +want certain groups to be recorded in the cache. For example, if all +outgoing messages are written to an `outgoing' group, you could set +@code{nnmail-cache-ignore-groups} to match that group name. +Otherwise, answers to all your messages would end up in the +`outgoing' group. + @node Group Mail Splitting @subsection Group Mail Splitting @@ -13248,7 +13361,7 @@ may use it for only some of them, by using @code{nnmail-split-fancy} splits like this: @lisp -(: gnus-mlsplt-fancy GROUPS NO-CROSSPOST CATCH-ALL) +(: gnus-group-split-fancy GROUPS NO-CROSSPOST CATCH-ALL) @end lisp @var{groups} may be a regular expression or a list of group names whose @@ -13477,7 +13590,7 @@ expire mail to groups according to the variable (setq nnmail-expiry-target 'nnmail-fancy-expiry-target nnmail-fancy-expiry-targets '((to-from "boss" "nnfolder:Work") - ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b") + ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b") ("from" ".*" "nnfolder:Archive-%Y"))) @end lisp @@ -13565,6 +13678,12 @@ cleaning up the headers. Functions that can be used include: Clear leading white space that ``helpful'' listservs have added to the headers to make them look nice. Aaah. +(Note that this function works on both the header on the body of all +messages, so it is a potentially dangerous function to use (if a body +of a message contains something that looks like a header line). So +rather than fix the bug, it is of course the right solution to make it +into a feature by documenting it.) + @item nnmail-remove-list-identifiers @findex nnmail-remove-list-identifiers Some list servers add an identifier---for example, @samp{(idm)}---to the @@ -13816,6 +13935,7 @@ splitting. It has to create lots of files, and it also generates fastest back end when it comes to reading mail. @cindex self contained nnml servers +@cindex marks When the marks file is used (which it is by default), @code{nnml} servers have the property that you may backup them using @code{tar} or similar, and later be able to restore them into Gnus (by adding the @@ -13940,6 +14060,7 @@ will add extra headers to keep track of article numbers and arrival dates. @cindex self contained nnfolder servers +@cindex marks When the marks file is used (which it is by default), @code{nnfolder} servers have the property that you may backup them using @code{tar} or similar, and later be able to restore them into Gnus (by adding the @@ -14298,9 +14419,9 @@ is unnecessary in that case. @node Web Searches @subsection Web Searches @cindex nnweb -@cindex DejaNews -@cindex Alta Vista -@cindex InReference +@cindex Google +@cindex dejanews +@cindex gmane @cindex Usenet searches @cindex searching the Usenet @@ -14323,7 +14444,7 @@ pattern), you are likely to get the articles ordered in a different manner. Not even using duplicate suppression (@pxref{Duplicate Suppression}) will help, since @code{nnweb} doesn't even know the @code{Message-ID} of the articles before reading them using some search -engines (DejaNews, for instance). The only possible way to keep track +engines (Google, for instance). The only possible way to keep track of which articles you've read is by scoring on the @code{Date} header---mark all articles posted before the last date you read the group as read. @@ -14344,8 +14465,8 @@ Virtual server variables: @item nnweb-type @vindex nnweb-type What search engine type is being used. The currently supported types -are @code{dejanews}, @code{dejanewsold}, @code{altavista} and -@code{reference}. +are @code{google}, @code{dejanews}, and @code{gmane}. Note that +@code{dejanews} is an alias to @code{google}. @item nnweb-search @vindex nnweb-search @@ -14354,7 +14475,7 @@ The search string to feed to the search engine. @item nnweb-max-hits @vindex nnweb-max-hits Advisory maximum number of hits per search to display. The default is -100. +999. @item nnweb-type-definition @vindex nnweb-type-definition @@ -14571,7 +14692,7 @@ the summary buffer. (defun gnus-user-format-function-X (header) (let ((descr - (assq nnrss-description-field (mail-header-extra header)))) + (assq nnrss-description-field (mail-header-extra header)))) (if descr (concat "\n\t" (cdr descr)) ""))) @end lisp @@ -14827,7 +14948,7 @@ Unlike Parmenides the @sc{imap} designers has decided that things that doesn't exist actually does exist. More specifically, @sc{imap} has this concept of marking articles @code{Deleted} which doesn't actually delete them, and this (marking them @code{Deleted}, that is) is what -nnimap does when you delete a article in Gnus (with @kbd{G DEL} or +nnimap does when you delete a article in Gnus (with @kbd{B DEL} or similar). Since the articles aren't really removed when we mark them with the @@ -14859,11 +14980,12 @@ articles or not. @item nnimap-importantize-dormant @vindex nnimap-importantize-dormant -If non-nil, marks dormant articles as ticked (as well), for other -@sc{imap} clients. Within Gnus, dormant articles will naturally still -(only) be marked as ticked. This is to make dormant articles stand -out, just like ticked articles, in other @sc{imap} clients. (In other -words, Gnus has two ``Tick'' marks and @sc{imap} has only one.) +If non-nil (the default), marks dormant articles as ticked (as well), +for other @sc{imap} clients. Within Gnus, dormant articles will +naturally still (only) be marked as dormant. This is to make dormant +articles stand out, just like ticked articles, in other @sc{imap} +clients. (In other words, Gnus has two ``Tick'' marks and @sc{imap} +has only one.) Probably the only reason for frobing this would be if you're trying enable per-user persistant dormant flags, using something like: @@ -15788,7 +15910,7 @@ For instance, an article with this @code{Newsgroups} header: Newsgroups: alt.religion.emacs @end example -will get this @code{From} header inserted: +will get this @code{To} header inserted: @example To: alt-religion-emacs@@GATEWAY @@ -16255,7 +16377,7 @@ wherever. (require 'gnus-agent) (setq gnus-category-predicate-alist (append gnus-category-predicate-alist - '((old . my-article-old-p)))) + '((old . my-article-old-p)))) @end lisp and simply specify your predicate as: @@ -20582,7 +20704,20 @@ and one mail asking me to repent and find some god. This is annoying. -The way to deal with this is having Gnus split out all spam into a +@menu +* Anti-Spam Basics:: Simple steps to reduce the amount of spam. +* SpamAssassin:: How to use external anti-spam tools. +* Hashcash:: Reduce spam by burning CPU time. +@end menu + +@node Anti-Spam Basics +@subsection Anti-Spam Basics +@cindex email spam +@cindex spam +@cindex UCE +@cindex unsolicited commercial email + +One way of dealing with spam is having Gnus split out all spam into a @samp{spam} mail group (@pxref{Splitting Mail}). First, pick one (1) valid mail address that you can be reached at, and @@ -20648,6 +20783,156 @@ spam. It's a win-win situation. Forging @code{From} headers to point to non-existent domains is yucky, in my opinion. + +@node SpamAssassin +@subsection SpamAssassin, Vipul's Razor, DCC, etc +@cindex SpamAssassin +@cindex Vipul's Razor +@cindex DCC + +The days where the hints in the previous section was sufficient in +avoiding spam is coming to an end. There are many tools out there +that claim to reduce the amount of spam you get. This section could +easily become outdated fast, as new products replace old, but +fortunately most of these tools seem to have similar interfaces. Even +though this section will use SpamAssassin as an example, it should be +easy to adapt it to most other tools. + +If the tool you are using is not installed on the mail server, you +need to invoke it yourself. Ideas on how to use the +@code{:postscript} mail source parameter (@pxref{Mail Source +Specifiers}) follows. + +@lisp +(setq mail-sources + '((file :prescript "formail -bs spamassassin < /var/mail/%u") + (pop :user "jrl" + :server "pophost" + :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t"))) +@end lisp + +Once you managed to process your incoming spool somehow, thus making +the mail contain e.g. a header indicating it is spam, you are ready to +filter it out. Using normal split methods (@pxref{Splitting Mail}): + +@lisp +(setq nnmail-split-methods '(("spam" "^X-Spam-Flag: YES") + ...)) +@end lisp + +Or using fancy split methods (@pxref{Fancy Mail Splitting}): + +@lisp +(setq nnmail-split-methods 'nnmail-split-fancy + nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam") + ...)) +@end lisp + +Some people might not like the idea of piping the mail through various +programs using a @code{:prescript} (if some program is buggy, you +might lose all mail). If you are one of them, another solution is to +call the external tools during splitting. Example fancy split method: + +@lisp +(setq nnmail-split-fancy '(| (: kevin-spamassassin) + ...)) +(defun kevin-spamassassin () + (save-excursion + (let ((buf (or (get-buffer " *nnmail incoming*") + (get-buffer " *nnml move*")))) + (if (not buf) + (progn (message "Oops, cannot find message buffer") nil) + (set-buffer buf) + (if (eq 1 (call-process-region (point-min) (point-max) + "spamc" nil nil nil "-c")) + "spam"))))) +@end lisp + +That is about it. As some spam is likely to get through anyway, you +might want to have a nifty function to call when you happen to read +spam. And here is the nifty function: + +@lisp + (defun my-gnus-raze-spam () + "Submit SPAM to Vipul's Razor, then mark it as expirable." + (interactive) + (gnus-summary-show-raw-article) + (gnus-summary-save-in-pipe "razor-report -f -d") + (gnus-summary-mark-as-expirable 1)) +@end lisp + +@node Hashcash +@subsection Hashcash +@cindex hashcash + +A novel technique to fight spam is to require senders to do something +costly for each message they send. This has the obvious drawback that +you cannot rely on that everyone in the world uses this technique, +since it is not part of the internet standards, but it may be useful +in smaller communities. + +While the tools in the previous section work well in practice, they +work only because the tools are constantly maintained and updated as +new form of spam appears. This means that a small percentage of spam +will always get through. It also means that somewhere, someone needs +to read lots of spam to update these tools. Hashcash avoids that, but +instead requires that everyone you communicate with supports the +scheme. You can view the two approaches as pragmatic vs dogmatic. +The approaches have their own advantages and disadvantages, but as +often in the real world, a combination of them is stronger than either +one of them separately. + +@cindex X-Hashcash +The ``something costly'' is to burn CPU time, more specifically to +compute a hash collision up to a certain number of bits. The +resulting hashcash cookie is inserted in a @samp{X-Hashcash:} +header. For more details, and for the external application +@code{hashcash} you need to install to use this feature, see +@uref{http://www.cypherspace.org/~adam/hashcash/}. Even more +information can be found at @uref{http://www.camram.org/}. + +If you wish to call hashcash for each message you send, say something +like: + +@lisp +(require 'hashcash) +(add-hook 'message-send-hook 'mail-add-payment) +@end lisp + +The @code{hashcash.el} library can be found at +@uref{http://users.actrix.gen.nz/mycroft/hashcash.el}, or in the Gnus +development contrib directory. + +You will need to set up some additional variables as well: + +@table @code + +@item hashcash-default-payment +@vindex hashcash-default-payment +This variable indicates the default number of bits the hash collision +should consist of. By default this is 0, meaning nothing will be +done. Suggested useful values include 17 to 29. + +@item hashcash-payment-alist +@vindex hashcash-payment-alist +Some receivers may require you to spend burn more CPU time than the +default. This variable contains a list of @samp{(ADDR AMOUNT)} cells, +where ADDR is the receiver (email address or newsgroup) and AMOUNT is +the number of bits in the collision that is needed. It can also +contain @samp{(ADDR STRING AMOUNT)} cells, where the STRING is the +string to use (normally the email address or newsgroup name is used). + +@item hashcash +@vindex hashcash +Where the @code{hashcash} binary is installed. + +@end table + +Currently there is no built in functionality in Gnus to verify +hashcash cookies, it is expected that this is performed by your hand +customized mail filtering scripts. Improvements in this area would be +a useful contribution, however. + @node Various Various @section Various Various @cindex mode lines @@ -22157,7 +22442,7 @@ this now has changed to @lisp (setq mail-sources '((directory :path "~/mail/incoming/" - :suffix ".in"))) + :suffix ".in"))) @end lisp More information is available in the info doc at Select Methods ->