1344 lines
31 KiB
HTML
1344 lines
31 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>The Linux Mail User HOWTO</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
|
|
><BODY
|
|
CLASS="article"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="ARTICLE"
|
|
><DIV
|
|
CLASS="TITLEPAGE"
|
|
><H1
|
|
CLASS="title"
|
|
><A
|
|
NAME="AEN2"
|
|
></A
|
|
>The Linux Mail User HOWTO</H1
|
|
><H3
|
|
CLASS="author"
|
|
><A
|
|
NAME="AEN4"
|
|
>Eric Steven Raymond</A
|
|
></H3
|
|
><DIV
|
|
CLASS="affiliation"
|
|
><SPAN
|
|
CLASS="orgname"
|
|
><A
|
|
HREF="http://www.catb.org/~esr/"
|
|
TARGET="_top"
|
|
> Thyrsus Enterprises</A
|
|
><BR></SPAN
|
|
><DIV
|
|
CLASS="address"
|
|
><P
|
|
CLASS="address"
|
|
><br>
|
|
<TT
|
|
CLASS="email"
|
|
><<A
|
|
HREF="mailto:esr@thyrsus.com"
|
|
>esr@thyrsus.com</A
|
|
>></TT
|
|
><br>
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><P
|
|
CLASS="copyright"
|
|
>Copyright © 2005 Eric S. Raymond</P
|
|
><DIV
|
|
><DIV
|
|
CLASS="abstract"
|
|
><A
|
|
NAME="AEN16"
|
|
></A
|
|
><P
|
|
></P
|
|
><P
|
|
>This document is an introduction to the world of electronic
|
|
mail
|
|
(email) under Linux. It
|
|
focuses on user-level issues and typical configurations for Linux home
|
|
and small-business machines connected to the net via an ISP.</P
|
|
><P
|
|
>You need to read this if you plan to communicate locally or to
|
|
remote sites via electronic mail. You probably do
|
|
<EM
|
|
>not</EM
|
|
> need to read this document if don't exchange
|
|
electronic mail with other users on your system or with other
|
|
sites.</P
|
|
><P
|
|
>For information on configuring and administering mail, see the
|
|
Mail Administrator HOWTO.</P
|
|
><P
|
|
></P
|
|
></DIV
|
|
></DIV
|
|
><HR></DIV
|
|
><DIV
|
|
CLASS="TOC"
|
|
><DL
|
|
><DT
|
|
><B
|
|
>Table of Contents</B
|
|
></DT
|
|
><DT
|
|
>1. <A
|
|
HREF="#introduction"
|
|
>Introduction</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>1.1. <A
|
|
HREF="#newversions"
|
|
>New versions of this document</A
|
|
></DT
|
|
><DT
|
|
>1.2. <A
|
|
HREF="#hardware"
|
|
>Hardware requirements for email programs</A
|
|
></DT
|
|
><DT
|
|
>1.3. <A
|
|
HREF="#sources"
|
|
>Software sources for email programs</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>2. <A
|
|
HREF="#mua"
|
|
>Mail User Agents</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>2.1. <A
|
|
HREF="#editor"
|
|
>Setting your mail editor</A
|
|
></DT
|
|
><DT
|
|
>2.2. <A
|
|
HREF="#mutt"
|
|
>mutt</A
|
|
></DT
|
|
><DT
|
|
>2.3. <A
|
|
HREF="#elm"
|
|
>elm</A
|
|
></DT
|
|
><DT
|
|
>2.4. <A
|
|
HREF="#pine"
|
|
>pine</A
|
|
></DT
|
|
><DT
|
|
>2.5. <A
|
|
HREF="#netscape"
|
|
>Netscape</A
|
|
></DT
|
|
><DT
|
|
>2.6. <A
|
|
HREF="#emacs"
|
|
>Emacs rmail/smail and vm.</A
|
|
></DT
|
|
><DT
|
|
>2.7. <A
|
|
HREF="#bsdmail"
|
|
>BSD mail</A
|
|
></DT
|
|
><DT
|
|
>2.8. <A
|
|
HREF="#othermuas"
|
|
>Other user agents</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>3. <A
|
|
HREF="#advanced"
|
|
>Advanced topics</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>3.1. <A
|
|
HREF="#aliases"
|
|
>Aliases</A
|
|
></DT
|
|
><DT
|
|
>3.2. <A
|
|
HREF="#forwarding"
|
|
>Forwarding</A
|
|
></DT
|
|
><DT
|
|
>3.3. <A
|
|
HREF="#autoreply"
|
|
>Auto-replying</A
|
|
></DT
|
|
><DT
|
|
>3.4. <A
|
|
HREF="#lists"
|
|
>Mailing lists</A
|
|
></DT
|
|
><DT
|
|
>3.5. <A
|
|
HREF="#filters"
|
|
>Mail filters</A
|
|
></DT
|
|
><DT
|
|
>3.6. <A
|
|
HREF="#spam"
|
|
>Coping with spam</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>4. <A
|
|
HREF="#resources"
|
|
>Other sources of information</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>4.1. <A
|
|
HREF="#usenet"
|
|
>USENET</A
|
|
></DT
|
|
><DT
|
|
>4.2. <A
|
|
HREF="#books"
|
|
>Books</A
|
|
></DT
|
|
><DT
|
|
>4.3. <A
|
|
HREF="#periodic"
|
|
>Periodic USENET Postings</A
|
|
></DT
|
|
><DT
|
|
>4.4. <A
|
|
HREF="#dontgo"
|
|
>Where <EM
|
|
>not</EM
|
|
> to look for help</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>5. <A
|
|
HREF="#administrivia"
|
|
>Administrivia</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>5.1. <A
|
|
HREF="#AEN276"
|
|
>Feedback</A
|
|
></DT
|
|
><DT
|
|
>5.2. <A
|
|
HREF="#copyright"
|
|
>Copyright Information</A
|
|
></DT
|
|
><DT
|
|
>5.3. <A
|
|
HREF="#disclaimer"
|
|
>Standard Disclaimer</A
|
|
></DT
|
|
><DT
|
|
>5.4. <A
|
|
HREF="#acknowledgements"
|
|
>Acknowledgements</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="introduction"
|
|
></A
|
|
>1. Introduction</H1
|
|
><P
|
|
>The intent of this document is to explain how email works, and answer
|
|
some of the questions that appear to meet the definition of
|
|
`frequently asked questions' about e-mail software under Linux.</P
|
|
><P
|
|
>Modern Linux distributions give you a usable, preconfigured
|
|
setup for electronic mail out of the box, usually featuring a late
|
|
version of
|
|
sendmail-v8.
|
|
This HOWTO will assume that you have such a setup and a working
|
|
Internet connection.</P
|
|
><P
|
|
>(For information on how to set up a PPP or SLIP link to an ISP,
|
|
see the <A
|
|
HREF="http://metalab.unc.edu/LDP/HOWTO/ISP-Hookup-HOWTO.html"
|
|
TARGET="_top"
|
|
>ISP
|
|
Hookup HOWTO</A
|
|
>.)</P
|
|
><P
|
|
>Accordingly, unlike Vince Skahan's 1.x versions, this HOWTO focuses on
|
|
user issues and architecture; most technical hair about UUCP, IDA
|
|
sendmail and other formerly important topics has been dropped.</P
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="newversions"
|
|
></A
|
|
>1.1. New versions of this document</H2
|
|
><P
|
|
>This document will be posted monthly to the newsgroup <A
|
|
HREF="news:comp.os.linux.answers"
|
|
TARGET="_top"
|
|
>comp.os.linux.answers</A
|
|
> You
|
|
should also be able to view the latest version of this HOWTO on the
|
|
World Wide Web at <A
|
|
HREF="http://metalab.unc.edu/LDP/HOWTO/Mail-User-HOWTO.html"
|
|
TARGET="_top"
|
|
> http://metalab.unc.edu/LDP/HOWTO/Mail-User-HOWTO.html</A
|
|
>.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="hardware"
|
|
></A
|
|
>1.2. Hardware requirements for email programs</H2
|
|
><P
|
|
>There are no specific hardware requirements for mail under Linux.
|
|
If you have the hardware necessary to connect to the Internet, it
|
|
can support email over that link.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="sources"
|
|
></A
|
|
>1.3. Software sources for email programs</H2
|
|
><P
|
|
>The software you will need for email support is probably
|
|
preinstalled in your Linux distribution. You will find updates on the
|
|
<A
|
|
HREF="http://metalab.unc.edu/pub/Linux"
|
|
TARGET="_top"
|
|
>Metalab Linux
|
|
Archive</A
|
|
>, especially in the <A
|
|
HREF="http://metalab.unc.edu/pub/Linux/system/mail"
|
|
TARGET="_top"
|
|
>mail
|
|
subdirectory</A
|
|
>.</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><HR><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="mua"
|
|
></A
|
|
>2. Mail User Agents</H1
|
|
><P
|
|
>This section contains information related to user agents, which means
|
|
the software the user sees and uses. This software relies on the
|
|
transport agents described in the Mail Administrator's HOWTO (which
|
|
also include user-agent configuration and troubleshooting tips for
|
|
administrators).</P
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="editor"
|
|
></A
|
|
>2.1. Setting your mail editor</H2
|
|
><P
|
|
>Mail user agents call out to some editor to assist composition of
|
|
mail. Which editor is the default varies. Most of them respect
|
|
a convention going back to Unix's early days; the contents of the
|
|
environment variable <TT
|
|
CLASS="envar"
|
|
>VISUAL</TT
|
|
>, if it exists, is taken as the name
|
|
of your preferred editor. If VISUAL is not set, the variable
|
|
EDITOR is checked.</P
|
|
><P
|
|
>Popular values for <TT
|
|
CLASS="envar"
|
|
>EDITOR</TT
|
|
> include
|
|
<B
|
|
CLASS="command"
|
|
>vi</B
|
|
> and <B
|
|
CLASS="command"
|
|
>emacs</B
|
|
>.
|
|
<A
|
|
NAME="emacsclient"
|
|
></A
|
|
>But if you are,
|
|
like me, the sort who always has a GNU Emacs running, the most useful way
|
|
to set <TT
|
|
CLASS="envar"
|
|
>EDITOR</TT
|
|
> is to the value
|
|
<B
|
|
CLASS="command"
|
|
>emacsclient</B
|
|
>. Use this with the following lines in
|
|
your <TT
|
|
CLASS="filename"
|
|
>~/.emacs</TT
|
|
> file:</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="programlisting"
|
|
> (autoload 'server-edit "server" nil t)
|
|
(server-edit)
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>The emacsclient program, when it runs, tries to establish
|
|
communication with an Emacs instance you already have running and
|
|
hand the mail message temporary file to that Emacs to be edited.
|
|
The effect of this will be that when your mailer calls out for an
|
|
editor, a mail composition window pops open inside your Emacs.</P
|
|
><P
|
|
>When you are ready to hand the file back to the mailer for
|
|
sending, type <SPAN
|
|
CLASS="keysym"
|
|
>C-x #</SPAN
|
|
>. The mail buffer will leave
|
|
your display and the emacsclient instance your mailer called will
|
|
return, handing control back to the mailer.</P
|
|
><P
|
|
>It is possible to have more than one emacsclient instance open at once
|
|
without confusing Emacs. However, calling up another Emacs while an
|
|
emacsclient session is running can confuse emacsclient enough that
|
|
it won't be able to find either instance afterwards. If this happens,
|
|
shut down all your Emacs instances and restart just one.</P
|
|
><P
|
|
>If you're running XEmacs rather than GNU Emacs, these directions
|
|
change slightly. In this case you waant to set <TT
|
|
CLASS="envar"
|
|
>EDITOR</TT
|
|
>
|
|
to <B
|
|
CLASS="command"
|
|
>gnuclient</B
|
|
>. In recent versions, your init file
|
|
will live at <TT
|
|
CLASS="filename"
|
|
>~/.xemacs/init.el</TT
|
|
> rather than
|
|
<TT
|
|
CLASS="filename"
|
|
>~/.emacs</TT
|
|
>.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="mutt"
|
|
></A
|
|
>2.2. mutt</H2
|
|
><P
|
|
>This is what I use and recommend. It is descended from elm and
|
|
has similar commands by default, but is much more powerful and
|
|
configurable. It can be a POP3 or IMAP client, and includes excellent
|
|
support for MIME and PGP. There is a <A
|
|
HREF="http://www.mutt.org"
|
|
TARGET="_top"
|
|
>Mutt home page</A
|
|
> on the web.</P
|
|
><P
|
|
>Mutt respects the EDITOR/VISUAL convention.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="elm"
|
|
></A
|
|
>2.3. elm</H2
|
|
><P
|
|
>Elm was the first modern, screen-oriented Unix mailer, but has
|
|
been stagnant for years now and is being displaced by Mutt. Some
|
|
versions of elm have POP3 support built in. For more information, see
|
|
the elm sources and installation instructions in the <A
|
|
HREF="http://metalab.unc.edu/pub/Linux/system/mail"
|
|
TARGET="_top"
|
|
>Metalab mail user
|
|
agents directory</A
|
|
>. Here are a few points that occasionally
|
|
trip people up:</P
|
|
><P
|
|
>No, stock elm is not PGP-aware. There are PGP support patches,
|
|
but Mutt's PGP support is superior. If you want to use PGP, I
|
|
recommend Mutt.</P
|
|
><P
|
|
>Elm respects the EDITOR/VISUAL convention.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="pine"
|
|
></A
|
|
>2.4. pine</H2
|
|
><P
|
|
>Pine is a user agent designed for novices; it includes
|
|
news-reading capability and built-in support for the IMAP remote-mail
|
|
protocol. A lot of people swear by it for new users. I find its
|
|
impoverished command set, limited configurability and native editor
|
|
hard to take. It has excellent built-in IMAP support, however. If
|
|
you want to check it out, the distribution is available at <A
|
|
HREF="http://www.washington.edu/pine"
|
|
TARGET="_top"
|
|
>http://www.washington.edu/pine</A
|
|
>.
|
|
</P
|
|
><P
|
|
>Pine respects the EDITOR/VISUAL convention.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="netscape"
|
|
></A
|
|
>2.5. Netscape</H2
|
|
><P
|
|
>The Netscape browser has POP3 and IMAP remote-mail capability built
|
|
into it, so it can be used as a mail user agent. I don't recommend
|
|
this; it doesn't specialize in being an MUA, and therefore does not
|
|
offer many of the services that real MUAs do (such as aliases and
|
|
PGP handling). It does, however, support LDAP and SSL.</P
|
|
><P
|
|
>Netscape supplies its own mini-editor, the same one used throughout
|
|
the browser (e.g. for text fields in forms).</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="emacs"
|
|
></A
|
|
>2.6. Emacs rmail/smail and vm.</H2
|
|
><P
|
|
>Emacs has a mode called smail that can send mail, and another
|
|
called rmail that can read mail. The smail mode can be quite useful,
|
|
as you get to compose mail inside a full Emacs environment (but see
|
|
also the discussion of <A
|
|
HREF="#emacsclient"
|
|
>emacsclient</A
|
|
>
|
|
elsewhere in this document).</P
|
|
><P
|
|
>The rmail mode, on the other hand, is not recommended. Every
|
|
time you run it, it converts your inbox to BABYL format; ordinary mail
|
|
tools will choke on that. (If this happens to you, do <B
|
|
CLASS="command"
|
|
>M-x
|
|
unrmail</B
|
|
> from the Emacs command line.)</P
|
|
><P
|
|
>There is a mailreader for emacs called `vm' that writes and reads
|
|
standard V7 mailboxes. It is not distributed with GNU Emacs,
|
|
but you can find its home page at <A
|
|
HREF="http://www.wonderworks.com/vm/"
|
|
TARGET="_top"
|
|
> http://www.wonderworks.com/vm/</A
|
|
>.</P
|
|
><P
|
|
>The most popular mailreader for emacs is probably GNUS, distributed
|
|
with GNU Emacs. It is a client for USENET news as well as mail.</P
|
|
><P
|
|
>Emacs smail/rmail/vm do not respect the EDITOR/VISUAL
|
|
convention. Instead, you use the Emacs they're embedded in.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="bsdmail"
|
|
></A
|
|
>2.7. BSD mail</H2
|
|
><P
|
|
>If you simply type `mail' to the shell on a Linux or any other modern
|
|
Unix, you will invoke some variant of the BSD Mail program. It has a
|
|
line-oriented interface originally designed for use on TTYs. It is,
|
|
at this point, only of historical interest.</P
|
|
><P
|
|
>BSD Mail invented the EDITOR/VISUAL convention.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="othermuas"
|
|
></A
|
|
>2.8. Other user agents</H2
|
|
><P
|
|
>The following also are known to run under Linux. Consult `archie' to
|
|
find them...</P
|
|
><P
|
|
></P
|
|
><DIV
|
|
CLASS="variablelist"
|
|
><DL
|
|
><DT
|
|
>mush</DT
|
|
><DD
|
|
><P
|
|
>mail user's shell, very powerful for filtering andbatch processing</P
|
|
></DD
|
|
><DT
|
|
>mh</DT
|
|
><DD
|
|
><P
|
|
>mail handler, yet another mail user agent</P
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
><P
|
|
>I don't know enough about mh or mush to describe them in detail.
|
|
They both have rather complex interfaces and are designed for
|
|
sophisticated mail users.</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><HR><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="advanced"
|
|
></A
|
|
>3. Advanced topics</H1
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="aliases"
|
|
></A
|
|
>3.1. Aliases</H2
|
|
><P
|
|
>An `alias' is a way to set up a pseudo-address that simply directs
|
|
mail to another (single) address. There are two kinds of aliases:
|
|
MUA aliases and MTA aliases.</P
|
|
><P
|
|
>An MUA alias is one you set up in your MUA as a kind of personal
|
|
shorthand. Other people will not be able to see or use this alias.
|
|
For example, you could write:</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="programlisting"
|
|
> alias esr Eric S. Raymond <esr@thyrsus.com>
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>in your mutt configuration file. This would tell mutt that when it
|
|
sees `esr' in an address line, it should behave as through you had
|
|
typed `esr@thyrsus.com', Or you can type `mutt esr' and the expanded
|
|
address will be automatically filled in on the `to' line.</P
|
|
><P
|
|
>An MTA alias is one your MTA expands; it will be usable by
|
|
everyone, both on your machine and remotely. To create MTA aliases
|
|
you must modify a system file, usually but not always
|
|
<TT
|
|
CLASS="filename"
|
|
>/etc/aliases</TT
|
|
> or
|
|
<TT
|
|
CLASS="filename"
|
|
>/etc/mail/aliases</TT
|
|
> (the location depends on your
|
|
MTA). It may be instructive for you to look at the the aliases on
|
|
your system; it should contain a number of standard aliases such as
|
|
`postmaster'.</P
|
|
><P
|
|
>Your MTA may also allow the target of an alias to be a filename, which
|
|
will be treated as a mailbox the mail is to be appended to (this is
|
|
useful for archiving mail). It may also allow the target of an alias
|
|
to be a program, in which case mail to that alias will be passed to
|
|
an instance of the program on its standard input.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="forwarding"
|
|
></A
|
|
>3.2. Forwarding</H2
|
|
><P
|
|
>MTA aliases usually require administrator privileges to set up. But
|
|
it is desirable for mail users to be able to set up forwarding of
|
|
their own mail without administrator intervention.</P
|
|
><P
|
|
>To support this, most MTAs follow sendmail's lead and look for a file
|
|
called
|
|
<TT
|
|
CLASS="filename"
|
|
>.forward</TT
|
|
>
|
|
in your home directory. The contents of this file is interpreted like the
|
|
target of an alias which should receive all your mail; it should be a
|
|
single address. The most common use for this facility is to redirect your
|
|
mail to an account on another machine.</P
|
|
><P
|
|
>To amplify: The existence of the .forward file, regardless of whats
|
|
in it, tells the system to treat the contents of the file as an alias
|
|
target for all your mail. If you create an empty .forward file, your mail
|
|
disappears. Most people use this to forward their mail to another machine,
|
|
so most often there is just one email address in the first line, and
|
|
nothing else. The MTA will honor whatever is on the first line of your
|
|
.forward file as the target of an alias. Everything else is ignored. If the
|
|
target is misformatted, just like any other alias, then the mail
|
|
disappears.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="autoreply"
|
|
></A
|
|
>3.3. Auto-replying</H2
|
|
><P
|
|
>Another common use for the <TT
|
|
CLASS="filename"
|
|
>.forward</TT
|
|
>
|
|
facility is to pass your mail to a `vacation' program. A vacation
|
|
program reads incoming mail and automatically generates a canned reply
|
|
to it; they are so called because the most common form of canned reply
|
|
is to inform the sender that you are on vacation and will not be
|
|
reachable until a given date.</P
|
|
><P
|
|
>There is no one standard vacation program that is in universal use.
|
|
There are two good reasons for this: one, that such a program is
|
|
very easy to write as a shellscript or filter rule (see below); and
|
|
two, that vacation programs interact badly with mailing lists.</P
|
|
><P
|
|
>You should temporarily unsubscribe from all mailing lists you are on
|
|
before setting up auto-answering; otherwise, all members of the
|
|
mailing lists mail find they are being flooded with canned messages
|
|
by your vacation program. This is considered very rude behavior
|
|
and will guarantee you quite a frosty reception on your return.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="lists"
|
|
></A
|
|
>3.4. Mailing lists</H2
|
|
><P
|
|
>A mailing list is a pseudo-address that sends mail to more than
|
|
one user.</P
|
|
><P
|
|
>In its simplest form, mailing list is just an MTA alias with more than
|
|
one recipient. Some small mailing lists are maintained this way.
|
|
Sendmail assists by supporting a syntax in <TT
|
|
CLASS="filename"
|
|
>/etc/aliases</TT
|
|
>
|
|
that includes the contents of a given mailing list file in the target
|
|
side of an alias. It looks like this:</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="programlisting"
|
|
> admin-list: ":include:/usr/home/admin/admin-list"
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>with the advantage that the admin-list file can live in
|
|
unprivileged-user space somewhere (root is only needed to set
|
|
up the original inclusion). Some other MTAs have similar features.</P
|
|
><P
|
|
>These simple lists are commonly called `mail
|
|
reflectors'.
|
|
There are a couple of problems with mail reflectors. One is that
|
|
bounce messages from failed attempts to broadcast goes to all users.
|
|
Another is that all subscriptions and unsubscriptions have to be done
|
|
manually by the mailing list administrator.</P
|
|
><P
|
|
>A kind of software called a mailing list
|
|
manager
|
|
has evolved to address these problems and other related ones. Its
|
|
most important function is to permit mailing list users to subscribe
|
|
and unscubscribe without going through the list maintainer.</P
|
|
><P
|
|
>A mailing-list manager keeps its own user-list information and
|
|
hooks up to the MTA through a program alias in
|
|
<TT
|
|
CLASS="filename"
|
|
>/etc/aliases</TT
|
|
>. For example, if the admin-list
|
|
above were going through the mailing list manager called SmartList on
|
|
a sendmail system, a portion of <TT
|
|
CLASS="filename"
|
|
>/etc/aliases</TT
|
|
>
|
|
might look like this:</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="programlisting"
|
|
> admin-list: "|/usr/home/smartlist/bin/flist admin-list"
|
|
admin-list-request: "|/usr/home/smartlist/bin/flist admin-list-request"
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>Note that this is a pair of aliases. It is conventional for
|
|
real mailing lists to have a request
|
|
address to be
|
|
used for user subscription and unsubscription requests. It is
|
|
considered rude and ignorant to send subscription/unsubscription
|
|
requests to the main address of such a list -- don't do it.</P
|
|
><P
|
|
>The robot sitting behind the request address may offer other features
|
|
besides just subscription/unsubscription. It may respond to help
|
|
requests, allow you to query who is on the list, or give you automated
|
|
access to list archives. It may also allow list administrators to
|
|
restrict posting to known members, set the list to auto-subscribe
|
|
nonmembers when they first post, or set various security policy
|
|
options. Mailing-list managers differ primarily in the design and
|
|
range of these secondary features.</P
|
|
><P
|
|
>Unfortunately, the format for sending commands to mailing-list request
|
|
robots is not standard. Some expect commands in the subject line,
|
|
some ignore the subject line and expect commands in the message body.
|
|
You need to pay attention to the response mail you get when you first
|
|
subscribe; it's a good idea to save such mail to a subscriptions
|
|
mailbox for later reference.</P
|
|
><P
|
|
>The most important mailing-list managers to know about are majordomo,
|
|
listserv, listproc, and smartlist; majordomo is the most popular by a
|
|
considerable margin. Recently, <A
|
|
HREF="http://www.gnu.org/software/mailman/mailman.html"
|
|
TARGET="_top"
|
|
>mailman</A
|
|
>, a
|
|
list manager with a rather nice Web-based signon/signoff/administration
|
|
interface, has become very popular and may be in the pricess of obsolescing
|
|
the older programs. There is a rather comprehensive <A
|
|
HREF="http://www.catalog.com/vivian/mailing-list-software.html"
|
|
TARGET="_top"
|
|
>list</A
|
|
>
|
|
of such packages on the Web.</P
|
|
><P
|
|
>For more about mailing list managers, consult the resources at
|
|
the <A
|
|
HREF="http://www.greatcircle.com/list-managers/"
|
|
TARGET="_top"
|
|
>List-Managers Mailing
|
|
List</A
|
|
>, including the FAQ (note: this list is
|
|
<EM
|
|
>not</EM
|
|
> appropriate for how-to questions).</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="filters"
|
|
></A
|
|
>3.5. Mail filters</H2
|
|
><P
|
|
>A mail filter is a program that sits between your local
|
|
delivery agent and you, automatically dispatching or rejecting mail
|
|
before you see it.</P
|
|
><P
|
|
>Mail filters have a number of uses. The most important are spam
|
|
filtering, dispatching to multiple mailboxes by topic or sender, and
|
|
auto-answering mail.</P
|
|
><P
|
|
>Typically, you set up mail filtering by putting a program alias
|
|
for the filter program in your .forward file, and writing a file of
|
|
filtering rules. The format and location of the filter rules file
|
|
varies between filter programs.</P
|
|
><P
|
|
>There are good feature summaries of the three major mail filters
|
|
(procmail, mailagent, and deliver) in <A
|
|
HREF="http://www.faqs.org/faqs/mail/setup/unix/part3/index.html"
|
|
TARGET="_top"
|
|
>part
|
|
3</A
|
|
> of Chris Lewis's Email Software Survey. The most popular of
|
|
these is (despite its rather nasty rule syntax) procmail, which is
|
|
universally present on Linux systems (and, indeed, is generally used
|
|
as the system's local delivery agent).</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="spam"
|
|
></A
|
|
>3.6. Coping with spam</H2
|
|
><P
|
|
>Spam is sometimes known as `UCE' (Unsolicited Commercial Email)
|
|
or `UBE' (Unsolicited Bulk Email). As these names imply, it is an
|
|
obnoxious form of advertising that stuffs your mailbox with form
|
|
letters. (The term `spam' comes from a Monty Python's Flying Circus
|
|
skit in which a choir of Vikings endlessly repeats the chant "Spam
|
|
spam spam spam...").</P
|
|
><P
|
|
>Most spam seems to consist of solicitations for pyramid schemes,
|
|
ads for pornography, or (annoyingly) attempts to sell spam-sending
|
|
programs. A few individual spams (like MAKE MONEY FAST or the Craig
|
|
Shergold postcard hoax) have been so persistent as to become
|
|
legendary. Spam tends to be both verbose and illiterate. It's a
|
|
waste of time and a huge waste of network bandwidth.</P
|
|
><P
|
|
>If you're being deluged with spam, get educated. Browse the <A
|
|
HREF="http://spam.abuse.net/"
|
|
TARGET="_top"
|
|
>Fight Spam on the Internet!</A
|
|
> page. The
|
|
<A
|
|
HREF="http://www.mindworkshop.com/alchemy/nospam.html"
|
|
TARGET="_top"
|
|
>Death To
|
|
Spam!</A
|
|
> page is particularly effective on methods for stopping or
|
|
backtracking spam.</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><HR><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="resources"
|
|
></A
|
|
>4. Other sources of information</H1
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="usenet"
|
|
></A
|
|
>4.1. USENET</H2
|
|
><P
|
|
>There are a number of Usenet groups devoted to electronic-mail
|
|
technical issues:</P
|
|
><P
|
|
></P
|
|
><DIV
|
|
CLASS="variablelist"
|
|
><DL
|
|
><DT
|
|
><A
|
|
HREF="news:comp.mail.elm"
|
|
TARGET="_top"
|
|
>comp.mail.elm</A
|
|
></DT
|
|
><DD
|
|
><P
|
|
>the ELM mail system.</P
|
|
></DD
|
|
><DT
|
|
><A
|
|
HREF="news:comp.mail.mh"
|
|
TARGET="_top"
|
|
>comp.mail.mh</A
|
|
></DT
|
|
><DD
|
|
><P
|
|
>The Rand Message Handling system.</P
|
|
></DD
|
|
><DT
|
|
><A
|
|
HREF="news:comp.mail.mime"
|
|
TARGET="_top"
|
|
>comp.mail.mime</A
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Multipurpose Internet Mail Extensions.</P
|
|
></DD
|
|
><DT
|
|
><A
|
|
HREF="news:comp.mail.misc"
|
|
TARGET="_top"
|
|
>comp.mail.misc</A
|
|
></DT
|
|
><DD
|
|
><P
|
|
>General discussions about computer mail.</P
|
|
></DD
|
|
><DT
|
|
><A
|
|
HREF="news:comp.mail.multi-media"
|
|
TARGET="_top"
|
|
>comp.mail.multi-media</A
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Multimedia Mail.</P
|
|
></DD
|
|
><DT
|
|
><A
|
|
HREF="news:comp.mail.mush"
|
|
TARGET="_top"
|
|
>comp.mail.mush</A
|
|
></DT
|
|
><DD
|
|
><P
|
|
>The Mail User's Shell (MUSH).</P
|
|
></DD
|
|
><DT
|
|
><A
|
|
HREF="news:comp.mail.sendmail"
|
|
TARGET="_top"
|
|
>comp.mail.sendmail</A
|
|
></DT
|
|
><DD
|
|
><P
|
|
>the BSD sendmail agent.</P
|
|
></DD
|
|
><DT
|
|
><A
|
|
HREF="news:comp.mail.smail"
|
|
TARGET="_top"
|
|
>comp.mail.smail</A
|
|
></DT
|
|
><DD
|
|
><P
|
|
>the smail mail agent.</P
|
|
></DD
|
|
><DT
|
|
><A
|
|
HREF="news:comp.mail.uucp"
|
|
TARGET="_top"
|
|
>comp.mail.uucp</A
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Mail in the uucp environment.</P
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="books"
|
|
></A
|
|
>4.2. Books</H2
|
|
><P
|
|
>The following is a non-inclusive set of books that will help...</P
|
|
><P
|
|
></P
|
|
><DIV
|
|
CLASS="variablelist"
|
|
><DL
|
|
><DT
|
|
>Sendmail</DT
|
|
><DD
|
|
><P
|
|
>from O'Reilly and Associates is
|
|
the definitive reference on sendmail-v8 and sendmail+IDA. It's a
|
|
``must have'' for anybody hoping to make sense out of sendmail without
|
|
bleeding in the process.</P
|
|
></DD
|
|
><DT
|
|
>The Internet Complete Reference</DT
|
|
><DD
|
|
><P
|
|
>from Osborne is a fine reference book that explains the
|
|
various services available on Internet and is a great source for
|
|
information on news, mail, and various other Internet
|
|
resources.</P
|
|
></DD
|
|
><DT
|
|
>The Linux Networking Administrators' Guide</DT
|
|
><DD
|
|
><P
|
|
>from Olaf Kirch of the LDP is available on the net and is
|
|
also published by (at least) O'Reilly and SSC. It makes a fine
|
|
one-stop shopping guide to learn about everything you ever imagined
|
|
you'd need to know about Unix networking.</P
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="periodic"
|
|
></A
|
|
>4.3. Periodic USENET Postings</H2
|
|
><P
|
|
>Also worth mentioning is Chris Lewis' periodic posting on unix
|
|
e-mail software, which is available on <A
|
|
HREF="ftp://rtfm.mit.edu/pub/usenet/comp.mail.misc"
|
|
TARGET="_top"
|
|
>ftp://rtfm.mit.edu/pub/usenet/comp.mail.misc</A
|
|
>
|
|
as the files named ``UNIX_Email_Software_Survey_*''. An HTMLized
|
|
version is at <A
|
|
HREF="http://www.faqs.org/faqs/mail/setup/unix/"
|
|
TARGET="_top"
|
|
>http://www.faqs.org/faqs/mail/setup/unix/</A
|
|
>.
|
|
At time of writing in 2005 this posting has not been seriously updated
|
|
since 2000, however.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="dontgo"
|
|
></A
|
|
>4.4. Where <EM
|
|
>not</EM
|
|
> to look for help</H2
|
|
><P
|
|
>There is no longer anything special about configuring and
|
|
running mail under Linux, relative to other Unixes. Accordingly, you
|
|
almost certainly do <EM
|
|
>not</EM
|
|
> want to be posting
|
|
generic mail-related questions to the comp.os.linux.*
|
|
newsgroups.</P
|
|
><P
|
|
>Unless your posting is truly Linux-specific (ie, ``please tell
|
|
me what routers are already compiled into the SLS1.03 version of
|
|
smail3.1.28'') you should be asking your questions in one of the
|
|
newsgroups or mailing lists referenced above.</P
|
|
><P
|
|
>Let me repeat that....</P
|
|
><P
|
|
>There is virtually no reason to post anything mail-related in the
|
|
comp.os.linux hierarchy any more. There are existing newsgroups in the
|
|
comp.mail.* hierarchy to handle <EM
|
|
>all</EM
|
|
> your questions.</P
|
|
><P
|
|
><EM
|
|
>If you post to comp.os.linux.* for non-Linux-specific questions,
|
|
you are looking in the wrong place for help. The electronic mail
|
|
experts hang out in the places indicated above and generally not in
|
|
the Linux groups.</EM
|
|
></P
|
|
><P
|
|
><EM
|
|
> Posting to the Linux hierarchy for non-linux-specific
|
|
questions wastes your time and everybody else's...and it frequently
|
|
delays you from getting the answer to your question.</EM
|
|
></P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><HR><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="administrivia"
|
|
></A
|
|
>5. Administrivia</H1
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="AEN276"
|
|
></A
|
|
>5.1. Feedback</H2
|
|
><P
|
|
>(Vince wrote this section, but my policy is the same.)</P
|
|
><P
|
|
>I am interested in any feedback, positive or negative, regarding
|
|
the content of this document via e-mail. Definitely contact me if you
|
|
find errors or obvious omissions.</P
|
|
><P
|
|
>I read, but do not necessarily respond to, all e-mail I receive.
|
|
Requests for enhancements will be considered and acted upon based on
|
|
that day's combination of available time, merit of the request, and
|
|
daily blood pressure :-)</P
|
|
><P
|
|
>Flames will quietly go to /dev/null so don't bother.</P
|
|
><P
|
|
>In particular, the Linux filesystem standard for pathnames is an evolving
|
|
thing. What's in this document is there for illustration only based on the
|
|
current standard at the time that part of the document was written and in
|
|
the paths used in the distributions or `kits' I've personally seen. Please
|
|
consult your particular Linux distribution(s) for the paths they use.</P
|
|
><P
|
|
>Feedback concerning the actual format of the document should go
|
|
to the HOWTO coordinator - mail to <A
|
|
HREF="mailto:linux-howto@metalab.unc.edu"
|
|
TARGET="_top"
|
|
>linux-howto@metalab.unc.edu</A
|
|
>).
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="copyright"
|
|
></A
|
|
>5.2. Copyright Information</H2
|
|
><P
|
|
>The Mail-User-HOWTO is copyrighted (c)1999 Eric S. Raymond.
|
|
Copyright is retained for the purpose of enforcing the Linux
|
|
Documentation Project license terms.</P
|
|
><P
|
|
>A verbatim copy may be reproduced or distributed in any medium
|
|
physical or electronic without permission of the author. Translations
|
|
are similarly permitted without express permission if it includes a
|
|
notice on who translated it.</P
|
|
><P
|
|
>Short quotes may be used without prior consent by the author.
|
|
Derivative work and partial distributions of the Mail-HOWTO must be
|
|
accompanied with either a verbatim copy of this file or a pointer to
|
|
the verbatim copy.</P
|
|
><P
|
|
>Commercial redistribution is allowed and encouraged; however,
|
|
the maintainer would appreciate being notified of any such
|
|
distributions (as a courtesy).</P
|
|
><P
|
|
>In short, we wish to promote dissemination of this information
|
|
through as many channels as possible. However, we do wish to retain
|
|
copyright on the HOWTO documents.</P
|
|
><P
|
|
>We further want that <EM
|
|
>all</EM
|
|
> information
|
|
provided in the HOWTOS is disseminated. If you have questions, please
|
|
contact the Linux HOWTO coordinator, at
|
|
<TT
|
|
CLASS="email"
|
|
><<A
|
|
HREF="mailto:linux-howto@metalab.unc.edu"
|
|
>linux-howto@metalab.unc.edu</A
|
|
>></TT
|
|
>.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="disclaimer"
|
|
></A
|
|
>5.3. Standard Disclaimer</H2
|
|
><P
|
|
>Of course, we disavow any potential liability for the contents of this
|
|
document. Use of the concepts, examples, and/or other content of this
|
|
document is entirely at your own risk.</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="acknowledgements"
|
|
></A
|
|
>5.4. Acknowledgements</H2
|
|
><P
|
|
>This was originally authored by Vince Skahan. I have rewritten
|
|
it for the modern ISP-centric world in which UUCP is little more than
|
|
a memory.</P
|
|
><P
|
|
>In May 1999, the name was changed from "The Linux Electronic
|
|
Mail HOWTO" to avoid a collision with Guylhem Aznar's Mail HOWTO,
|
|
which will become the Mail Administrator HOWTO.</P
|
|
></DIV
|
|
></DIV
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |