@syncodeindex pg cp
@copying
-Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
Filtering Spam Using The Spam ELisp Package
-* Spam ELisp Package Sequence of Events::
-* Spam ELisp Package Filtering of Incoming Mail::
-* Spam ELisp Package Global Variables::
-* Spam ELisp Package Configuration Examples::
-* Blacklists and Whitelists::
-* BBDB Whitelists::
-* Gmane Spam Reporting::
-* Anti-spam Hashcash Payments::
-* Blackholes::
-* Regular Expressions Header Matching::
-* Bogofilter::
-* ifile spam filtering::
-* spam-stat spam filtering::
-* SpamOracle::
-* Extending the Spam ELisp package::
+* Spam ELisp Package Sequence of Events::
+* Spam ELisp Package Filtering of Incoming Mail::
+* Spam ELisp Package Global Variables::
+* Spam ELisp Package Configuration Examples::
+* Blacklists and Whitelists::
+* BBDB Whitelists::
+* Gmane Spam Reporting::
+* Anti-spam Hashcash Payments::
+* Blackholes::
+* Regular Expressions Header Matching::
+* Bogofilter::
+* ifile spam filtering::
+* spam-stat spam filtering::
+* SpamOracle::
+* Extending the Spam ELisp package::
Filtering Spam Using Statistics with spam-stat
Most common Unix news readers use a shared startup file called
@file{.newsrc}. This file contains all the information about what
groups are subscribed, and which articles in these groups have been
-read.
+read.
Things got a bit more complicated with @sc{gnus}. In addition to
keeping the @file{.newsrc} file updated, it also used a file called
@vindex gnus-init-file
@vindex gnus-site-init-file
When Gnus starts, it will read the @code{gnus-site-init-file}
-(@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
+(@file{.../site-lisp/gnus-init} by default) and @code{gnus-init-file}
(@file{~/.gnus} by default) files. These are normal Emacs Lisp files
and can be used to avoid cluttering your @file{~/.emacs} and
@file{site-init} files with Gnus stuff. Gnus will also check for files
with the same names as these, but with @file{.elc} and @file{.el}
suffixes. In other words, if you have set @code{gnus-init-file} to
@file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
-and finally @file{~/.gnus} (in this order).
-
+and finally @file{~/.gnus} (in this order). If Emacs was invoked with
+the @option{-q} or @option{--no-init-file} options (@pxref{Initial
+Options, ,Initial Options, emacs, The Emacs Manual}), Gnus doesn't read
+@code{gnus-init-file}.
@node Auto Save
hear a beep when you enter a group, you could put something like
@code{(dummy-variable (ding))} in the parameters of that group.
@code{dummy-variable} will be set to the (meaningless) result of the
-@code{(ding)} form.
+@code{(ding)} form.
Alternatively, since the VARIABLE becomes local to the group, this
pattern can be used to temporarily change a hook. For example, if the
8: comp.binaries.fractals
13: comp.sources.unix
452: alt.sex.emacs
-@end group
+@end group
@end example
The @samp{Emacs} topic has the topic parameter @code{(score-file
@code{mm-discouraged-alternatives} in @ref{Display Customization,
Display Customization, , emacs-mime, Emacs-Mime Manual}. Images or
other material inside a "multipart/related" part might be overlooked
-when this variable is nil.
+when this variable is @code{nil}.
@vindex gnus-mime-display-multipart-as-mixed
@item gnus-mime-display-multipart-as-mixed
-Display "multipart" parts as "multipart/mixed". If t, it overrides nil
-values of @code{gnus-mime-display-multipart-alternative-as-mixed} and
+Display "multipart" parts as "multipart/mixed". If @code{t}, it
+overrides @code{nil} values of
+@code{gnus-mime-display-multipart-alternative-as-mixed} and
@code{gnus-mime-display-multipart-related-as-mixed}.
@vindex mm-file-name-rewrite-functions
just send out messages without saying what character sets they use. To
help a bit with this, some local news hierarchies have policies that say
what character set is the default. For instance, the @samp{fj}
-hierarchy uses @code{iso-2022-jp-2}.
+hierarchy uses @code{iso-2022-jp}.
@vindex gnus-group-charset-alist
This knowledge is encoded in the @code{gnus-group-charset-alist}
By default the splitting codes @acronym{MIME} decodes headers so you
can match on non-@acronym{ASCII} strings. The
@code{nnmail-mail-splitting-charset} variable specifies the default
-charset for decoding. The behaviour can be turned off completely by
+charset for decoding. The behavior can be turned off completely by
binding @code{nnmail-mail-splitting-decodes} to @code{nil}, which is
useful if you want to match articles based on the raw header data.
@table @code
-@item group
+@item group
If the split is a string, that will be taken as a group name. Normal
regexp match expansion will be done. See below for examples.
In this example, messages sent from @samp{joedavis@@foo.org} will
normally not be filed in @samp{joemail}. With
-@code{nnmail-split-fancy-match-partial-words} set to t, however, the
-match will happen. In effect, the requirement of a word boundary is
-removed and instead the match becomes more like a grep.
+@code{nnmail-split-fancy-match-partial-words} set to @code{t},
+however, the match will happen. In effect, the requirement of a word
+boundary is removed and instead the match becomes more like a grep.
@findex nnmail-split-fancy-with-parent
@code{nnmail-split-fancy-with-parent} is a function which allows you to
A file containing credentials used to log in on servers. The format is
(almost) the same as the @code{ftp} @file{~/.netrc} file. See the
variable @code{nntp-authinfo-file} for exact syntax; also see
-@ref{NNTP}. An example of an .authinfo line for an IMAP server, is:
+@ref{NNTP}. An example of an .authinfo line for an IMAP server, is:
@example
machine students.uio.no login larsi password geheimnis port imap
Set to non-@code{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.
+splitting function that analyzes the body to split the article.
@end table
@acronym{IMAP} is a complex protocol, more so than @acronym{NNTP} or
@acronym{POP3}. Implementation bugs are not unlikely, and we do our
-best to fix them right away. If you encounter odd behaviour, chances
+best to fix them right away. If you encounter odd behavior, chances
are that either the server or Gnus is buggy.
If you are familiar with network protocols in general, you will
@vindex imap-log
Because the protocol dump, when enabled, generates lots of data, it is
disabled by default. You can enable it by setting @code{imap-log} as
-follows:
+follows:
@lisp
(setq imap-log t)
situation, you have two choices available. First, you can completely
disable the undownload faces by customizing
@code{gnus-summary-highlight} to delete the three cons-cells that
-refer to the @code{gnus-summary-*-undownloaded-face} faces. Second, if
-you prefer to take a more fine-grained approach, you may set the
-@code{agent-disable-undownloaded-faces} group parameter to t. This
-parameter, like all other agent parameters, may be set on an Agent
-Category (@pxref{Agent Categories}), a Group Topic (@pxref{Topic
+refer to the @code{gnus-summary-*-undownloaded-face} faces. Second,
+if you prefer to take a more fine-grained approach, you may set the
+@code{agent-disable-undownloaded-faces} group parameter to @code{t}.
+This parameter, like all other agent parameters, may be set on an
+Agent Category (@pxref{Agent Categories}), a Group Topic (@pxref{Topic
Parameters}), or an individual group (@pxref{Group Parameters}).
@node Agent as Cache
If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
mark articles as unread after downloading. This is usually a safe
thing to do as the newly downloaded article has obviously not been
-read. The default is t.
+read. The default is @code{t}.
@item gnus-agent-consider-all-articles
@vindex gnus-agent-consider-all-articles
@table @dfn
@item If I read an article while plugged, do they get entered into the Agent?
-@strong{No}. If you want this behaviour, add
+@strong{No}. If you want this behavior, add
@code{gnus-agent-fetch-selected-article} to
@code{gnus-select-article-hook}.
Gnus usually moves point to a pre-defined place on each line in most
buffers. By default, point move to the first colon character on the
-line. You can customize this behaviour in three different ways.
+line. You can customize this behavior in three different ways.
You can move the colon character to somewhere else on the line.
@item gnus-nocem-verifyer
@vindex gnus-nocem-verifyer
-@findex mc-verify
+@findex pgg-verify
This should be a function for verifying that the NoCeM issuer is who she
-says she is. The default is @code{mc-verify}, which is a Mailcrypt
-function. If this is too slow and you don't care for verification
-(which may be dangerous), you can set this variable to @code{nil}.
+says she is. The default is @code{pgg-verify}, which returns
+non-@code{nil} if the verification is successful, otherwise (including
+the case the NoCeM message was not signed) returns @code{nil}. If this
+is too slow and you don't care for verification (which may be dangerous),
+you can set this variable to @code{nil}.
-If you want signed NoCeM messages to be verified and unsigned messages
-not to be verified (but used anyway), you could do something like:
-
-@lisp
-(setq gnus-nocem-verifyer 'my-gnus-mc-verify)
-
-(defun my-gnus-mc-verify ()
- (not (eq 'forged
- (ignore-errors
- (if (mc-verify)
- t
- 'forged)))))
-@end lisp
-
-This might be dangerous, though.
+Formerly the default was @code{mc-verify}, which is a Mailcrypt
+function. While you can still use it, you can change it into
+@code{pgg-verify} running with GnuPG if you are willing to add the
+@acronym{PGP} public keys to GnuPG's keyring.
@item gnus-nocem-directory
@vindex gnus-nocem-directory
@samp{vmadmin.com}. If you get 200 messages about @samp{VIAGRA}, you
discard all messages with @samp{VIAGRA} in the message. If you get
lots of spam from Bulgaria, for example, you try to filter all mail
-from Bulgarian IPs.
+from Bulgarian IPs.
This, unfortunately, is a great way to discard legitimate e-mail. The
risks of blocking a whole country (Bulgaria, Norway, Nigeria, China,
group.
@menu
-* Spam ELisp Package Sequence of Events::
-* Spam ELisp Package Filtering of Incoming Mail::
-* Spam ELisp Package Global Variables::
-* Spam ELisp Package Configuration Examples::
-* Blacklists and Whitelists::
-* BBDB Whitelists::
-* Gmane Spam Reporting::
-* Anti-spam Hashcash Payments::
-* Blackholes::
-* Regular Expressions Header Matching::
-* Bogofilter::
-* ifile spam filtering::
-* spam-stat spam filtering::
-* SpamOracle::
-* Extending the Spam ELisp package::
-@end menu
+* Spam ELisp Package Sequence of Events::
+* Spam ELisp Package Filtering of Incoming Mail::
+* Spam ELisp Package Global Variables::
+* Spam ELisp Package Configuration Examples::
+* Blacklists and Whitelists::
+* BBDB Whitelists::
+* Gmane Spam Reporting::
+* Anti-spam Hashcash Payments::
+* Blackholes::
+* Regular Expressions Header Matching::
+* Bogofilter::
+* ifile spam filtering::
+* spam-stat spam filtering::
+* SpamOracle::
+* Extending the Spam ELisp package::
+@end menu
@node Spam ELisp Package Sequence of Events
@subsubsection Spam ELisp Package Sequence of Events
;; @r{any ham goes to my @samp{nnimap+mail.lifelogs.com:mail} folder, but}
;; @r{also to my @samp{nnimap+mail.lifelogs.com:trainham} folder for training}
- (ham-process-destination "nnimap+mail.lifelogs.com:mail"
+ (ham-process-destination "nnimap+mail.lifelogs.com:mail"
"nnimap+mail.lifelogs.com:trainham")
;; @r{in this group, only @samp{!} marks are ham}
(ham-marks
(spam-contents gnus-group-spam-classification-ham))
@end lisp
-@itemize
+@itemize
@item @b{The Spam folder:}
added to a group's @code{spam-process} parameter, the senders of
spam-marked articles will be added to the blacklist.
-@emph{WARNING}
+@emph{WARNING}
Instead of the obsolete
@code{gnus-group-spam-exit-processor-blacklist}, it is recommended
whitelist. Note that this ham processor has no effect in @emph{spam}
or @emph{unclassified} groups.
-@emph{WARNING}
+@emph{WARNING}
Instead of the obsolete
@code{gnus-group-ham-exit-processor-whitelist}, it is recommended
BBDB. Note that this ham processor has no effect in @emph{spam}
or @emph{unclassified} groups.
-@emph{WARNING}
+@emph{WARNING}
Instead of the obsolete
@code{gnus-group-ham-exit-processor-BBDB}, it is recommended
Gmane can be found at @uref{http://gmane.org}.
-@emph{WARNING}
+@emph{WARNING}
Instead of the obsolete
@code{gnus-group-spam-exit-processor-report-gmane}, it is recommended
added to a group's @code{spam-process} parameter, spam-marked articles
will be added to the Bogofilter spam database.
-@emph{WARNING}
+@emph{WARNING}
Instead of the obsolete
@code{gnus-group-spam-exit-processor-bogofilter}, it is recommended
of non-spam messages. Note that this ham processor has no effect in
@emph{spam} or @emph{unclassified} groups.
-@emph{WARNING}
+@emph{WARNING}
Instead of the obsolete
@code{gnus-group-ham-exit-processor-bogofilter}, it is recommended
added to a group's @code{spam-process} parameter, the spam-marked
articles will be added to the spam-stat database of spam messages.
-@emph{WARNING}
+@emph{WARNING}
Instead of the obsolete
@code{gnus-group-spam-exit-processor-stat}, it is recommended
of non-spam messages. Note that this ham processor has no effect in
@emph{spam} or @emph{unclassified} groups.
-@emph{WARNING}
+@emph{WARNING}
Instead of the obsolete
@code{gnus-group-ham-exit-processor-stat}, it is recommended
to a group's @code{spam-process} parameter, spam-marked articles will be
sent to SpamOracle as spam samples.
-@emph{WARNING}
+@emph{WARNING}
Instead of the obsolete
@code{gnus-group-spam-exit-processor-spamoracle}, it is recommended
messages. Note that this ham processor has no effect in @emph{spam} or
@emph{unclassified} groups.
-@emph{WARNING}
+@emph{WARNING}
Instead of the obsolete
@code{gnus-group-ham-exit-processor-spamoracle}, it is recommended
provide them if Blackbox supports spam or ham processing.
Also, ham and spam processors are being phased out as single
-variables. Instead the form @code{'(spam spam-use-blackbox)} or
+variables. Instead the form @code{'(spam spam-use-blackbox)} or
@code{'(ham spam-use-blackbox)} is favored. For now, spam/ham
processor variables are still around but they won't be for long.
@kbd{J r} in the server buffer. Gnus will not download articles into
the Agent cache, unless you instruct it to do so, though, by using
@kbd{J u} or @kbd{J s} from the Group buffer. You revert to the old
-behaviour of having the Agent disabled with @code{(setq gnus-agent
+behavior of having the Agent disabled with @code{(setq gnus-agent
nil)}. Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
is not needed any more.
system. While the variable is called @code{canlock-password}, it is not
security sensitive data. Publishing your canlock string on the web
will not allow anyone to be able to anything she could not already do.
-The behaviour can be changed by customizing @code{message-insert-canlock}.
+The behavior can be changed by customizing @code{message-insert-canlock}.
@item
Gnus supports server-side mail filtering using Sieve.
@item
The default for @code{message-forward-show-mml} changed to symbol @code{best}.
-The behaviour for the @code{best} value is to show @acronym{MML} (i.e.,
+The behavior for the @code{best} value is to show @acronym{MML} (i.e.,
convert to @acronym{MIME}) when appropriate. @acronym{MML} will not be
used when forwarding signed or encrypted messages, as the conversion
invalidate the digital signature.
edebug. Debugging Lisp code is documented in the Elisp manual
(@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
Lisp Reference Manual}). To get you started with edebug, consider if
-you discover some weird behaviour when pressing @kbd{c}, the first
+you discover some weird behavior when pressing @kbd{c}, the first
step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
the documentation buffer that leads you to the function definition,
then press @kbd{M-x edebug-defun RET} with point inside that function,