* Image Enhancements:: Modern versions of Emacs/XEmacs can display images.
* Fuzzy Matching:: What's the big fuzz?
* Thwarting Email Spam:: A how-to on avoiding unsolicited commercial email.
-* Pay Hashcash:: Reduce spam by burning CPU time.
* Various Various:: Things that are really various.
Formatting Variables
* 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.
(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)
@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)
@example
if address "sender" "owner-ding@@hpc.uh.edu" @{
- fileinto "INBOX.ding";
- stop;
+ fileinto "INBOX.ding";
+ stop;
@}
@end example
@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
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
(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
goes out to all people listed in the @code{To}, @code{From} (or
@code{Reply-to}) and @code{Cc} headers.
-@item S V
-@kindex S V (Summary)
+@item S W
+@kindex S W (Summary)
@findex gnus-summary-wide-reply-with-original
Mail a wide reply to the current article and include the original
message (@code{gnus-summary-wide-reply-with-original}). This command uses
@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)
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
(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
(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")
@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}. Set this to
-@samp{("-t")} if you use @samp{ssh} for @code{nntp-via-rlogin-command}
-and the telnet command requires a pseudo-tty allocation on an
-intermediate host.
+@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
@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:
(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
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
@subsection Web Searches
@cindex nnweb
@cindex Google
-@cindex DejaNews
-@cindex Alta Vista
-@cindex InReference
+@cindex dejanews
+@cindex gmane
@cindex Usenet searches
@cindex searching the Usenet
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.
@item nnweb-type
@vindex nnweb-type
What search engine type is being used. The currently supported types
-are @code{google}, @code{dejanews}, @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
@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
(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
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
@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:
(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:
* Image Enhancements:: Modern versions of Emacs/XEmacs can display images.
* Fuzzy Matching:: What's the big fuzz?
* Thwarting Email Spam:: A how-to on avoiding unsolicited commercial email.
-* Pay Hashcash:: Reduce spam by burning CPU time.
* Various Various:: Things that are really various.
@end menu
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
-@node Pay Hashcash
-@section Pay Hashcash
+@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
-@cindex spam
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 uses this technique, since it is
-optional, but it may be useful in smaller communities.
+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
@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 ->