old-www/HOWTO/Mail-User-HOWTO/mua.html

424 lines
8.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Mail User Agents</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="The Linux Mail User HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Introduction"
HREF="introduction.html"><LINK
REL="NEXT"
TITLE="Advanced topics"
HREF="advanced.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux Mail User HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="introduction.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="advanced.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><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"
><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"
>&#13;(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"
><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"
><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"
><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"
><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"
><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="mua.html#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"
>&#13;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"
><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"
><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="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="introduction.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="advanced.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Introduction</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Advanced topics</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>