\makeindex
\begin{document}
-\newcommand{\gnusversionname}{Oort Gnus v0.10}
+\newcommand{\gnusversionname}{Oort Gnus v0.12}
\newcommand{\gnuschaptername}{}
\newcommand{\gnussectionname}{}
* 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.
-* Filtering Spam Using spam.el::
-* Filtering Spam Using Statistics (spam-stat.el)::
+* Filtering Spam Using The Spam ELisp Package::
+* Filtering Spam Using Statistics with spam-stat::
Appendices
@item posting-style
@cindex posting-style
-You can store additional posting style information for this group only
+You can store additional posting style information for this group
here (@pxref{Posting Styles}). The format is that of an entry in the
@code{gnus-posting-styles} alist, except that there's no regexp matching
the group name (of course). Style elements in this group parameter will
@example
(posting-style
(name "Funky Name")
+ ("X-My-Header" "Funky Value")
(signature "Funky Signature"))
@end example
@item gnus-select-article-hook
@vindex gnus-select-article-hook
This hook is called whenever an article is selected. By default it
-exposes any threads hidden under the selected article.
+exposes any threads hidden under the selected article. If you wish
+that the Agent saves all articles you read, putting
+@code{gnus-agent-fetch-selected-article} on this hook should do it.
@item gnus-mark-article-hook
@vindex gnus-mark-article-hook
like @code{\222} or @code{\264} where you're expecting some kind of
apostrophe or quotation mark, then try this wash.
-@item W k
-@kindex W k (Summary)
+@item W Y f
+@kindex W Y f (Summary)
@findex gnus-article-outlook-deuglify-article
@cindex Outlook Express
-Deuglify broken Outlook (Express) articles and redisplay
+Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
+unwrap lines, repair attribution and rearrange citation.
(@code{gnus-article-outlook-deuglify-article}).
+@item W Y u
+@kindex W Y u (Summary)
+@findex gnus-article-outlook-unwrap-lines
+Unwrap lines that appear to be wrapped citation lines. You can control
+what lines will be unwrapped by frobbing
+@code{gnus-outlook-deuglify-unwrap-min} and
+@code{gnus-outlook-deuglify-unwrap-max}, indicating the miminum and
+maximum length of an unwrapped citation line.
+(@code{gnus-outlook-deuglify-article}).
+
+@item W Y a
+@kindex W Y a (Summary)
+@findex gnus-article-outlook-repair-attribution
+Repair a broken attribution line.
+(@code{gnus-article-outlook-repair-attribution}).
+
+@item W Y c
+@kindex W Y c (Summary)
+@findex gnus-article-outlook-rearrange-citation
+Repair broken citations by rearranging the text.
+(@code{gnus-article-outlook-rearrange-citation}).
+
@item W w
@kindex W w (Summary)
@findex gnus-article-fill-cited-article
Display an @code{X-Face} in the @code{From} header.
(@code{gnus-article-display-x-face}).
+@item W D d
+@kindex W D d (Summary)
+@findex gnus-article-display-face
+Display a @code{Face} in the @code{From} header.
+(@code{gnus-article-display-face}).
+
@item W D s
@kindex W D s (Summary)
@findex gnus-treat-smiley
'("text/x-vcard"))
@end lisp
+@item gnus-article-loose-mime
+@vindex gnus-article-loose-mime
+If non-@code{nil}, Gnus won't required the @samp{MIME-Version} header
+before interpreting the message as a @sc{mime} message. This helps
+when reading messages from certain broken mail user agents. The
+default is @code{nil}.
+
+@item gnus-article-emulate-mime
+@vindex gnus-article-emulate-mime
+There are other, non-@sc{mime} encoding methods used. The most common
+is @samp{uuencode}, but yEncode is also getting to be popular. If
+This variable is non-@code{nil}, Gnus will look in message bodies to
+see if it finds these encodings, and if so, it'll run them through the
+Gnus @sc{mime} machinery. The default is @code{t}.
+
@item gnus-unbuttonized-mime-types
@vindex gnus-unbuttonized-mime-types
This is a list of regexps. @sc{mime} types that match a regexp from
@end lisp
@noindent
-to your @file{.gnus} file.
+to your @file{.gnus.el} file.
@end table
@enumerate
@item
-To handle PGP messages, you have to install mailcrypt or gpg.el as
-well as a OpenPGP implementation (such as GnuPG).
+To handle PGP and PGP/MIME messages, you have to install an OpenPGP
+implementation such as GnuPG. The lisp interface to GnuPG included
+with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG Manual}), but
+Mailcrypt and gpg.el are also supported.
@item
To handle @sc{s/mime} message, you need to install OpenSSL. OpenSSL 0.9.6
@code{always}, always decrypt; @code{known}, only decrypt known
protocols. Otherwise, ask user.
+@item mml1991-use
+@vindex mml1991-use
+Symbol indicating elisp interface to OpenPGP implementation for PGP
+messages. The default is @code{pgg}, but @code{mailcrypt} and
+@code{gpg} are also supported although deprecated.
+
+@item mml2015-use
+@vindex mml2015-use
+Symbol indicating elisp interface to OpenPGP implementation for
+PGP/MIME messages. The default is @code{pgg}, but @code{mailcrypt}
+and @code{gpg} are also supported although deprecated.
+
@end table
@node Mailing List
@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.
+This can also be a function receiving the group name as the only
+parameter which should return non-@code{nil} if a confirmation is
+needed, or a regular expression matching group names, where
+confirmation is should be asked for.
+
If you find yourself never wanting to reply to mail, but occasionally
press R anyway, this variable might be for you.
+@item gnus-confirm-treat-mail-like-news
+@vindex gnus-confirm-treat-mail-like-news
+If non-@code{nil}, Gnus also requests confirmation according to
+@code{gnus-confirm-mail-reply-to-news} when replying to mail. This is
+useful for treating mailing lists like newsgroups.
+
@end table
see the @code{mm-verify-option} and @code{mm-decrypt-option} options
(@pxref{Security}).
-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
@end table
-Also @xref{Security, ,Security, message, Message Manual}.
+@xref{Security, ,Security, message, Message Manual}, for more information.
@node Select Methods
@chapter Select Methods
and things will happen automatically.
For instance, if you want to use @code{nnml} (which is a "one file per
-mail" back end), you could put the following in your @file{.gnus} file:
+mail" back end), you could put the following in your @file{.gnus.el} file:
@lisp
(setq gnus-secondary-select-methods '((nnml "")))
@code{nnmail-split-fancy} manually. You can do it by running
@code{gnus-group-split-update}. If you'd rather have it updated
automatically, just tell @code{gnus-group-split-setup} to do it for
-you. For example, add to your @file{.gnus}:
+you. For example, add to your @file{.gnus.el}:
@lisp
(gnus-group-split-setup AUTO-UPDATE CATCH-ALL)
articles you read as expirable, no matter if they were read or unread
before. To avoid having articles marked as read marked as expirable
automatically, you can put something like the following in your
-@file{.gnus} file:
+@file{.gnus.el} file:
@vindex gnus-mark-article-hook
@lisp
Nnmail equivalent: @code{nnmail-split-fancy}.
+@item nnimap-split-download-body
+@findex nnimap-split-download-body
+@vindex nnimap-split-download-body
+
+Set to non-nil to download entire articles during splitting. This is
+generally not required, and will slow things down considerably. You
+may need it if you want to use an advanced splitting function that
+analyses the body to split the article.
+
@end table
@node Expiring in IMAP
* Server Agent Commands::
@end menu
-You can run a complete batch command from the command line with the
-following incantation:
-
-@cindex gnus-agent-batch
-@example
-$ emacs -batch -l ~/.gnus.el -f gnus-agent-batch
-@end example
written) is quite easy once you've gotten things set up properly. The
following shell script will do everything that is necessary:
+You can run a complete batch command from the command line with the
+following incantation:
+
@example
#!/bin/sh
-emacs -batch -l ~/.emacs -f gnus-agent-batch >/dev/null
+emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
@end example
@table @dfn
@item If I read an article while plugged, do they get entered into the Agent?
-@strong{No}.
+@strong{No}. If you want this behaviour, add
+@code{gnus-agent-fetch-selected-article} to
+@code{gnus-select-article-hook}.
@item If I read an article while plugged, and the article already exists in the Agent, will it get downloaded once more?
function is called @code{gnus-goto-colon}.
But perhaps the most convenient way to deal with this, if you don't want
-to have a colon in your line, is to use the @samp{%C} specifier. If you
-put a @samp{%C} somewhere in your format line definition, Gnus will
+to have a colon in your line, is to use the @samp{%*} specifier. If you
+put a @samp{%*} somewhere in your format line definition, Gnus will
place point there.
(vertical 0.24
(if (buffer-live-p gnus-summary-buffer)
'(summary 0.5))
- (group 1.0)))))
+ (group 1.0))))
@end lisp
One common desire for a multiple frame split is to have a separate frame
all the timings in the handlers will be affected.)
So, if you want to add a handler, you could put something like this in
-your @file{.gnus} file:
+your @file{.gnus.el} file:
@findex gnus-demon-add-handler
@lisp
@code{gnus-demon-add-nntp-close-connection},
@code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
@code{gnus-demon-add-scanmail}. Just put those functions in your
-@file{.gnus} if you want those abilities.
+@file{.gnus.el} if you want those abilities.
@findex gnus-demon-init
@findex gnus-demon-cancel
easier insertion of X-Face headers in outgoing messages.
@findex gnus-random-x-face
-@code{gnus-random-x-face} goes through all the @samp{pbm} files
-in @code{gnus-x-face-directory} and picks one at random, and then
+@code{gnus-random-x-face} goes through all the @samp{pbm} files in
+@code{gnus-x-face-directory} and picks one at random, and then
converts it to the X-Face format by using the
@code{gnus-convert-pbm-to-x-face-command} shell command. The
-@samp{pbm} files should be 48x48 pixels big.
+@samp{pbm} files should be 48x48 pixels big. It returns the X-Face
+header data as a string.
+@findex gnus-insert-random-x-face-header
+@code{gnus-insert-random-x-face-header} calls
+@code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
+randomly generated data.
+
+@findex gnus-x-face-from-file
@code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
converts the file to X-Face format by using the
@code{gnus-convert-image-to-x-face-command} shell command.
-Here's how you would typically use the former function. Put something
+Here's how you would typically use the first function. Put something
like the following in your @file{.gnus.el} file:
@lisp
(list '(X-Face . gnus-random-x-face))))
@end lisp
-Using the latter function would be something like this:
+Using the last function would be something like this:
@lisp
(setq message-required-news-headers
* 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.
-* Filtering Spam Using spam.el::
-* Filtering Spam Using Statistics (spam-stat.el)::
+* Filtering Spam Using The Spam ELisp Package::
+* Filtering Spam Using Statistics with spam-stat::
@end menu
@node The problem of spam
customized mail filtering scripts. Improvements in this area would be
a useful contribution, however.
-@node Filtering Spam Using spam.el
-@subsection Filtering Spam Using spam.el
+@node Filtering Spam Using The Spam ELisp Package
+@subsection Filtering Spam Using The Spam ELisp Package
@cindex spam filtering
-@cindex spam.el
+@cindex spam
The idea behind @code{spam.el} is to have a control center for spam detection
and filtering in Gnus. To that end, @code{spam.el} does two things: it
When you leave a @emph{spam} group, all spam-marked articles are
marked as expired after processing with the spam processor. This is
-not done for @emph{unclassified} or @emph{ham} groups.
+not done for @emph{unclassified} or @emph{ham} groups. Also, any
+@strong{ham} articles in a spam group will be moved to a location
+determined by either the @code{ham-process-destination} group
+parameter or the @code{gnus-ham-process-destinations} variable. The
+location is a group name. If the @code{ham-process-destination}
+parameter is not set, spam articles are only expired.
When you leave a @emph{ham} group, all ham-marked articles are sent to
a ham processor, which will study these as non-spam samples.
-@strong{TODO: The @code{ifile} spam processor does not work at this
-time. I'm waiting for info from the author of @code{ifile-gnus.el},
-because I think that functionality should go in @code{ifile-gnus.el}
-rather than @code{spam.el}. You can still use @code{spam-use-ifile}
-to tell @code{spam-split} you want to use ifile for splitting incoming
-mail.}
+When you leave a @emph{ham} or @emph{unclassified} group, all
+@strong{spam} articles are moved to a location determined by either
+the @code{spam-process-destination} group parameter or the
+@code{gnus-spam-process-destinations} variable. The location is a
+group name. If the @code{spam-process-destination} parameter is not
+set, the spam articles are only expired.
To use the @code{spam.el} facilities for incoming mail filtering, you
must add the following to your fancy split list
@code{spam-split-group}. By default that group name is @samp{spam},
but you can customize it.
+@emph{TODO: Currently, spam.el only supports insertion of articles
+into a backend. There is no way to tell spam.el that an article is no
+longer spam or ham.}
+
+@emph{TODO: spam.el needs to provide a uniform way of training all the
+statistical databases. Some have that functionality built-in, others
+don't.}
+
The following are the methods you can use to control the behavior of
@code{spam-split} and their corresponding spam and ham processors:
* BBDB Whitelists::
* Blackholes::
* Bogofilter::
-* Ifile spam filtering::
-* Extending spam.el::
+* ifile spam filtering::
+* spam-stat spam filtering::
+* Extending the spam elist package::
@end menu
@node Blacklists and Whitelists
@cindex spam filtering
@cindex whitelists, spam filtering
@cindex blacklists, spam filtering
-@cindex spam.el
+@cindex spam
@defvar spam-use-blacklist
Set this variable to t if you want to use blacklists when splitting
@cindex spam filtering
@cindex BBDB whitelists, spam filtering
@cindex BBDB, spam filtering
-@cindex spam.el
+@cindex spam
@defvar spam-use-BBDB
@subsubsection Blackholes
@cindex spam filtering
@cindex blackholes, spam filtering
-@cindex spam.el
+@cindex spam
@defvar spam-use-blackholes
@subsubsection Bogofilter
@cindex spam filtering
@cindex bogofilter, spam filtering
-@cindex spam.el
+@cindex spam
@defvar spam-use-bogofilter
processing.}
@end defvar
-@node Ifile spam filtering
-@subsubsection Ifile spam filtering
+@node ifile spam filtering
+@subsubsection ifile spam filtering
@cindex spam filtering
@cindex ifile, spam filtering
-@cindex spam.el
+@cindex spam
@defvar spam-use-ifile
-Enable this variable if you want @code{spam-split} to use Ifile, a
-statistical analyzer similar to Bogofilter. Currently you must have
-@code{ifile-gnus.el} loaded. The integration of Ifile with
-@code{spam.el} is not finished yet, but you can use
-@code{ifile-gnus.el} on its own if you like.
+Enable this variable if you want @code{spam-split} to use ifile, a
+statistical analyzer similar to Bogofilter.
+
+@end defvar
+
+@defvar spam-ifile-all-categories
+
+Enable this variable if you want @code{spam-use-ifile} to give you all
+the ifile categories, not just spam/non-spam. If you use this, make
+sure you train ifile as described in its documentation.
+
+@end defvar
+
+@defvar spam-ifile-spam-category
+
+This is the category of spam messages as far as ifile is concerned.
+The actual string used is irrelevant, but you probably want to leave
+the default value of @samp{spam}.
+@end defvar
+
+@defvar spam-ifile-database-path
+This is the filename for the ifile database. It is not specified by
+default, so ifile will use its own default database name.
+
+@end defvar
+
+The ifile mail classifier is similar to Bogofilter in intent and
+purpose. A ham and a spam processor are provided, plus the
+@code{spam-use-ifile} variable to indicate to spam-split that ifile
+should be used. The 1.2.1 version of ifile was used to test this
+functionality.
+
+@node spam-stat spam filtering
+@subsubsection spam-stat spam filtering
+@cindex spam filtering
+@cindex spam-stat, spam filtering
+@cindex spam-stat
+@cindex spam
+
+@xref{Filtering Spam Using Statistics with spam-stat}.
+
+@defvar spam-use-stat
+
+Enable this variable if you want @code{spam-split} to use
+spam-stat.el, an Emacs Lisp statistical analyzer.
+
+@end defvar
+
+@defvar gnus-group-spam-exit-processor-stat
+Add this symbol to a group's @code{spam-process} parameter by
+customizing the group parameters or the
+@code{gnus-spam-process-newsgroups} variable. When this symbol is
+added to a group's @code{spam-process} parameter, the spam-marked
+articles will be added to the spam-stat database of spam messages.
+@end defvar
+
+@defvar gnus-group-ham-exit-processor-stat
+Add this symbol to a group's @code{spam-process} parameter by
+customizing the group parameters or the
+@code{gnus-spam-process-newsgroups} variable. When this symbol is
+added to a group's @code{spam-process} parameter, the ham-marked
+articles in @emph{ham} groups will be added to the spam-stat database
+of non-spam messages. Note that this ham processor has no effect in
+@emph{spam} or @emph{unclassified} groups.
@end defvar
-Ifile can only be used to filter incoming mail into spam and ham
-through the @code{spam-split} function. It will be better integrated
-with @code{spam.el} with the next release of @code{ifile-gnus.el}.
+This enables spam.el to cooperate with spam-stat.el. spam-stat.el
+provides an internal (Lisp-only) spam database, which unlike ifile or
+Bogofilter does not require external programs. A spam and a ham
+processor, and the @code{spam-use-stat} variable for @code{spam-split}
+are provided.
-@node Extending spam.el
-@subsubsection Extending spam.el
+@node Extending the spam elist package
+@subsubsection Extending the spam elisp package
@cindex spam filtering
-@cindex spam.el, extending
-@cindex extending spam.el
+@cindex spam elisp package, extending
+@cindex extending the spam elisp package
Say you want to add a new back end called blackbox. For filtering
incoming mail, provide the following:
@end enumerate
-@node Filtering Spam Using Statistics (spam-stat.el)
-@subsection Filtering Spam Using Statistics (spam-stat.el)
+@node Filtering Spam Using Statistics with spam-stat
+@subsection Filtering Spam Using Statistics with spam-stat
@cindex Paul Graham
@cindex Graham, Paul
@cindex naive Bayesian spam filtering
@file{~/Mail/mail/misc} (this usually corresponds the the group
@samp{nnml:mail.misc}).
+When you are using IMAP, you won't have the mails available locally,
+so that will not work. One solution is to use the Gnus Agent to cache
+the articles. Then you can use directories such as
+@file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
+@code{spam-stat-process-spam-directory}. @xref{Agent as Cache}.
+
@defvar spam-stat
This variable holds the hash-table with all the statistics -- the
dictionary we have been talking about. For every word in either
collection, this hash-table stores a vector describing how often the
word appeared in spam and often it appeared in non-spam mails.
+@end defvar
If you want to regenerate the statistics from scratch, you need to
reset the dictionary.
-@end defvar
-
@defun spam-stat-reset
Reset the @code{spam-stat} hash-table, deleting all the statistics.
+@end defun
When you are done, you must save the dictionary. The dictionary may
be rather large. If you will not update the dictionary incrementally
can reduce the size of the dictionary by deleting all words that did
not appear often enough or that do not clearly belong to only spam or
only non-spam mails.
-@end defun
@defun spam-stat-reduce-size
Reduce the size of the dictionary. Use this only if you do not want
created.
Next, you need to adapt your fancy splitting rules: You need to
-determine how to use @code{spam-stat}. In the simplest case, you only have
-two groups, @samp{mail.misc} and @samp{mail.spam}. The following expression says
-that mail is either spam or it should go into @samp{mail.misc}. If it is
-spam, then @code{spam-stat-split-fancy} will return @samp{mail.spam}.
+determine how to use @code{spam-stat}. The following examples are for
+the nnml back end. Using the nnimap back end works just as well. Just
+use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
+
+In the simplest case, you only have two groups, @samp{mail.misc} and
+@samp{mail.spam}. The following expression says that mail is either
+spam or it should go into @samp{mail.misc}. If it is spam, then
+@code{spam-stat-split-fancy} will return @samp{mail.spam}.
@example
(setq nnmail-split-fancy
@end defvar
If you also filter mail with specific subjects into other groups, use
-the following expression. It only the mails not matching the regular
+the following expression. Only mails not matching the regular
expression are considered potential spam.
@example
The main interface to using @code{spam-stat}, are the following functions:
@defun spam-stat-buffer-is-spam
-called in a buffer, that buffer is considered to be a new spam mail;
-use this for new mail that has not been processed before
-
+Called in a buffer, that buffer is considered to be a new spam mail.
+Use this for new mail that has not been processed before.
@end defun
@defun spam-stat-buffer-is-no-spam
-called in a buffer, that buffer is considered to be a new non-spam
-mail; use this for new mail that has not been processed before
-
+Called in a buffer, that buffer is considered to be a new non-spam
+mail. Use this for new mail that has not been processed before.
@end defun
@defun spam-stat-buffer-change-to-spam
-called in a buffer, that buffer is no longer considered to be normal
-mail but spam; use this to change the status of a mail that has
-already been processed as non-spam
-
+Called in a buffer, that buffer is no longer considered to be normal
+mail but spam. Use this to change the status of a mail that has
+already been processed as non-spam.
@end defun
@defun spam-stat-buffer-change-to-non-spam
-called in a buffer, that buffer is no longer considered to be spam but
-normal mail; use this to change the status of a mail that has already
-been processed as spam
-
+Called in a buffer, that buffer is no longer considered to be spam but
+normal mail. Use this to change the status of a mail that has already
+been processed as spam.
@end defun
@defun spam-stat-save
-save the hash table to the file; the filename used is stored in the
-variable @code{spam-stat-file}
-
+Save the hash table to the file. The filename used is stored in the
+variable @code{spam-stat-file}.
@end defun
@defun spam-stat-load
-load the hash table from a file; the filename used is stored in the
-variable @code{spam-stat-file}
-
+Load the hash table from a file. The filename used is stored in the
+variable @code{spam-stat-file}.
@end defun
@defun spam-stat-score-word
-return the spam score for a word
-
+Return the spam score for a word.
@end defun
@defun spam-stat-score-buffer
-return the spam score for a buffer
-
+Return the spam score for a buffer.
@end defun
@defun spam-stat-split-fancy
-for fancy mail splitting; add the rule @samp{(: spam-stat-split-fancy)} to
-@code{nnmail-split-fancy}
+Use this function for fancy mail splitting. Add the rule @samp{(:
+spam-stat-split-fancy)} to @code{nnmail-split-fancy}
+@end defun
-This requires the following in your @file{~/.gnus} file:
+Make sure you load the dictionary before using it. This requires the
+following in your @file{~/.gnus} file:
@example
(require 'spam-stat)
(spam-stat-load)
@end example
-@end defun
-
Typical test will involve calls to the following functions:
@example
read if your machine should go down (@pxref{Auto Save}).
@item
-Gnus now has its own startup file (@file{.gnus}) to avoid cluttering up
+Gnus now has its own startup file (@file{.gnus.el}) to avoid cluttering up
the @file{.emacs} file.
@item
The function should return a cons where the @code{car} is the group name and
the @code{cdr} is the article number that the article was entered as.
+The group should exist before the backend is asked to accept the
+article for that group.
+
There should be no data returned.