Another tutorial goes Docbook.
Add the standard header and footer graphics/links to HTML generated from Docbook.
This commit is contained in:
parent
c3f730b5ab
commit
e7838ea273
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=1068
11 changed files with 2129 additions and 594 deletions
en/tutorials
en_US.ISO8859-1/articles/mh
en_US.ISO_8859-1
|
@ -2,7 +2,6 @@
|
|||
<a href="../../"><img src="../../gifs/home.gif" alt="FreeBSD Home Page"
|
||||
border="0" align="right"></a>
|
||||
<address>
|
||||
<a href="../../mailto.html">www@freebsd.org</a><br>
|
||||
@@UPDATE@@
|
||||
<a href="../../mailto.html">www@freebsd.org</a>
|
||||
</address>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" [
|
||||
<!ENTITY base CDATA "..">
|
||||
<!ENTITY date "$Date: 1997-01-19 15:29:57 $">
|
||||
<!ENTITY date "$Date: 1997-01-19 21:30:13 $">
|
||||
<!ENTITY title "FreeBSD Tutorials">
|
||||
<!ENTITY % includes SYSTEM "../includes.sgml"> %includes;
|
||||
]>
|
||||
|
@ -15,9 +15,8 @@
|
|||
<ul>
|
||||
<li><a href="newuser/newuser.html">For People New to Both FreeBSD
|
||||
<em>and</em> Unix</a></li>
|
||||
<li><a href="mh/mh.html">An introduction to the MH mail software</a>
|
||||
(<a href="mh/mh.ps">postscript</a>,
|
||||
<a href="mh/mh-html.tar.gz">gzipd tar file</a>)</li>
|
||||
|
||||
<li><a href="mh/mh.html">An introduction to the MH mail software</a></li>
|
||||
|
||||
<li><a href="devel/devel.html">A User's Guide to FreeBSD Programming
|
||||
Tools</a></li>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
DOC= mh
|
||||
SRCS= mh.sgml
|
||||
DOCS= mh.docb
|
||||
INDEXLINK= mh.html
|
||||
|
||||
.include <bsd.sgml.mk>
|
||||
.include "../../web.mk"
|
||||
|
||||
|
|
704
en/tutorials/mh/mh.docb
Normal file
704
en/tutorials/mh/mh.docb
Normal file
|
@ -0,0 +1,704 @@
|
|||
<!-- $FreeBSD$ -->
|
||||
<!-- FreeBSD Documentation Project -->
|
||||
|
||||
<!DOCTYPE BOOK PUBLIC "-//Davenport//DTD DocBook V3.0//EN">
|
||||
<book>
|
||||
|
||||
<bookinfo>
|
||||
<bookbiblio>
|
||||
<title>An MH Primer</title>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Matt</firstname>
|
||||
<surname>Midboe</surname>
|
||||
<affiliation>
|
||||
<address>
|
||||
<email>matt@garply.com</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author></authorgroup>
|
||||
|
||||
<pubdate>v1.0, 16 January 1996</pubdate>
|
||||
|
||||
<abstract><para>This document contains an introduction to using MH on
|
||||
FreeBSD</para></abstract>
|
||||
|
||||
</bookbiblio>
|
||||
</bookinfo>
|
||||
|
||||
<chapter id="mhintro">
|
||||
<title>Introduction</title>
|
||||
|
||||
<para>MH started back in 1977 at the RAND Corporation, where the
|
||||
initial philosophies behind MH were developed. MH isn't so much a
|
||||
monolithic email program but a philosophy about how best to develop
|
||||
tools for reading email. The MH developers have done a great job
|
||||
adhering to the <acronym>KISS</> principle: Keep It Simple Stupid.
|
||||
Rather than have one large program for reading, sending and handling
|
||||
email they have written specialized programs for each part of your
|
||||
email life. One might liken MH to the specialization that one finds
|
||||
in insects and nature. Each tool in MH does one thing, and does it
|
||||
very well.</para>
|
||||
|
||||
<para>Beyond just the various tools that one uses to handle their
|
||||
email MH has done an excellent job keeping the configuration of each
|
||||
of these tools consistent and uniform. In fact, if you are not quite
|
||||
sure how something is supposed to work or what the arguments for some
|
||||
command are supposed to be then you can generally guess and be right.
|
||||
Each MH command is consistent about how it handles reading the
|
||||
configuration files and how it takes arguments on the command line.
|
||||
One useful thing to remember is that you can always add a
|
||||
<option>-help</option> to the command to have it display the options
|
||||
for that command.</para>
|
||||
|
||||
<para>The first thing that you need to do is to make sure that you have
|
||||
installed the MH package on your FreeBSD machine. If you installed
|
||||
from CDROM you should be able to execute the following to load mh:
|
||||
<informalexample>
|
||||
<screen># <userinput>pkg_add /cdrom/packages/mh-6.8.3.tgz</></screen>
|
||||
</informalexample>
|
||||
You will notice that it created a <filename>/usr/local/lib/mh</>
|
||||
directory for you as well as adding several binaries to the
|
||||
<filename>/usr/local/bin</> directory. If you would prefer to compile
|
||||
it yourself then you can anonymous ftp it from <ulink
|
||||
URL="ftp://ftp.ics.uci.edu/">ftp.ics.uci.edu</ulink> or <ulink
|
||||
URL="ftp://louie.udel.edu/">louie.udel.edu</ulink>.</para>
|
||||
|
||||
<para>This primer is not a full comprehensive explanation of how MH
|
||||
works. This is just intended to get you started on the road to
|
||||
happier, faster mail reading. You should read the man pages for the
|
||||
various commands. Also you might want to read the <ulink
|
||||
URL="news:comp.mail.mh">comp.mail.mh</ulink> newsgroup. Also you can
|
||||
read the <ulink
|
||||
URL="http://www.cis.ohio-state.edu/hypertext/faq/usenet/mh-faq/part1/faq.html">FAQ
|
||||
for MH</ulink>. The best resource for MH is the O'Reilly and Associates book
|
||||
written by Jerry Peek.</para>
|
||||
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Reading Mail</title>
|
||||
|
||||
<para>This section covers how to use <command>inc</>,
|
||||
<command>show</>, <command>scan</>, <command>next</>,
|
||||
<command>prev</>, <command>rmm</>, <command>rmf</>, and
|
||||
<command>msgchk</>. One of the best things about MH is the
|
||||
consistent interface between programs. A few things to keep in mind
|
||||
when using these commands is how to specify message lists. In the
|
||||
case of <command>inc</> this doesn't really make any sense but with
|
||||
commands like <command>show</> it is useful to know. </para>
|
||||
|
||||
<para>A message list can consist of something like <parameter>23 20
|
||||
16</> which will act on messages 23, 20 and 16. This is fairly simple
|
||||
but you can do more useful things like <parameter>23-30</> which will
|
||||
act on all the messages between 23 and 30. You can also specify
|
||||
something like <parameter>cur:10</> which will act on the current
|
||||
message and the next 9 messages. The <parameter>cur</>,
|
||||
<parameter>last</>, and <parameter>first</> messages are special
|
||||
messages that refer to the current, last or first message in the
|
||||
folder.</para>
|
||||
|
||||
|
||||
<sect1 id="inc">
|
||||
<title><command>inc</>, <command>msgchk</>—read in your new email or check it</title>
|
||||
|
||||
<para>If you just type in <userinput>inc</> and hit <keycap>return</>
|
||||
you will be well on your way to getting started with MH. The first
|
||||
time you run <command>inc</> it will setup your account to use all
|
||||
the MH defaults and ask you about creating a Mail directory. If you
|
||||
have mail waiting to be downloaded you will see something that looks
|
||||
like:
|
||||
<informalexample>
|
||||
<screen> 29 01/15 Doug White Re: Another Failed to boot problem<<On Mon, 15 J
|
||||
30 01/16 "Jordan K. Hubbar Re: FBSD 2.1<<> Do you want a library instead of
|
||||
31 01/16 Bruce Evans Re: location of bad144 table<<>> >It would appea
|
||||
32 01/16 "Jordan K. Hubbar Re: video is up<<> Anyway, mrouted won't run, ev
|
||||
33 01/16 Michael Smith Re: FBSD 2.1<<Nate Williams stands accused of sa</screen>
|
||||
</informalexample>
|
||||
This is the same thing you will see from a <command>scan</> (see
|
||||
<xref linkend="scan">). If you just run <command>inc</> with no
|
||||
arguments it will look on your computer for email that is supposed to
|
||||
be coming to you.</para>
|
||||
|
||||
<para>A lot of people like to use POP for grabbing their email. MH can do
|
||||
POP to grab your email. You will need to give <command>inc</> a few command
|
||||
line arguments.
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>inc -host mail.pop.org -user <replaceable>username</> -norpop</></screen>
|
||||
</informalexample>
|
||||
That tells <command>inc</> to go to <parameter>mail.pop.org</> to
|
||||
download your email, and that your username on their system is
|
||||
<replaceable>username</>. The <option>-norpop</option> option tells
|
||||
<command>inc</> to use plain POP3 for downloading your email. MH has
|
||||
support for a few different dialects of POP. More than likely you
|
||||
will never ever need to use them though. While you can do more
|
||||
complex things with inc such as audit files and scan format files
|
||||
this will get you going.</para>
|
||||
|
||||
<para>The <command>msgchk</> command is used to get information on
|
||||
whether or not you have new email. <command>msgchk</> takes the same
|
||||
<option>-host</option> and <option>-user</option> options that
|
||||
<command>inc</> takes.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="show">
|
||||
<title><command>show</>, <command>next</> and <command>prev</>—displaying and moving through email</title>
|
||||
|
||||
<para><command>show</> is to show a letter in your current folder.
|
||||
Like <command>inc</>, <command>show</> is a fairly straightforward
|
||||
command. If you just type <userinput>show</> and hit <keycap>return</>
|
||||
then it displays the current message. You can also give specific
|
||||
message numbers to show:
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>show 32 45 56</></screen>
|
||||
</informalexample>
|
||||
This would display message numbers 32, 45 and 56 right after each
|
||||
other. Unless you change the default behavior <command>show</>
|
||||
basically just does a <command>more</> on the email message.</para>
|
||||
|
||||
<para><command>next</> is used to move onto the next message and
|
||||
<command>prev</> will go to the previous message. Both commands have
|
||||
an implied <command>show</> command so that when you go to the next
|
||||
message it automatically displays it.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="scan">
|
||||
<title><command>scan</>—shows you a scan of your messages</title>
|
||||
|
||||
<para><command>scan</> will display a brief listing of the messages
|
||||
in your current folder. This is an example of what the
|
||||
<command>scan</> command will give you.
|
||||
<informalexample>
|
||||
<screen> 30+ 01/16 "Jordan K. Hubbar Re: FBSD 2.1<<> Do you want a library instead of
|
||||
31 01/16 Bruce Evans Re: location of bad144 table<<>> >It would appea
|
||||
32 01/16 "Jordan K. Hubbar Re: video is up<<> Anyway, mrouted won't run, ev
|
||||
33 01/16 Michael Smith Re: FBSD 2.1<<Nate Williams stands accused of sa</screen>
|
||||
</informalexample>
|
||||
Like just about everything in MH this display is very configurable.
|
||||
This is the typical default display. It gives you the message number,
|
||||
the date on the email, the sender, the subject line, and a sentence
|
||||
fragment from the very beginning of the email if it can fit it. The
|
||||
<literal>+</> means that message is the current message, so if you do
|
||||
a <command>show</> it will display that message.</para>
|
||||
|
||||
<para>One useful option for scan is the <option>-reverse</option>
|
||||
option. This will list your messages with the highest message number
|
||||
first and lowest message number last. Another useful option with
|
||||
<command>scan</> is to have it read from a file. If you want to scan
|
||||
your incoming mailbox on FreeBSD without having to <command>inc</> it
|
||||
you can do <command>scan -file
|
||||
/var/mail/<replaceable>username</></command>. This can be used with
|
||||
any file that is in the <database>mbox</> format.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="rmm">
|
||||
<title><command>rmm</> and <command>rmf</>—remove the current message or folder</title>
|
||||
|
||||
<para><command>rmm</> is used to remove a mail message. The default
|
||||
is typically to not actually remove the message but to rename the
|
||||
file to one that is ignored by the MH commands. You will need to
|
||||
through periodically and physically delete the <quote>removed</>
|
||||
messages.</para>
|
||||
|
||||
<para>The <command>rmf</> command is used to remove folders. This
|
||||
doesn't just rename the files but actually removes the from the hard
|
||||
drive so you should be careful when you use this command.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="samplereading">
|
||||
<title>A typical session of reading with MH</title>
|
||||
|
||||
<para>The first thing that you will want to do is <command>inc</>
|
||||
your new mail. So at a shell prompt just type in <command>inc</> and
|
||||
hit <keycap>return</>.
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>inc</>
|
||||
Incorporating new mail into inbox...
|
||||
|
||||
36+ 01/19 "Stephen L. Lange Request...<<Please remove me as contact for pind
|
||||
37 01/19 Matt Thomas Re: kern/950: Two PCI bridge chips fail (multipl
|
||||
38 01/19 "Amancio Hasty Jr Re: FreeBSD and VAT<<>>> Bill Fenner said: > In
|
||||
tempest%</screen>
|
||||
</informalexample>
|
||||
This shows you the new email that has been added to your mailbox. So
|
||||
the next thing to do is <command>show</> the email and move around.
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>show</>
|
||||
Received: by sashimi.wwa.com (Smail3.1.29.1 #2)
|
||||
id m0tdMZ2-001W2UC; Fri, 19 Jan 96 13:33 CST
|
||||
Date: Fri, 19 Jan 1996 13:33:31 -0600 (CST)
|
||||
From: "Stephen L. Lange" <stvlange@wwa.com>
|
||||
To: matt@garply.com
|
||||
Subject: Request...
|
||||
Message-Id: <Pine.BSD.3.91.960119133211.824A-100000@sashimi.wwa.com>
|
||||
Mime-Version: 1.0
|
||||
Content-Type: TEXT/PLAIN; charset=US-ASCII
|
||||
|
||||
|
||||
Please remove me as contact for pindat.com
|
||||
|
||||
tempest% <userinput>rmm</>
|
||||
tempest% <userinput>next</>
|
||||
Received: from localhost (localhost [127.0.0.1]) by whydos.lkg.dec.com (8.6.11/8
|
||||
.6.9) with SMTP id RAA24416; Fri, 19 Jan 1996 17:56:48 GMT
|
||||
Message-Id: <199601191756.RAA24416@whydos.lkg.dec.com>
|
||||
X-Authentication-Warning: whydos.lkg.dec.com: Host localhost didn't use HELO pro
|
||||
tocol
|
||||
To: hsu@clinet.fi
|
||||
Cc: hackers@FreeBSD.org
|
||||
Subject: Re: kern/950: Two PCI bridge chips fail (multiple multiport ethernet
|
||||
boards)
|
||||
In-Reply-To: Your message of "Fri, 19 Jan 1996 00:18:36 +0100."
|
||||
<199601182318.AA11772@Sysiphos>
|
||||
X-Mailer: exmh version 1.5omega 10/6/94
|
||||
Date: Fri, 19 Jan 1996 17:56:40 +0000
|
||||
From: Matt Thomas <matt@lkg.dec.com>
|
||||
Sender: owner-hackers@FreeBSD.org
|
||||
Precedence: bulk
|
||||
|
||||
|
||||
This is due to a typo in pcireg.h (to
|
||||
which I am probably the guilty party).</screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>The <command>rmm</> removed the current message and the
|
||||
<command>next</> command moved me on to the next message.
|
||||
Now if I wanted to look at ten most recent messages so I could read
|
||||
one of them here is what I would do:
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>scan last:10</>
|
||||
26 01/16 maddy Re: Testing some stuff<<yeah, well, Trinity has
|
||||
27 01/17 Automatic digest NET-HAPPENINGS Digest - 16 Jan 1996 to 17 Jan 19
|
||||
28 01/17 Evans A Criswell Re: Hey dude<<>From matt@tempest.garply.com Tue
|
||||
29 01/16 Karl Heuer need configure/make volunteers<<The FSF is looki
|
||||
30 01/18 Paul Stephanouk Re: [alt.religion.scientology] Raw Meat (humor)<
|
||||
31 01/18 Bill Lenherr Re: Linux NIS Solaris<<--- On Thu, 18 Jan 1996 1
|
||||
34 01/19 John Fieber Re: Stuff for the email section?<<On Fri, 19 Jan
|
||||
35 01/19 support@foo.garpl [garply.com #1138] parlor<<Hello. This is the Ne
|
||||
37+ 01/19 Matt Thomas Re: kern/950: Two PCI bridge chips fail (multipl
|
||||
38 01/19 "Amancio Hasty Jr Re: FreeBSD and VAT<<>>> Bill Fenner said: > In
|
||||
tempest%</screen>
|
||||
</informalexample>
|
||||
Then if I wanted to read message number 27 I would do a
|
||||
<userinput>show 27</> and it would be displayed. As you can probably
|
||||
tell from this sample session MH is pretty easy to use and looking
|
||||
through emails and displaying them is fairly intuitive and easy.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Folders and Mail Searching</title>
|
||||
|
||||
<para>Anybody who gets lots of email definitely wants to be able to
|
||||
prioritize, stamp, brief, de-brief, and number their emails in a
|
||||
variety of different ways. MH can do this better than just about
|
||||
anything. One thing that we haven't really talked about is the
|
||||
concept of folders. You have undoubtedly come across the folders
|
||||
concept using other email programs. MH has folders too. MH can even
|
||||
do sub-folders of a folder. One thing you should keep in mind with MH
|
||||
is that when you ran <command>inc</> for the first time and it asked
|
||||
you if it could create a <filename>Mail</> directory it began storing
|
||||
everything in that directory. If you look at that directory you will
|
||||
find a directory named <filename>inbox</>. The <filename>inbox</>
|
||||
directory houses all of your incoming mail that hasn't been thrown
|
||||
anywhere else.</para>
|
||||
|
||||
<para>Whenever you create a new folder a new directory is going to be
|
||||
created underneath your MH <filename>Mail</> directory, and messages
|
||||
in that folder are going to be stored in that directory. When new
|
||||
email comes in that new email is thrown into your <filename>inbox</>
|
||||
directory with a file name that is equivalent to the message number.
|
||||
So even if you didn't have any of the MH tools to read your email you
|
||||
could still use standard UNIX commands to munge around in those
|
||||
directories and just more your files. It's this simplicity that
|
||||
really gives you a lot of power with what you can do with your
|
||||
email.</para>
|
||||
|
||||
<para>Just as you can use message lists like <parameter>23 16 42</>
|
||||
with most MH commands there is a folder option you can specify with
|
||||
just about every MH command. If you do a <command>scan +freebsd</> it
|
||||
will scan your <filename>freebsd</> folder, and your current folder
|
||||
will be changed to <filename>freebsd</>. If you do a <command>show
|
||||
+freebsd 23 16 42</>, <command>show</> is going to switch to your
|
||||
<filename>freebsd</> folder and display messages 23, 16 and 42. So
|
||||
remember that <option>+<replaceable>folder</></> syntax. You will
|
||||
need to make sure you use it to make commands process different
|
||||
folders. Remember you default folder for mail is <filename>inbox</>
|
||||
so doing a <command>folder +inbox</> should always get you back to
|
||||
your mail. Of course, in MH's infinite flexibility this can be
|
||||
changed but most places have probably left it as
|
||||
<command>inbox</>.</para>
|
||||
|
||||
|
||||
<sect1>
|
||||
<title><command>pick</>—search email that matches certain criteria</title>
|
||||
|
||||
<para><command>pick</> is one of the more complex commands in the MH
|
||||
system. So you might want to read the
|
||||
<citerefentry><refentrytitle>pick</><manvolnum>1</></> man page for a
|
||||
more thorough understanding. At its simplest level you can do
|
||||
something like
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>pick -search pci</>
|
||||
15
|
||||
42
|
||||
55
|
||||
56
|
||||
57</screen>
|
||||
</informalexample>
|
||||
|
||||
This will tell <command>pick</> to look through every single line in
|
||||
every message in your current folder and tell you which message
|
||||
numbers it found the word <literal>pci</> in. You can then
|
||||
<command>show</> those messages and read them if you wish or
|
||||
<command>rmm</> them. You would have to specify something like
|
||||
<command>show 15 42 55-57</> to display them though. A slightly more
|
||||
useful thing to do is this:
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>pick -search pci -seq pick</>
|
||||
5 hits
|
||||
tempest% <userinput>show pick</></screen>
|
||||
</informalexample>
|
||||
This will show you the same messages you just didn't have to work as
|
||||
hard to do it. The <option>-seq</option> option is really an
|
||||
abbreviation of <option>-sequence</option> and <command>pick</> is
|
||||
just a sequence which contains the message numbers that matched. You
|
||||
can use sequences with just about any MH command. So you could have
|
||||
done an <command>rmm pick</> and all those messages would be removed
|
||||
instead. You sequence can be named anything. If you run pick again it
|
||||
will overwrite the old sequence if you use the same name.</para>
|
||||
|
||||
<para>Doing a <command>pick -search</command> can be a bit more time
|
||||
consuming than just searching for message from someone, or to
|
||||
someone. So <command>pick</> allows you to use the following
|
||||
predefined search criteria:
|
||||
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-to</option></term>
|
||||
<listitem>
|
||||
<para>search based upon who the message is to</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-cc</option></term>
|
||||
<listitem>
|
||||
<para>search based on who is in the cc list</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-from</option></term>
|
||||
<listitem>
|
||||
<para>search for who sent the message</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-subject</option></term>
|
||||
<listitem>
|
||||
<para>search for emails with this subject</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-date</option></term>
|
||||
<listitem>
|
||||
<para>find emails with a matching dat</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--<replaceable>component</replaceable></option></term>
|
||||
<listitem>
|
||||
<para>search for any other component in the header. (i.e.
|
||||
<option>--reply-to</> to find all emails with a certain reply-to in
|
||||
the header)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist></para>
|
||||
|
||||
<para>This allows you to do things like
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>pick -to freebsd-hackers@freebsd.org -seq hackers</></screen>
|
||||
</informalexample>
|
||||
to get a list of all the email send to the FreeBSD hackers mailing
|
||||
list. <command>pick</> also allows you to group these criteria in
|
||||
different ways using the following options:
|
||||
<itemizedlist>
|
||||
|
||||
<listitem>
|
||||
<para>… <option>-and</option> …</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>… <option>-or</option> &hellip</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><option>-not</option> …</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><option>-lbrace</option> … <option>-rbrace</option></para>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
These commands allow you to do things like
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>pick -to freebsd-hackers -and -cc freebsd-hackers</></screen>
|
||||
</informalexample>
|
||||
That will grab all the email in your inbox that was sent to
|
||||
freebsd-hackers or cc'd to that list. The brace options allow you to
|
||||
group search criteria together. This is sometimes very necessary as
|
||||
in the following example
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>pick -lbrace -to freebsd-hackers -and
|
||||
-not -cc freebsd-questions -rbrace -and -subject pci</></screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>Basically this says <quote>pick (to freebsd-hackers and not cc'd on
|
||||
freebsd-questions) and the subject is pci</quote>. It should look through your
|
||||
folder and find all messages sent to the freebsd-hackers list that
|
||||
aren't cc'd to the freebsd-questions list that contain something on
|
||||
pci in the subject line. Ordinarily you might have to worry about
|
||||
something called operator precedence. Remember in math how you
|
||||
evaluate from left to right and you do multiplication and division
|
||||
first and addition and subtraction second? MH has the same type of
|
||||
rules for <command>pick</>. It's fairly complex so you might want to study
|
||||
the man page. This document is just to help you get acquainted with
|
||||
MH.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title><command>folder</>, <command>folders</>, <command>refile</>—three useful programs for folder maintenance</title>
|
||||
|
||||
<para>There are three programs which are primarily just for
|
||||
manipulating your folders. The <command>folder</> program is used to
|
||||
switch between folders, pack them, and list them. At its simplest
|
||||
level you can do a <command>folder +<replaceable>newfolder</></> and
|
||||
you will be switched into <replaceable>newfolder</>. From there on
|
||||
out all your MH commands like <command>comp</>, <command>repl</>,
|
||||
<command>scan</>, and <command>show</> will act on that
|
||||
<command>newfolder</> folder.</para>
|
||||
|
||||
<para>Sometimes when you are reading and deleting messages you will
|
||||
develop <quote>holes</> in your folders. If you do a <command>scan</>
|
||||
you might just see messages 34, 35, 36, 43, 55, 56, 57, 80. If you do
|
||||
a <command>folder -pack</command> this will renumber all your
|
||||
messages so that there are no holes. It doesn't actually delete any
|
||||
messages though. So you may need to periodically go through and
|
||||
physically delete <command>rmm</>'d messages.</para>
|
||||
|
||||
<para>If you need statistics on your folders you can do a
|
||||
<command>folders</> or <command>folder -all</command> to list all
|
||||
your folders, how many messages they have, what the current message
|
||||
is in each one and so on. This line of stats it displays for all your
|
||||
folders is the same one you get when you change to a folder with
|
||||
<command>folder +foldername</>. A <command>folders</> command looks
|
||||
like this:
|
||||
<informalexample>
|
||||
<screen> Folder # of messages ( range ); cur msg (other files)
|
||||
announce has 1 message ( 1- 1).
|
||||
drafts has no messages.
|
||||
f-hackers has 43 messages ( 1- 43).
|
||||
f-questions has 16 messages ( 1- 16).
|
||||
inbox+ has 35 messages ( 1- 38); cur= 37.
|
||||
lists has 8 messages ( 1- 8).
|
||||
netfuture has 1 message ( 1- 1).
|
||||
out has 31 messages ( 1- 31).
|
||||
personal has 6 messages ( 1- 6).
|
||||
todo has 58 messages ( 1- 58); cur= 1.
|
||||
|
||||
TOTAL= 199 messages in 13 folders.
|
||||
</screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>The <command>refile</> command is what you use to move messages
|
||||
between folders. When you do something like <command>refile 23
|
||||
+netfuture</> message number 23 is moved into the
|
||||
<filename>netfuture</> folder. You could also do something like
|
||||
<command>refile 23 +netfuture/latest</> which would put message
|
||||
number 23 in a subfolder called <filename>latest</> under the
|
||||
<filename>netfuture</> folder. If you want to keep a message in the
|
||||
current folder and link it you can do a <command>refile -link 23
|
||||
+netfuture</command> which would keep 23 in your current
|
||||
<filename>inbox</> but also list in your <filename>netfuture</>
|
||||
folder. You are probably beginning to realize some of the really
|
||||
powerful things you can do with MH.</para>
|
||||
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Sending Mail</title>
|
||||
|
||||
<para>Email is a two way street for most people so you want to be
|
||||
able to send something back. The way MH handles sending mail can be a
|
||||
bit difficult to follow at first, but it allows for incredible
|
||||
flexibility. The first thing MH does is to copy a components file
|
||||
into your outgoing email. A components file is basically a skeleton
|
||||
email letter with stuff like the To: and Subject: headers already in
|
||||
it. You are then sent into your editor where you fill in the header
|
||||
information and then type the body of your message below the dashed
|
||||
lines in the message. Then to the <command>whatnow</> program. When
|
||||
you are at the <prompt>What now?</prompt> prompt you can tell it to
|
||||
<command>send</>, <command>list</>, <command>edit</>,
|
||||
<command>edit</>, <command>push</>, and <command>quit</>. Most of
|
||||
these commands are self-explanatory. So the message sending process
|
||||
involves copying a component file, editing your email, and then
|
||||
telling the <command>whatnow</> program what to do with your
|
||||
email.</para>
|
||||
|
||||
|
||||
<sect1>
|
||||
<title><command>comp</>, <command>forw</>, <command>reply</>—compose, forward or reply to a message to someone</title>
|
||||
|
||||
<para>The <command>comp</> program has a few useful command line
|
||||
options. The most important one to know right now is the
|
||||
<option>-editor</option> option. When MH is installed the default
|
||||
editor is usually a program called <command>prompter</> which comes
|
||||
with MH. It's not a very exciting editor and basically just gets the
|
||||
job done. So when you go to compose a message to someone you might
|
||||
want to use <command>comp -editor /usr/bin/vi/</> or <command>comp
|
||||
-editor /usr/local/bin/pico/</> instead. Once you have run
|
||||
<emphasis>comp</emphasis> you are in your editor and you see
|
||||
something that looks like this:
|
||||
<informalexample>
|
||||
<screen>To:
|
||||
cc:
|
||||
Subject:
|
||||
--------
|
||||
</screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>You need to put the person you are sending the mail to after the
|
||||
<literal>To:</> line. It works the same way for the other headers
|
||||
also, so you would need to put your subject after the
|
||||
<literal>Subject:</> line. Then you would just put the body of your
|
||||
message after the dashed lines. It may seem a bit simplistic since a
|
||||
lot of email programs have special requesters that ask you for this
|
||||
information but there really isn't any point to that. Plus this
|
||||
really gives you excellent flexibility.
|
||||
<informalexample>
|
||||
<screen>To:<userinput>freebsd-rave@freebsd.org</>
|
||||
cc:
|
||||
Subject:<userinput>And on the 8th day God created the FreeBSD core team</>
|
||||
--------
|
||||
<userinput>Wow this is an amazing operating system. Thanks!</></screen>
|
||||
</informalexample>
|
||||
You can now save this message and exit your editor. You will see the
|
||||
<prompt>What now?</> prompt and you can type in
|
||||
<userinput>send</> or <userinput>s</> and hit
|
||||
<keycap>return</>. Then the freebsd core team will receive their just
|
||||
rewards. As I mentioned earlier you can also use other commands, for
|
||||
example <command>quit</> if you don't want to send the
|
||||
message.</para>
|
||||
|
||||
<para>The <command>forw</> command is stunningly similar. The big
|
||||
difference being that the message you are forwarding is automatically
|
||||
included in the outgoing message. When you run <command>forw</> it
|
||||
will forward your current message. You can always tell it to forward
|
||||
something else by doing something like <command>forw 23</> and then
|
||||
message number 23 will be put in your outgoing message instead of the
|
||||
current message. Beyond those small differences <command>forw</>
|
||||
functions exactly the same as <command>comp</>. You go through the
|
||||
exact same message sending process.</para>
|
||||
|
||||
<para>The <command>repl</> command will reply to whatever your
|
||||
current message is, unless you give it a different message to reply
|
||||
to. <command>repl</> will do its best to go ahead and fill in some of
|
||||
the email headers already. So you will notice that the
|
||||
<literal>To:</> header already has the address of the recipient in
|
||||
there. Also the <literal>Subject:</> line will already be filled in.
|
||||
You then go about the normal message composition process and you are
|
||||
done. One useful command line option to know here is the
|
||||
<option>-cc</option> option. You can use <parameter>all</>,
|
||||
<parameter>to</>, <parameter>cc</>, <parameter>me</> after the
|
||||
<option>-cc</option> option to have <command>repl</> automatically
|
||||
add the various addresses to the cc list in the message. You have
|
||||
probably noticed that the original message isn't included. This is
|
||||
because most MH setups are configured to do this from the
|
||||
start.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title><filename>components</>, and <filename>replcomps</>—components files for <command>comp</> and <command>repl</></title>
|
||||
|
||||
<para>The <filename>components</> file is usually in
|
||||
<filename>/usr/local/lib/mh</filename>. You can copy that file into
|
||||
your MH Mail directory and edit to contain what you want it to
|
||||
contain. It is a fairly basic file. You have various email headers at
|
||||
the top, a dashed line and then nothing. The
|
||||
<command>comp</command> command just copies this
|
||||
<filename>components</> file and then edits it. You can add any
|
||||
kind of valid RFC822 header you want. For instance you could have
|
||||
something like this in your <filename>components</> file:
|
||||
<informalexample>
|
||||
<screen>To:
|
||||
Fcc: out
|
||||
Subject:
|
||||
X-Mailer: MH 6.8.3
|
||||
X-Home-Page: http://www.freebsd.org/
|
||||
-------</screen>
|
||||
</informalexample>
|
||||
|
||||
MH would then copy this components file and throw you into your
|
||||
editor. The <filename>components</> file is fairly simple. If you
|
||||
wanted to have a signature on those messages you would just put your
|
||||
signature in that <filename>components</> file.</para>
|
||||
|
||||
<para>The <filename>replcomps</> file is a bit more complex. The default
|
||||
<filename>replcomps</> looks like this:
|
||||
<informalexample>
|
||||
<screen>%(lit)%(formataddr %<{reply-to}%?{from}%?{sender}%?{return-path}%>)\
|
||||
%<(nonnull)%(void(width))%(putaddr To: )\n%>\
|
||||
%(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\
|
||||
%<(nonnull)%(void(width))%(putaddr cc: )\n%>\
|
||||
%<{fcc}Fcc: %{fcc}\n%>\
|
||||
%<{subject}Subject: Re: %{subject}\n%>\
|
||||
%<{date}In-reply-to: Your message of "\
|
||||
%<(nodate{date})%{date}%|%(pretty{date})%>."%<{message-id}
|
||||
%{message-id}%>\n%>\
|
||||
--------
|
||||
</screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>It's in the same basic format as the <filename>components</> file but
|
||||
it contains quite a few extra formatting codes. The
|
||||
<literal>%(lit)</> command makes room for the address. The
|
||||
<literal>%(formataddr</> is a function that returns a proper email
|
||||
address. The next part is <literal>%<</literal> which means if and
|
||||
the <literal>{reply-to}</> means the reply-to field in the original
|
||||
message. So that might be translated this way:
|
||||
<informalexample>
|
||||
<screen>%<<emphasis remap=bf>if</emphasis> {reply-to} <emphasis remap=bf>the original message has a reply-to</emphasis>
|
||||
then give that to formataddr, %? <emphasis remap=bf>else</emphasis> {from} <emphasis remap=bf>take the
|
||||
from address</emphasis>, %? <emphasis remap=bf>else</emphasis> {sender} <emphasis remap=bf>take the sender address</emphasis>, %?
|
||||
<emphasis remap=bf>else</emphasis> {return-path} <emphasis remap=bf>take the return-path from the original
|
||||
message</emphasis>, %> <emphasis remap=bf>endif</emphasis>.</screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>As you can tell MH formatting can get rather involved. You can
|
||||
probably decipher what most of the other functions and variables
|
||||
mean. All of the information on writing these format strings is in the
|
||||
MH-Format man page. The really nice thing is that once you have built
|
||||
your customized <filename>replcomps</> file you won't need to touch it
|
||||
again. No other email program really gives you the power and
|
||||
flexibility that MH gives you.</para>
|
||||
|
||||
</sect1>
|
||||
</chapter>
|
||||
</book>
|
|
@ -1,573 +0,0 @@
|
|||
<!-- $Id: mh.sgml,v 1.3 1996-12-28 23:36:53 mpp Exp $ -->
|
||||
<!--
|
||||
From matt@garply.com Wed May 22 08:25:18 1996
|
||||
Date: Tue, 23 Jan 1996 11:02:50 -0600
|
||||
From: Matt Midboe <matt@garply.com>
|
||||
To: jfieber@freebsd.org
|
||||
Subject: Introduction to MH for FreeBSD Handbook
|
||||
|
||||
Okay I've diverged from my original plan on the handbook and condensed it a
|
||||
bit. If I find some time I am going to start working on something about how
|
||||
to use sendmail, since I imagine that would be a bit more useful. Here is my
|
||||
guide to using mh on freebsd. Let me know what changes it might need or
|
||||
things that need to be clearer or shorter.
|
||||
-->
|
||||
<!DOCTYPE linuxdoc PUBLIC "-//FreeBSD//DTD linuxdoc//EN">
|
||||
|
||||
<!-- This document explains some about the MUA MH -->
|
||||
|
||||
<article>
|
||||
<title>An MH Primer
|
||||
<author>Matt Midboe, <url url="mailto:matt@garply.com"
|
||||
name="matt@garply.com">
|
||||
<date>v1.0, 16 January 1996
|
||||
<abstract>This document contains an introduction to using MH on
|
||||
FreeBSD</abstract>
|
||||
<toc>
|
||||
|
||||
<sect>Introduction<label id="mhintro">
|
||||
|
||||
<p>
|
||||
<!-- This section is here to explain the philosophy behind MH Also
|
||||
make sure that the user has installed the mh package -->
|
||||
MH started back in 1977 at the RAND Corporation, where the initial
|
||||
philosophies behind MH were developed. MH isn't so much a monolithic
|
||||
email program but a philosophy about how best to develop tools for
|
||||
reading email. The MH developers have done a great job adhering to the
|
||||
KISS principle: Keep It Simple Stupid. Rather than have one large
|
||||
program for reading, sending and handling email they have written
|
||||
specialized programs for each part of your email life. One might liken
|
||||
MH to the specialization that one finds in insects and nature. Each
|
||||
tool in MH does one thing, and does it very well.
|
||||
|
||||
Beyond just the various tools that one uses to handle their email MH
|
||||
has done an excellent job keeping the configuration of each of these
|
||||
tools consistent and uniform. In fact, if you are not quite sure how
|
||||
something is supposed to work or what the arguments for some command
|
||||
are supposed to be then you can generally guess and be right. Each MH
|
||||
command is consistent about how it handles reading the configuration
|
||||
files and how it takes arguments on the command line. One useful thing
|
||||
to remember is that you can always add a <tt/-help/ to the command to
|
||||
have it display the options for that command.
|
||||
|
||||
The first thing that you need to do is to make sure that you have
|
||||
installed the MH package on your FreeBSD machine. If you installed
|
||||
from CDROM you should be able to execute the following to load mh:
|
||||
<tscreen><verb>
|
||||
pkg_add /cdrom/packages/mh-6.8.3.tgz
|
||||
</verb></tscreen>
|
||||
You will notice that it created a /usr/local/lib/mh directory for you
|
||||
as well as adding several binaries to the /usr/local/bin directory. If
|
||||
you would prefer to compile it yourself then you can anonymous ftp it
|
||||
from <url url="ftp://ftp.ics.uci.edu/" name="ftp.ics.uci.edu"> or <url
|
||||
url="ftp://louie.udel.edu/" name="louie.udel.edu">.
|
||||
|
||||
This primer is not a full comprehensive explanation of how MH
|
||||
works. This is just intended to get you started on the road to
|
||||
happier, faster mail reading. You should read the man pages for the
|
||||
various commands. Also you might want to read the <url
|
||||
url="news:comp.mail.mh" name="comp.mail.mh"> newsgroup. Also you can
|
||||
read the <url
|
||||
url="http://www.cis.ohio-state.edu/hypertext/faq/usenet/mh-faq/part1/faq.html"
|
||||
name="FAQ"> for MH. The best resource for MH is the O'Reilly and
|
||||
Associates book written by Jerry Peek.
|
||||
|
||||
<sect>Reading Mail
|
||||
<p>
|
||||
<!-- This section covers how to use inc, msgchk, next, prev, rmm, and rmf -->
|
||||
This section covers how to use <tt/inc/, <tt/show/, <tt/scan/,
|
||||
<tt/next/, <tt/prev/, <tt/rmm/, <tt/rmf/, and <tt/msgchk/.
|
||||
One of the best things about MH is the consistent interface between
|
||||
programs. A few things to keep in mind when using these commands is
|
||||
how to specify message lists. In the case of <em/inc/ this doesn't
|
||||
really make any sense but with commands like <em/show/ it is useful to
|
||||
know.
|
||||
|
||||
A message list can consist of something like <tt/23 20 16/ which will
|
||||
act on messages 23, 20 and 16. This is fairly simple but you can do
|
||||
more useful things like <tt/23-30/ which will act on all the messages
|
||||
between 23 and 30. You can also specify something like <tt/cur:10/
|
||||
which will act on the current message and the next 9 messages. The
|
||||
<tt/cur/, <tt/last/, and <tt/first/ messages are special messages that
|
||||
refer to the current, last or first message in the folder.
|
||||
|
||||
<sect1><heading>inc, msgchk - read in your new email or check it<label id="inc"></>
|
||||
<p>
|
||||
If you just type in <em>inc</em> and hit return you will be well on your
|
||||
way to getting started with MH. The first time you run <em>inc</em> it
|
||||
will setup your account to use all the MH defaults and ask you about
|
||||
creating a Mail directory. If you have mail waiting to be downloaded
|
||||
you will see something that looks like:
|
||||
<tscreen><verb>
|
||||
29 01/15 Doug White Re: Another Failed to boot problem<<On Mon, 15 J
|
||||
30 01/16 "Jordan K. Hubbar Re: FBSD 2.1<<> Do you want a library instead of
|
||||
31 01/16 Bruce Evans Re: location of bad144 table<<>> >It would appea
|
||||
32 01/16 "Jordan K. Hubbar Re: video is up<<> Anyway, mrouted won't run, ev
|
||||
33 01/16 Michael Smith Re: FBSD 2.1<<Nate Williams stands accused of sa
|
||||
</verb></tscreen>
|
||||
This is the same thing you will see from a ``<ref id="scan">''. If you
|
||||
just run <em>inc</em> with no arguments it will look on your computer for email
|
||||
that is supposed to be coming to you.
|
||||
|
||||
A lot of people like to use POP for grabbing their email. MH can do
|
||||
POP to grab your email. You will need to give <em>inc</em> a few command
|
||||
line arguments.
|
||||
<tscreen><verb>
|
||||
inc -host mail.pop.org -user username -norpop
|
||||
</verb></tscreen>
|
||||
That tells <em>inc</> to go to <bf/mail.pop.org/ to download your
|
||||
email, and that your username on their system is <bf/username/. The
|
||||
<tt>-norpop</tt> option tells <em>inc</em> to use plain POP3 for
|
||||
downloading your email. MH has support for a few different dialects of
|
||||
POP. More than likely you will never ever need to use them
|
||||
though. While you can do more complex things with inc such as audit
|
||||
files and scan format files this will get you going.
|
||||
|
||||
The <em/msgchk/ command is used to get information on whether or not
|
||||
you have new email. <em/msgchk/ takes the same <tt/-host/ and
|
||||
<tt/-user/ options that <em/inc/ takes.
|
||||
|
||||
<sect1><heading>show, next and prev - displaying and moving through emails
|
||||
<label id="show"></>
|
||||
<p>
|
||||
<em/show/ is to show a letter in your current folder. Like inc,
|
||||
<em/show/ is a fairly straightforward command. If you just type
|
||||
<em/show/ and hit return then it displays the current message. You can
|
||||
also give specific message numbers to show:
|
||||
<tscreen><verb>
|
||||
show 32 45 56
|
||||
</verb></tscreen>
|
||||
This would display message numbers 32, 45 and 56 right after each
|
||||
other. Unless you change the default behavior <em/show/ basically just
|
||||
does a more on the email message.
|
||||
|
||||
<em/next/ is used to move onto the next message and <em/prev/ will go
|
||||
to the previous message. Both commands have an implied <em/show/
|
||||
command so that when you go to the next message it automatically
|
||||
displays it.
|
||||
|
||||
<sect1><heading>scan - shows you a scan of your messages<label id="scan"></>
|
||||
<p>
|
||||
|
||||
<em/scan/ will display a brief listing of the messages in your current
|
||||
folder. This is an example of what the <em/scan/ command will give you.
|
||||
<tscreen><verb>
|
||||
30+ 01/16 "Jordan K. Hubbar Re: FBSD 2.1<<> Do you want a library instead of
|
||||
31 01/16 Bruce Evans Re: location of bad144 table<<>> >It would appea
|
||||
32 01/16 "Jordan K. Hubbar Re: video is up<<> Anyway, mrouted won't run, ev
|
||||
33 01/16 Michael Smith Re: FBSD 2.1<<Nate Williams stands accused of sa
|
||||
</verb></tscreen>
|
||||
Like just about everything in MH this display is very
|
||||
configurable. This is the typical default display. It gives you the
|
||||
message number, the date on the email, the sender, the subject line,
|
||||
and a sentence fragment from the very beginning of the email if it can
|
||||
fit it. The + means that message is the current message, so if you do
|
||||
a <em/show/ it will display that message.
|
||||
|
||||
One useful option for scan is the <tt/-reverse/ option. This will list
|
||||
your messages with the highest message number first and lowest message
|
||||
number last. Another useful option with <em/scan/ is to have it
|
||||
read from a file. If you want to scan your incoming mailbox on FreeBSD
|
||||
without having to <em/inc/ it you can do <tt>scan -file
|
||||
/var/mail/username</tt>. This can be used with any file that is in the
|
||||
<bf/mbox/ format.
|
||||
|
||||
<sect1><heading>rmm and rmf - remove the current message or folder
|
||||
<label id="rmm"></>
|
||||
<p>
|
||||
<em/rmm/ is used to remove a mail message. The default is typically to
|
||||
not actually remove the message but to rename the file to one that is
|
||||
ignored by the MH commands. You will need to through periodically and
|
||||
physically delete the "removed" messages.
|
||||
|
||||
The <em/rmf/ command is used to remove folders. This doesn't just
|
||||
rename the files but actually removes the from the hard drive so you
|
||||
should be careful when you use this command.
|
||||
|
||||
<sect1><heading>A typical session of reading with MH<label id="samplereading"></>
|
||||
<p>
|
||||
The first thing that you will want to do is <em/inc/ your new mail. So
|
||||
at a shell prompt just type in <em/inc/ and hit return.
|
||||
<tscreen><verb>
|
||||
tempest% inc
|
||||
Incorporating new mail into inbox...
|
||||
|
||||
36+ 01/19 "Stephen L. Lange Request...<<Please remove me as contact for pind
|
||||
37 01/19 Matt Thomas Re: kern/950: Two PCI bridge chips fail (multipl
|
||||
38 01/19 "Amancio Hasty Jr Re: FreeBSD and VAT<<>>> Bill Fenner said: > In
|
||||
tempest%
|
||||
</verb></tscreen>
|
||||
This shows you the new email that has been added to your mailbox. So
|
||||
the next thing to do is <em/show/ the email and move around.
|
||||
<tscreen><verb>
|
||||
tempest% show
|
||||
Received: by sashimi.wwa.com (Smail3.1.29.1 #2)
|
||||
id m0tdMZ2-001W2UC; Fri, 19 Jan 96 13:33 CST
|
||||
Date: Fri, 19 Jan 1996 13:33:31 -0600 (CST)
|
||||
From: "Stephen L. Lange" <stvlange@wwa.com>
|
||||
To: matt@garply.com
|
||||
Subject: Request...
|
||||
Message-Id: <Pine.BSD.3.91.960119133211.824A-100000@sashimi.wwa.com>
|
||||
Mime-Version: 1.0
|
||||
Content-Type: TEXT/PLAIN; charset=US-ASCII
|
||||
|
||||
|
||||
Please remove me as contact for pindat.com
|
||||
|
||||
tempest% rmm
|
||||
tempest% next
|
||||
Received: from localhost (localhost [127.0.0.1]) by whydos.lkg.dec.com (8.6.11/8
|
||||
.6.9) with SMTP id RAA24416; Fri, 19 Jan 1996 17:56:48 GMT
|
||||
Message-Id: <199601191756.RAA24416@whydos.lkg.dec.com>
|
||||
X-Authentication-Warning: whydos.lkg.dec.com: Host localhost didn't use HELO pro
|
||||
tocol
|
||||
To: hsu@clinet.fi
|
||||
Cc: hackers@FreeBSD.org
|
||||
Subject: Re: kern/950: Two PCI bridge chips fail (multiple multiport ethernet
|
||||
boards)
|
||||
In-Reply-To: Your message of "Fri, 19 Jan 1996 00:18:36 +0100."
|
||||
<199601182318.AA11772@Sysiphos>
|
||||
X-Mailer: exmh version 1.5omega 10/6/94
|
||||
Date: Fri, 19 Jan 1996 17:56:40 +0000
|
||||
From: Matt Thomas <matt@lkg.dec.com>
|
||||
Sender: owner-hackers@FreeBSD.org
|
||||
Precedence: bulk
|
||||
|
||||
|
||||
This is due to a typo in pcireg.h (to
|
||||
which I am probably the guilty party).
|
||||
</verb></tscreen>
|
||||
The <em/rmm/ removed the current message and the <em/next/ command
|
||||
moved me on to the next message. Now if I wanted to look at ten most
|
||||
recent messages so I could read one of them here is what I would do:
|
||||
<tscreen><verb>
|
||||
tempest% scan last:10
|
||||
26 01/16 maddy Re: Testing some stuff<<yeah, well, Trinity has
|
||||
27 01/17 Automatic digest NET-HAPPENINGS Digest - 16 Jan 1996 to 17 Jan 19
|
||||
28 01/17 Evans A Criswell Re: Hey dude<<>From matt@tempest.garply.com Tue
|
||||
29 01/16 Karl Heuer need configure/make volunteers<<The FSF is looki
|
||||
30 01/18 Paul Stephanouk Re: [alt.religion.scientology] Raw Meat (humor)<
|
||||
31 01/18 Bill Lenherr Re: Linux NIS Solaris<<--- On Thu, 18 Jan 1996 1
|
||||
34 01/19 John Fieber Re: Stuff for the email section?<<On Fri, 19 Jan
|
||||
35 01/19 support@foo.garpl [garply.com #1138] parlor<<Hello. This is the Ne
|
||||
37+ 01/19 Matt Thomas Re: kern/950: Two PCI bridge chips fail (multipl
|
||||
38 01/19 "Amancio Hasty Jr Re: FreeBSD and VAT<<>>> Bill Fenner said: > In
|
||||
tempest%
|
||||
</verb></tscreen>
|
||||
Then if I wanted to read message number 27 I would do a <tt/show 27/
|
||||
and it would be displayed. As you can probably tell from this sample
|
||||
session MH is pretty easy to use and looking through emails and
|
||||
displaying them is fairly intuitive and easy.
|
||||
|
||||
<sect>Folders and Mail Searching
|
||||
<p>
|
||||
Anybody who gets lots of email definitely wants to be able to
|
||||
prioritize, stamp, brief, de-brief, and number their emails in a
|
||||
variety of different ways. MH can do this better than just about
|
||||
anything. One thing that we haven't really talked about is the concept
|
||||
of folders. You have undoubtedly come across the folders concept using
|
||||
other email programs. MH has folders too. MH can even do sub-folders
|
||||
of a folder. One thing you should keep in mind with MH is that when
|
||||
you ran <em/inc/ for the first time and it asked you if it could
|
||||
create a Mail directory it began storing everything in that
|
||||
directory. If you look at that directory you will find a directory
|
||||
named <bf/inbox/. The <bf/inbox/ directory houses all of your incoming
|
||||
mail that hasn't been thrown anywhere else.
|
||||
|
||||
Whenever you create a new folder a new directory is going to be
|
||||
created underneath your MH Mail directory, and messages in that folder
|
||||
are going to be stored in that directory. When new email comes in that
|
||||
new email is thrown into your inbox directory with a file name that is
|
||||
equivalent to the message number. So even if you didn't have any of
|
||||
the MH tools to read your email you could still use standard UNIX
|
||||
commands to munge around in those directories and just more your
|
||||
files. It's this simplicity that really gives you a lot of power with
|
||||
what you can do with your email.
|
||||
|
||||
Just as you can use message lists like <tt/23 16 42/ with most MH
|
||||
commands there is a folder option you can specify with just about
|
||||
every MH command. If you do a <tt/scan +freebsd/ it will scan your
|
||||
freebsd folder, and your current folder will be changed to freebsd. If
|
||||
you do a <tt/show +freebsd 23 16 42/ <em/show/ is going to switch to
|
||||
your freebsd folder and display messages 23, 16 and 42. So remember
|
||||
that +folder syntax. You will need to make sure you use it to make
|
||||
commands process different folders. Remember you default folder for
|
||||
mail is inbox so doing a <tt/folder +inbox/ should always get you back
|
||||
to your mail. Of course, in MH's infinite flexibility this can be
|
||||
changed but most places have probably left it as inbox.
|
||||
|
||||
<!-- This section covers how to use pick, folder{s}, and slocal
|
||||
This needs to cover the general +folder format and an overview on the
|
||||
directory structure here. -->
|
||||
<sect1>pick - search email that matches certain criteria
|
||||
<p>
|
||||
<em/pick/ is one of the more complex commands in the MH system. So you
|
||||
might want to read the pick man page for a more thorough
|
||||
understanding. At its simplest level you can do something like
|
||||
<tscreen><verb>
|
||||
tempest% pick -search pci
|
||||
15
|
||||
42
|
||||
55
|
||||
56
|
||||
57
|
||||
</verb></tscreen>
|
||||
This will tell <em/pick/ to look through every single line in every
|
||||
message in your current folder and tell you which message numbers it
|
||||
found the word pci in. You can then <em/show/ those messages and read
|
||||
them if you wish or <em/rmm/ them. You would have to specify something
|
||||
like <tt/show 15 42 55-57/ to display them though. A slightly more
|
||||
useful thing to do is this:
|
||||
<tscreen><verb>
|
||||
tempest% pick -search pci -seq pick
|
||||
5 hits
|
||||
tempest% show pick
|
||||
</verb></tscreen>
|
||||
This will show you the same messages you just didn't have to work as
|
||||
hard to do it. The <tt/-seq/ option is really an abbreviation of
|
||||
<tt/-sequence/ and <bf/pick/ is just a sequence which contains the
|
||||
message numbers that matched. You can use sequences with just about
|
||||
any MH command. So you could have done an <tt/rmm pick/ and all those
|
||||
messages would be removed instead. You sequence can be named
|
||||
anything. If you run pick again it will overwrite the old sequence if
|
||||
you use the same name.
|
||||
|
||||
Doing a <tt/pick -search/ can be a bit more time consuming than just
|
||||
searching for message from someone, or to someone. So <em/pick/ allows
|
||||
you to use the following predefined search criteria:
|
||||
<itemize>
|
||||
<item><tt/-to/ search based upon who the message is to
|
||||
<item><tt/-cc/ search based on who is in the cc list
|
||||
<item><tt/-from/ search for who sent the message
|
||||
<item><tt/-subject/ search for emails with this subject
|
||||
<item><tt/-date/ find emails with a matching dat
|
||||
<item><tt>--<em>component</em></tt> search for any other component in
|
||||
the header. (i.e. --reply-to to find all emails with a certain
|
||||
reply-to in the header)
|
||||
</itemize>
|
||||
|
||||
This allows you to do things like
|
||||
<tscreen><verb>
|
||||
pick -to freebsd-hackers@freebsd.org -seq hackers
|
||||
</verb></tscreen>
|
||||
to get a list of all the email send to the FreeBSD hackers mailing
|
||||
list. <em/pick/ also allows you to group these criteria in different
|
||||
ways using the following options:
|
||||
<itemize>
|
||||
<item>... <tt/-and/ ...
|
||||
<item>... <tt/-or/ ...
|
||||
<item><tt/-not/ ...
|
||||
<item><tt/-lbrace/ ... <tt/-rbrace/
|
||||
</itemize>
|
||||
These commands allow you to do things like
|
||||
<tscreen><verb>
|
||||
pick -to freebsd-hackers -and -cc freebsd-hackers
|
||||
</verb></tscreen>
|
||||
That will grab all the email in your inbox that was sent to
|
||||
freebsd-hackers or cc'd to that list. The brace options allow you to
|
||||
group search criteria together. This is sometimes very necessary as
|
||||
in the following example
|
||||
<tscreen><verb>
|
||||
pick -lbrace -to freebsd-hackers -and -not -cc freebsd-questions -rbrace
|
||||
-and -subject pci
|
||||
</verb></tscreen>
|
||||
Basically this says pick (to freebsd-hackers and not cc'd on
|
||||
freebsd-questions) and the subject is pci. It should look through your
|
||||
folder and find all messages send to the freebsd-hackers list that
|
||||
aren't cc'd to the freebsd-questions list that contain something on
|
||||
pci in the subject line. Ordinarily you might have to worry about
|
||||
something called operator precedence. Remember in math how you
|
||||
evaluate from left to right and you do multiplication and division
|
||||
first and addition and subtraction second? MH has the same type of
|
||||
rules for <em/pick/. It's fairly complex so you might want to study
|
||||
the man page. This document is just to help you get acquainted with
|
||||
MH.
|
||||
|
||||
<sect1>folder, folders, refile - three useful programs for folder maintenance
|
||||
<p>
|
||||
There are three programs which are primarily just for manipulating
|
||||
your folders. The <em/folder/ program is used to switch between
|
||||
folders, pack them, and list them. At its simplest level you can do a
|
||||
<tt/folder +newfolder/ and you will be switched into
|
||||
<bf/newfolder/. From there on out all your MH commands like <em/comp/,
|
||||
<em/repl/, <em/scan/, and <em/show/ will act on that <bf/newfolder/
|
||||
folder. Sometimes when you are reading and deleting messages you will
|
||||
develop ``holes'' in your folders.
|
||||
|
||||
If you do a <em/scan/ you might just see messages
|
||||
34, 35, 36, 43, 55, 56, 57, 80. If you do a <tt/folder -pack/ this
|
||||
will renumber all your messages so that there are no holes. It doesn't
|
||||
actually delete any messages though. So you may need to periodically
|
||||
go through and physically delete <em/rmm/'d messages.
|
||||
|
||||
If you need statistics on your folders you can do a <em/folders/ or
|
||||
<tt/folder -all/ to list all your folders, how many messages they
|
||||
have, what the current message is in each one and so on. This line of
|
||||
stats it displays for all your folders is the same one you get when
|
||||
you change to a folder with <tt/folder +foldername/. A <em/folders/
|
||||
command looks like this:
|
||||
<tscreen><verb>
|
||||
Folder # of messages ( range ); cur msg (other files)
|
||||
announce has 1 message ( 1- 1).
|
||||
drafts has no messages.
|
||||
f-hackers has 43 messages ( 1- 43).
|
||||
f-questions has 16 messages ( 1- 16).
|
||||
inbox+ has 35 messages ( 1- 38); cur= 37.
|
||||
lists has 8 messages ( 1- 8).
|
||||
netfuture has 1 message ( 1- 1).
|
||||
out has 31 messages ( 1- 31).
|
||||
personal has 6 messages ( 1- 6).
|
||||
todo has 58 messages ( 1- 58); cur= 1.
|
||||
|
||||
TOTAL= 199 messages in 13 folders.
|
||||
|
||||
</verb></tscreen>
|
||||
|
||||
The <em/refile/ command is what you use to move messages between
|
||||
folders. When you do something like <tt/refile 23 +netfuture/ message
|
||||
number 23 is moved into the netfuture folder. You could also do
|
||||
something like <tt/refile 23 +netfuture/latest/ which would put
|
||||
message number 23 in a subfolder called latest under the netfuture
|
||||
folder. If you want to keep a message in the current folder and link
|
||||
it you can do a <tt/refile -link 23 +netfuture/ which would keep 23 in
|
||||
your current inbox but also list in your netfuture folder. You are
|
||||
probably beginning to realize some of the really powerful things you
|
||||
can do with MH.
|
||||
|
||||
<sect>Sending Mail
|
||||
<p>
|
||||
<!-- This section covers how to use comp, repl and forw -->
|
||||
Email is a two way street for most people so you want to be able to
|
||||
send something back. The way MH handles sending mail can be a bit
|
||||
difficult to follow at first, but it allows for incredible
|
||||
flexibility. The first thing MH does is to copy a components file into
|
||||
your outgoing email. A components file is basically a skeleton email
|
||||
letter with stuff like the To: and Subject: headers already in it.
|
||||
You are then sent into your editor where you fill in the header
|
||||
information and then type the body of your message below the dashed
|
||||
lines in the message. Then to the <em/whatnow/ program. When you are at the
|
||||
``What now?'' prompt you can tell it to <bf/send/, <bf/list/,
|
||||
<bf/edit/, <bf/edit/, <bf/push/, and <bf/quit/. Most of these commands
|
||||
are self-explanatory. So the message sending process involves copying
|
||||
a component file, editing your email, and then telling the
|
||||
<em/whatnow/ program what to do with your email.
|
||||
|
||||
<sect1><heading>comp, forw, reply - compose, forward or reply to a message to someone</>
|
||||
<p>
|
||||
The <em/comp/ program has a few useful command line options. The most
|
||||
important one to know right now is the <tt/-editor/ option. When MH is
|
||||
installed the default editor is usually a program called <em/prompter/
|
||||
which comes with MH. It's not a very exciting editor and basically
|
||||
just gets the job done. So when you go to compose a message to someone
|
||||
you might want to use <tt/comp -editor /usr/bin/vi/ or <tt/comp
|
||||
-editor /usr/local/bin/pico/ instead. Once you have run <em/comp/ you
|
||||
are in your editor and you see something that looks like this:
|
||||
<tscreen><verb>
|
||||
To:
|
||||
cc:
|
||||
Subject:
|
||||
--------
|
||||
|
||||
</verb></tscreen>
|
||||
You need to put the person you are sending the mail to after the To:
|
||||
line. It works the same way for the other headers also, so you would
|
||||
need to put your subject after the Subject: line. Then you would just
|
||||
put the body of your message after the dashed lines. It may seem a bit
|
||||
simplistic since a lot of email programs have special requesters that
|
||||
ask you for this information but there really isn't any point to
|
||||
that. Plus this really gives you excellent flexibility.
|
||||
<tscreen><verb>
|
||||
To:freebsd-rave@freebsd.org
|
||||
cc:
|
||||
Subject:And on the 8th day God created the FreeBSD core team
|
||||
--------
|
||||
Wow this is an amazing operating system. Thanks!
|
||||
</verb></tscreen>
|
||||
You can now save this message and exit your editor. You will see the
|
||||
<tt/What now?/ prompt and you can type in <tt/send/ or <tt/s/ and hit
|
||||
return. Then the freebsd core team will receive their just rewards. As
|
||||
I mentioned earlier you can also send other commands, for example
|
||||
<tt/quit/ if you don't want to send the message.
|
||||
|
||||
The <em/forw/ command is stunningly similar. The big difference
|
||||
being that the message you are forwarding is automatically included in
|
||||
the outgoing message. When you run <em/forw/ it will forward your
|
||||
current message. You can always tell it to forward something else by
|
||||
doing something like <tt/forw 23/ and then message number 23 will be
|
||||
put in your outgoing message instead of the current message. Beyond
|
||||
those small differences <em/forw/ functions exactly the same as
|
||||
<em/comp/. You go through the exact same message sending process.
|
||||
|
||||
The <em/repl/ command will reply to whatever your current message is,
|
||||
unless you give it a different message to reply to. <em/repl/ will do
|
||||
its best to go ahead and fill in some of the email headers already. So
|
||||
you will notice that the To: header already has the address of the
|
||||
recipient in there. Also the Subject: line will already be filled
|
||||
in. You then go about the normal message composition process and you
|
||||
are done. One useful command line option to know here is the <tt/-cc/
|
||||
option. You can use <bf/all/, <bf/to/, <bf/cc/, <bf/me/ after the
|
||||
<tt/-cc/ option to have <em/repl/ automatically add the various
|
||||
addresses to the cc list in the message. You have probably noticed
|
||||
that the original message isn't included. This is because most MH
|
||||
setups are configured to do this from the start.
|
||||
|
||||
<sect1> components, and replcomps - components files for comp and repl
|
||||
<p>
|
||||
The <em/components/ file is usually in <tt>/usr/local/lib/mh</tt>. You
|
||||
can copy that file into your MH Mail directory and edit to contain
|
||||
what you want it to contain. It is a fairly basic file. You have
|
||||
various email headers at the top, a dashed line and then nothing. The
|
||||
<em/comp/ command just copies this <em/components/ file and then edits
|
||||
it. You can any kind of valid RFC822 header you want. For instance you
|
||||
could have something like this in your <em/components/ file:
|
||||
<tscreen><verb>
|
||||
To:
|
||||
Fcc: out
|
||||
Subject:
|
||||
X-Mailer: MH 6.8.3
|
||||
X-Home-Page: http://www.freebsd.org/
|
||||
-------
|
||||
</verb></tscreen>
|
||||
MH would then copy this components file and throw you into your
|
||||
editor. The <em/components/ file is fairly simple. If you wanted to
|
||||
have a signature on those messages you would just put your signature
|
||||
in that <em/components/ file.
|
||||
|
||||
The <em/replcomps/ file is a bit more complex. The default
|
||||
<em/replcomps/ looks like this:
|
||||
<tscreen><verb>
|
||||
%(lit)%(formataddr %<{reply-to}%?{from}%?{sender}%?{return-path}%>)\
|
||||
%<(nonnull)%(void(width))%(putaddr To: )\n%>\
|
||||
%(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\
|
||||
%<(nonnull)%(void(width))%(putaddr cc: )\n%>\
|
||||
%<{fcc}Fcc: %{fcc}\n%>\
|
||||
%<{subject}Subject: Re: %{subject}\n%>\
|
||||
%<{date}In-reply-to: Your message of "\
|
||||
%<(nodate{date})%{date}%|%(pretty{date})%>."%<{message-id}
|
||||
%{message-id}%>\n%>\
|
||||
--------
|
||||
|
||||
</verb></tscreen>
|
||||
It's in the same basic format as the <em/components/ file but it
|
||||
contains quite a few extra formatting codes. The %(lit) command makes
|
||||
room for the address. The %(formataddr is a function that returns a
|
||||
proper email address. The next part is %< which means if and the
|
||||
{reply-to} means the reply-to field in the original message. So that
|
||||
might be translated this way:
|
||||
|
||||
<tscreen>
|
||||
%<<bf/if/ {reply-to} <bf/the original message has a reply-to/
|
||||
then give that to formataddr, %? <bf/else/ {from} <bf/take the
|
||||
from address/, %? <bf/else/ {sender} <bf/take the sender address/, %?
|
||||
<bf/else/ {return-path} <bf/take the return-path from the original
|
||||
message/, %> <bf/endif/.
|
||||
</tscreen>
|
||||
|
||||
As you can tell MH formatting can get rather involved. You can
|
||||
probably decipher what most of the other functions and variables
|
||||
mean. All of the information on writing these format strings is in the
|
||||
MH-Format man page. The really nice thing is that once you have built
|
||||
your customized <em/replcomps/ file you won't need to touch it
|
||||
again. No other email program really gives you the power and
|
||||
flexibility that MH gives you.
|
||||
</article>
|
|
@ -1,5 +1,5 @@
|
|||
DOC= mh
|
||||
SRCS= mh.sgml
|
||||
DOCS= mh.docb
|
||||
INDEXLINK= mh.html
|
||||
|
||||
.include <bsd.sgml.mk>
|
||||
.include "../../web.mk"
|
||||
|
||||
|
|
704
en_US.ISO8859-1/articles/mh/article.sgml
Normal file
704
en_US.ISO8859-1/articles/mh/article.sgml
Normal file
|
@ -0,0 +1,704 @@
|
|||
<!-- $FreeBSD$ -->
|
||||
<!-- FreeBSD Documentation Project -->
|
||||
|
||||
<!DOCTYPE BOOK PUBLIC "-//Davenport//DTD DocBook V3.0//EN">
|
||||
<book>
|
||||
|
||||
<bookinfo>
|
||||
<bookbiblio>
|
||||
<title>An MH Primer</title>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Matt</firstname>
|
||||
<surname>Midboe</surname>
|
||||
<affiliation>
|
||||
<address>
|
||||
<email>matt@garply.com</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author></authorgroup>
|
||||
|
||||
<pubdate>v1.0, 16 January 1996</pubdate>
|
||||
|
||||
<abstract><para>This document contains an introduction to using MH on
|
||||
FreeBSD</para></abstract>
|
||||
|
||||
</bookbiblio>
|
||||
</bookinfo>
|
||||
|
||||
<chapter id="mhintro">
|
||||
<title>Introduction</title>
|
||||
|
||||
<para>MH started back in 1977 at the RAND Corporation, where the
|
||||
initial philosophies behind MH were developed. MH isn't so much a
|
||||
monolithic email program but a philosophy about how best to develop
|
||||
tools for reading email. The MH developers have done a great job
|
||||
adhering to the <acronym>KISS</> principle: Keep It Simple Stupid.
|
||||
Rather than have one large program for reading, sending and handling
|
||||
email they have written specialized programs for each part of your
|
||||
email life. One might liken MH to the specialization that one finds
|
||||
in insects and nature. Each tool in MH does one thing, and does it
|
||||
very well.</para>
|
||||
|
||||
<para>Beyond just the various tools that one uses to handle their
|
||||
email MH has done an excellent job keeping the configuration of each
|
||||
of these tools consistent and uniform. In fact, if you are not quite
|
||||
sure how something is supposed to work or what the arguments for some
|
||||
command are supposed to be then you can generally guess and be right.
|
||||
Each MH command is consistent about how it handles reading the
|
||||
configuration files and how it takes arguments on the command line.
|
||||
One useful thing to remember is that you can always add a
|
||||
<option>-help</option> to the command to have it display the options
|
||||
for that command.</para>
|
||||
|
||||
<para>The first thing that you need to do is to make sure that you have
|
||||
installed the MH package on your FreeBSD machine. If you installed
|
||||
from CDROM you should be able to execute the following to load mh:
|
||||
<informalexample>
|
||||
<screen># <userinput>pkg_add /cdrom/packages/mh-6.8.3.tgz</></screen>
|
||||
</informalexample>
|
||||
You will notice that it created a <filename>/usr/local/lib/mh</>
|
||||
directory for you as well as adding several binaries to the
|
||||
<filename>/usr/local/bin</> directory. If you would prefer to compile
|
||||
it yourself then you can anonymous ftp it from <ulink
|
||||
URL="ftp://ftp.ics.uci.edu/">ftp.ics.uci.edu</ulink> or <ulink
|
||||
URL="ftp://louie.udel.edu/">louie.udel.edu</ulink>.</para>
|
||||
|
||||
<para>This primer is not a full comprehensive explanation of how MH
|
||||
works. This is just intended to get you started on the road to
|
||||
happier, faster mail reading. You should read the man pages for the
|
||||
various commands. Also you might want to read the <ulink
|
||||
URL="news:comp.mail.mh">comp.mail.mh</ulink> newsgroup. Also you can
|
||||
read the <ulink
|
||||
URL="http://www.cis.ohio-state.edu/hypertext/faq/usenet/mh-faq/part1/faq.html">FAQ
|
||||
for MH</ulink>. The best resource for MH is the O'Reilly and Associates book
|
||||
written by Jerry Peek.</para>
|
||||
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Reading Mail</title>
|
||||
|
||||
<para>This section covers how to use <command>inc</>,
|
||||
<command>show</>, <command>scan</>, <command>next</>,
|
||||
<command>prev</>, <command>rmm</>, <command>rmf</>, and
|
||||
<command>msgchk</>. One of the best things about MH is the
|
||||
consistent interface between programs. A few things to keep in mind
|
||||
when using these commands is how to specify message lists. In the
|
||||
case of <command>inc</> this doesn't really make any sense but with
|
||||
commands like <command>show</> it is useful to know. </para>
|
||||
|
||||
<para>A message list can consist of something like <parameter>23 20
|
||||
16</> which will act on messages 23, 20 and 16. This is fairly simple
|
||||
but you can do more useful things like <parameter>23-30</> which will
|
||||
act on all the messages between 23 and 30. You can also specify
|
||||
something like <parameter>cur:10</> which will act on the current
|
||||
message and the next 9 messages. The <parameter>cur</>,
|
||||
<parameter>last</>, and <parameter>first</> messages are special
|
||||
messages that refer to the current, last or first message in the
|
||||
folder.</para>
|
||||
|
||||
|
||||
<sect1 id="inc">
|
||||
<title><command>inc</>, <command>msgchk</>—read in your new email or check it</title>
|
||||
|
||||
<para>If you just type in <userinput>inc</> and hit <keycap>return</>
|
||||
you will be well on your way to getting started with MH. The first
|
||||
time you run <command>inc</> it will setup your account to use all
|
||||
the MH defaults and ask you about creating a Mail directory. If you
|
||||
have mail waiting to be downloaded you will see something that looks
|
||||
like:
|
||||
<informalexample>
|
||||
<screen> 29 01/15 Doug White Re: Another Failed to boot problem<<On Mon, 15 J
|
||||
30 01/16 "Jordan K. Hubbar Re: FBSD 2.1<<> Do you want a library instead of
|
||||
31 01/16 Bruce Evans Re: location of bad144 table<<>> >It would appea
|
||||
32 01/16 "Jordan K. Hubbar Re: video is up<<> Anyway, mrouted won't run, ev
|
||||
33 01/16 Michael Smith Re: FBSD 2.1<<Nate Williams stands accused of sa</screen>
|
||||
</informalexample>
|
||||
This is the same thing you will see from a <command>scan</> (see
|
||||
<xref linkend="scan">). If you just run <command>inc</> with no
|
||||
arguments it will look on your computer for email that is supposed to
|
||||
be coming to you.</para>
|
||||
|
||||
<para>A lot of people like to use POP for grabbing their email. MH can do
|
||||
POP to grab your email. You will need to give <command>inc</> a few command
|
||||
line arguments.
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>inc -host mail.pop.org -user <replaceable>username</> -norpop</></screen>
|
||||
</informalexample>
|
||||
That tells <command>inc</> to go to <parameter>mail.pop.org</> to
|
||||
download your email, and that your username on their system is
|
||||
<replaceable>username</>. The <option>-norpop</option> option tells
|
||||
<command>inc</> to use plain POP3 for downloading your email. MH has
|
||||
support for a few different dialects of POP. More than likely you
|
||||
will never ever need to use them though. While you can do more
|
||||
complex things with inc such as audit files and scan format files
|
||||
this will get you going.</para>
|
||||
|
||||
<para>The <command>msgchk</> command is used to get information on
|
||||
whether or not you have new email. <command>msgchk</> takes the same
|
||||
<option>-host</option> and <option>-user</option> options that
|
||||
<command>inc</> takes.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="show">
|
||||
<title><command>show</>, <command>next</> and <command>prev</>—displaying and moving through email</title>
|
||||
|
||||
<para><command>show</> is to show a letter in your current folder.
|
||||
Like <command>inc</>, <command>show</> is a fairly straightforward
|
||||
command. If you just type <userinput>show</> and hit <keycap>return</>
|
||||
then it displays the current message. You can also give specific
|
||||
message numbers to show:
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>show 32 45 56</></screen>
|
||||
</informalexample>
|
||||
This would display message numbers 32, 45 and 56 right after each
|
||||
other. Unless you change the default behavior <command>show</>
|
||||
basically just does a <command>more</> on the email message.</para>
|
||||
|
||||
<para><command>next</> is used to move onto the next message and
|
||||
<command>prev</> will go to the previous message. Both commands have
|
||||
an implied <command>show</> command so that when you go to the next
|
||||
message it automatically displays it.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="scan">
|
||||
<title><command>scan</>—shows you a scan of your messages</title>
|
||||
|
||||
<para><command>scan</> will display a brief listing of the messages
|
||||
in your current folder. This is an example of what the
|
||||
<command>scan</> command will give you.
|
||||
<informalexample>
|
||||
<screen> 30+ 01/16 "Jordan K. Hubbar Re: FBSD 2.1<<> Do you want a library instead of
|
||||
31 01/16 Bruce Evans Re: location of bad144 table<<>> >It would appea
|
||||
32 01/16 "Jordan K. Hubbar Re: video is up<<> Anyway, mrouted won't run, ev
|
||||
33 01/16 Michael Smith Re: FBSD 2.1<<Nate Williams stands accused of sa</screen>
|
||||
</informalexample>
|
||||
Like just about everything in MH this display is very configurable.
|
||||
This is the typical default display. It gives you the message number,
|
||||
the date on the email, the sender, the subject line, and a sentence
|
||||
fragment from the very beginning of the email if it can fit it. The
|
||||
<literal>+</> means that message is the current message, so if you do
|
||||
a <command>show</> it will display that message.</para>
|
||||
|
||||
<para>One useful option for scan is the <option>-reverse</option>
|
||||
option. This will list your messages with the highest message number
|
||||
first and lowest message number last. Another useful option with
|
||||
<command>scan</> is to have it read from a file. If you want to scan
|
||||
your incoming mailbox on FreeBSD without having to <command>inc</> it
|
||||
you can do <command>scan -file
|
||||
/var/mail/<replaceable>username</></command>. This can be used with
|
||||
any file that is in the <database>mbox</> format.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="rmm">
|
||||
<title><command>rmm</> and <command>rmf</>—remove the current message or folder</title>
|
||||
|
||||
<para><command>rmm</> is used to remove a mail message. The default
|
||||
is typically to not actually remove the message but to rename the
|
||||
file to one that is ignored by the MH commands. You will need to
|
||||
through periodically and physically delete the <quote>removed</>
|
||||
messages.</para>
|
||||
|
||||
<para>The <command>rmf</> command is used to remove folders. This
|
||||
doesn't just rename the files but actually removes the from the hard
|
||||
drive so you should be careful when you use this command.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="samplereading">
|
||||
<title>A typical session of reading with MH</title>
|
||||
|
||||
<para>The first thing that you will want to do is <command>inc</>
|
||||
your new mail. So at a shell prompt just type in <command>inc</> and
|
||||
hit <keycap>return</>.
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>inc</>
|
||||
Incorporating new mail into inbox...
|
||||
|
||||
36+ 01/19 "Stephen L. Lange Request...<<Please remove me as contact for pind
|
||||
37 01/19 Matt Thomas Re: kern/950: Two PCI bridge chips fail (multipl
|
||||
38 01/19 "Amancio Hasty Jr Re: FreeBSD and VAT<<>>> Bill Fenner said: > In
|
||||
tempest%</screen>
|
||||
</informalexample>
|
||||
This shows you the new email that has been added to your mailbox. So
|
||||
the next thing to do is <command>show</> the email and move around.
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>show</>
|
||||
Received: by sashimi.wwa.com (Smail3.1.29.1 #2)
|
||||
id m0tdMZ2-001W2UC; Fri, 19 Jan 96 13:33 CST
|
||||
Date: Fri, 19 Jan 1996 13:33:31 -0600 (CST)
|
||||
From: "Stephen L. Lange" <stvlange@wwa.com>
|
||||
To: matt@garply.com
|
||||
Subject: Request...
|
||||
Message-Id: <Pine.BSD.3.91.960119133211.824A-100000@sashimi.wwa.com>
|
||||
Mime-Version: 1.0
|
||||
Content-Type: TEXT/PLAIN; charset=US-ASCII
|
||||
|
||||
|
||||
Please remove me as contact for pindat.com
|
||||
|
||||
tempest% <userinput>rmm</>
|
||||
tempest% <userinput>next</>
|
||||
Received: from localhost (localhost [127.0.0.1]) by whydos.lkg.dec.com (8.6.11/8
|
||||
.6.9) with SMTP id RAA24416; Fri, 19 Jan 1996 17:56:48 GMT
|
||||
Message-Id: <199601191756.RAA24416@whydos.lkg.dec.com>
|
||||
X-Authentication-Warning: whydos.lkg.dec.com: Host localhost didn't use HELO pro
|
||||
tocol
|
||||
To: hsu@clinet.fi
|
||||
Cc: hackers@FreeBSD.org
|
||||
Subject: Re: kern/950: Two PCI bridge chips fail (multiple multiport ethernet
|
||||
boards)
|
||||
In-Reply-To: Your message of "Fri, 19 Jan 1996 00:18:36 +0100."
|
||||
<199601182318.AA11772@Sysiphos>
|
||||
X-Mailer: exmh version 1.5omega 10/6/94
|
||||
Date: Fri, 19 Jan 1996 17:56:40 +0000
|
||||
From: Matt Thomas <matt@lkg.dec.com>
|
||||
Sender: owner-hackers@FreeBSD.org
|
||||
Precedence: bulk
|
||||
|
||||
|
||||
This is due to a typo in pcireg.h (to
|
||||
which I am probably the guilty party).</screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>The <command>rmm</> removed the current message and the
|
||||
<command>next</> command moved me on to the next message.
|
||||
Now if I wanted to look at ten most recent messages so I could read
|
||||
one of them here is what I would do:
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>scan last:10</>
|
||||
26 01/16 maddy Re: Testing some stuff<<yeah, well, Trinity has
|
||||
27 01/17 Automatic digest NET-HAPPENINGS Digest - 16 Jan 1996 to 17 Jan 19
|
||||
28 01/17 Evans A Criswell Re: Hey dude<<>From matt@tempest.garply.com Tue
|
||||
29 01/16 Karl Heuer need configure/make volunteers<<The FSF is looki
|
||||
30 01/18 Paul Stephanouk Re: [alt.religion.scientology] Raw Meat (humor)<
|
||||
31 01/18 Bill Lenherr Re: Linux NIS Solaris<<--- On Thu, 18 Jan 1996 1
|
||||
34 01/19 John Fieber Re: Stuff for the email section?<<On Fri, 19 Jan
|
||||
35 01/19 support@foo.garpl [garply.com #1138] parlor<<Hello. This is the Ne
|
||||
37+ 01/19 Matt Thomas Re: kern/950: Two PCI bridge chips fail (multipl
|
||||
38 01/19 "Amancio Hasty Jr Re: FreeBSD and VAT<<>>> Bill Fenner said: > In
|
||||
tempest%</screen>
|
||||
</informalexample>
|
||||
Then if I wanted to read message number 27 I would do a
|
||||
<userinput>show 27</> and it would be displayed. As you can probably
|
||||
tell from this sample session MH is pretty easy to use and looking
|
||||
through emails and displaying them is fairly intuitive and easy.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Folders and Mail Searching</title>
|
||||
|
||||
<para>Anybody who gets lots of email definitely wants to be able to
|
||||
prioritize, stamp, brief, de-brief, and number their emails in a
|
||||
variety of different ways. MH can do this better than just about
|
||||
anything. One thing that we haven't really talked about is the
|
||||
concept of folders. You have undoubtedly come across the folders
|
||||
concept using other email programs. MH has folders too. MH can even
|
||||
do sub-folders of a folder. One thing you should keep in mind with MH
|
||||
is that when you ran <command>inc</> for the first time and it asked
|
||||
you if it could create a <filename>Mail</> directory it began storing
|
||||
everything in that directory. If you look at that directory you will
|
||||
find a directory named <filename>inbox</>. The <filename>inbox</>
|
||||
directory houses all of your incoming mail that hasn't been thrown
|
||||
anywhere else.</para>
|
||||
|
||||
<para>Whenever you create a new folder a new directory is going to be
|
||||
created underneath your MH <filename>Mail</> directory, and messages
|
||||
in that folder are going to be stored in that directory. When new
|
||||
email comes in that new email is thrown into your <filename>inbox</>
|
||||
directory with a file name that is equivalent to the message number.
|
||||
So even if you didn't have any of the MH tools to read your email you
|
||||
could still use standard UNIX commands to munge around in those
|
||||
directories and just more your files. It's this simplicity that
|
||||
really gives you a lot of power with what you can do with your
|
||||
email.</para>
|
||||
|
||||
<para>Just as you can use message lists like <parameter>23 16 42</>
|
||||
with most MH commands there is a folder option you can specify with
|
||||
just about every MH command. If you do a <command>scan +freebsd</> it
|
||||
will scan your <filename>freebsd</> folder, and your current folder
|
||||
will be changed to <filename>freebsd</>. If you do a <command>show
|
||||
+freebsd 23 16 42</>, <command>show</> is going to switch to your
|
||||
<filename>freebsd</> folder and display messages 23, 16 and 42. So
|
||||
remember that <option>+<replaceable>folder</></> syntax. You will
|
||||
need to make sure you use it to make commands process different
|
||||
folders. Remember you default folder for mail is <filename>inbox</>
|
||||
so doing a <command>folder +inbox</> should always get you back to
|
||||
your mail. Of course, in MH's infinite flexibility this can be
|
||||
changed but most places have probably left it as
|
||||
<command>inbox</>.</para>
|
||||
|
||||
|
||||
<sect1>
|
||||
<title><command>pick</>—search email that matches certain criteria</title>
|
||||
|
||||
<para><command>pick</> is one of the more complex commands in the MH
|
||||
system. So you might want to read the
|
||||
<citerefentry><refentrytitle>pick</><manvolnum>1</></> man page for a
|
||||
more thorough understanding. At its simplest level you can do
|
||||
something like
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>pick -search pci</>
|
||||
15
|
||||
42
|
||||
55
|
||||
56
|
||||
57</screen>
|
||||
</informalexample>
|
||||
|
||||
This will tell <command>pick</> to look through every single line in
|
||||
every message in your current folder and tell you which message
|
||||
numbers it found the word <literal>pci</> in. You can then
|
||||
<command>show</> those messages and read them if you wish or
|
||||
<command>rmm</> them. You would have to specify something like
|
||||
<command>show 15 42 55-57</> to display them though. A slightly more
|
||||
useful thing to do is this:
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>pick -search pci -seq pick</>
|
||||
5 hits
|
||||
tempest% <userinput>show pick</></screen>
|
||||
</informalexample>
|
||||
This will show you the same messages you just didn't have to work as
|
||||
hard to do it. The <option>-seq</option> option is really an
|
||||
abbreviation of <option>-sequence</option> and <command>pick</> is
|
||||
just a sequence which contains the message numbers that matched. You
|
||||
can use sequences with just about any MH command. So you could have
|
||||
done an <command>rmm pick</> and all those messages would be removed
|
||||
instead. You sequence can be named anything. If you run pick again it
|
||||
will overwrite the old sequence if you use the same name.</para>
|
||||
|
||||
<para>Doing a <command>pick -search</command> can be a bit more time
|
||||
consuming than just searching for message from someone, or to
|
||||
someone. So <command>pick</> allows you to use the following
|
||||
predefined search criteria:
|
||||
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-to</option></term>
|
||||
<listitem>
|
||||
<para>search based upon who the message is to</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-cc</option></term>
|
||||
<listitem>
|
||||
<para>search based on who is in the cc list</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-from</option></term>
|
||||
<listitem>
|
||||
<para>search for who sent the message</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-subject</option></term>
|
||||
<listitem>
|
||||
<para>search for emails with this subject</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-date</option></term>
|
||||
<listitem>
|
||||
<para>find emails with a matching dat</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--<replaceable>component</replaceable></option></term>
|
||||
<listitem>
|
||||
<para>search for any other component in the header. (i.e.
|
||||
<option>--reply-to</> to find all emails with a certain reply-to in
|
||||
the header)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist></para>
|
||||
|
||||
<para>This allows you to do things like
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>pick -to freebsd-hackers@freebsd.org -seq hackers</></screen>
|
||||
</informalexample>
|
||||
to get a list of all the email send to the FreeBSD hackers mailing
|
||||
list. <command>pick</> also allows you to group these criteria in
|
||||
different ways using the following options:
|
||||
<itemizedlist>
|
||||
|
||||
<listitem>
|
||||
<para>… <option>-and</option> …</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>… <option>-or</option> &hellip</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><option>-not</option> …</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><option>-lbrace</option> … <option>-rbrace</option></para>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
These commands allow you to do things like
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>pick -to freebsd-hackers -and -cc freebsd-hackers</></screen>
|
||||
</informalexample>
|
||||
That will grab all the email in your inbox that was sent to
|
||||
freebsd-hackers or cc'd to that list. The brace options allow you to
|
||||
group search criteria together. This is sometimes very necessary as
|
||||
in the following example
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>pick -lbrace -to freebsd-hackers -and
|
||||
-not -cc freebsd-questions -rbrace -and -subject pci</></screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>Basically this says <quote>pick (to freebsd-hackers and not cc'd on
|
||||
freebsd-questions) and the subject is pci</quote>. It should look through your
|
||||
folder and find all messages sent to the freebsd-hackers list that
|
||||
aren't cc'd to the freebsd-questions list that contain something on
|
||||
pci in the subject line. Ordinarily you might have to worry about
|
||||
something called operator precedence. Remember in math how you
|
||||
evaluate from left to right and you do multiplication and division
|
||||
first and addition and subtraction second? MH has the same type of
|
||||
rules for <command>pick</>. It's fairly complex so you might want to study
|
||||
the man page. This document is just to help you get acquainted with
|
||||
MH.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title><command>folder</>, <command>folders</>, <command>refile</>—three useful programs for folder maintenance</title>
|
||||
|
||||
<para>There are three programs which are primarily just for
|
||||
manipulating your folders. The <command>folder</> program is used to
|
||||
switch between folders, pack them, and list them. At its simplest
|
||||
level you can do a <command>folder +<replaceable>newfolder</></> and
|
||||
you will be switched into <replaceable>newfolder</>. From there on
|
||||
out all your MH commands like <command>comp</>, <command>repl</>,
|
||||
<command>scan</>, and <command>show</> will act on that
|
||||
<command>newfolder</> folder.</para>
|
||||
|
||||
<para>Sometimes when you are reading and deleting messages you will
|
||||
develop <quote>holes</> in your folders. If you do a <command>scan</>
|
||||
you might just see messages 34, 35, 36, 43, 55, 56, 57, 80. If you do
|
||||
a <command>folder -pack</command> this will renumber all your
|
||||
messages so that there are no holes. It doesn't actually delete any
|
||||
messages though. So you may need to periodically go through and
|
||||
physically delete <command>rmm</>'d messages.</para>
|
||||
|
||||
<para>If you need statistics on your folders you can do a
|
||||
<command>folders</> or <command>folder -all</command> to list all
|
||||
your folders, how many messages they have, what the current message
|
||||
is in each one and so on. This line of stats it displays for all your
|
||||
folders is the same one you get when you change to a folder with
|
||||
<command>folder +foldername</>. A <command>folders</> command looks
|
||||
like this:
|
||||
<informalexample>
|
||||
<screen> Folder # of messages ( range ); cur msg (other files)
|
||||
announce has 1 message ( 1- 1).
|
||||
drafts has no messages.
|
||||
f-hackers has 43 messages ( 1- 43).
|
||||
f-questions has 16 messages ( 1- 16).
|
||||
inbox+ has 35 messages ( 1- 38); cur= 37.
|
||||
lists has 8 messages ( 1- 8).
|
||||
netfuture has 1 message ( 1- 1).
|
||||
out has 31 messages ( 1- 31).
|
||||
personal has 6 messages ( 1- 6).
|
||||
todo has 58 messages ( 1- 58); cur= 1.
|
||||
|
||||
TOTAL= 199 messages in 13 folders.
|
||||
</screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>The <command>refile</> command is what you use to move messages
|
||||
between folders. When you do something like <command>refile 23
|
||||
+netfuture</> message number 23 is moved into the
|
||||
<filename>netfuture</> folder. You could also do something like
|
||||
<command>refile 23 +netfuture/latest</> which would put message
|
||||
number 23 in a subfolder called <filename>latest</> under the
|
||||
<filename>netfuture</> folder. If you want to keep a message in the
|
||||
current folder and link it you can do a <command>refile -link 23
|
||||
+netfuture</command> which would keep 23 in your current
|
||||
<filename>inbox</> but also list in your <filename>netfuture</>
|
||||
folder. You are probably beginning to realize some of the really
|
||||
powerful things you can do with MH.</para>
|
||||
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Sending Mail</title>
|
||||
|
||||
<para>Email is a two way street for most people so you want to be
|
||||
able to send something back. The way MH handles sending mail can be a
|
||||
bit difficult to follow at first, but it allows for incredible
|
||||
flexibility. The first thing MH does is to copy a components file
|
||||
into your outgoing email. A components file is basically a skeleton
|
||||
email letter with stuff like the To: and Subject: headers already in
|
||||
it. You are then sent into your editor where you fill in the header
|
||||
information and then type the body of your message below the dashed
|
||||
lines in the message. Then to the <command>whatnow</> program. When
|
||||
you are at the <prompt>What now?</prompt> prompt you can tell it to
|
||||
<command>send</>, <command>list</>, <command>edit</>,
|
||||
<command>edit</>, <command>push</>, and <command>quit</>. Most of
|
||||
these commands are self-explanatory. So the message sending process
|
||||
involves copying a component file, editing your email, and then
|
||||
telling the <command>whatnow</> program what to do with your
|
||||
email.</para>
|
||||
|
||||
|
||||
<sect1>
|
||||
<title><command>comp</>, <command>forw</>, <command>reply</>—compose, forward or reply to a message to someone</title>
|
||||
|
||||
<para>The <command>comp</> program has a few useful command line
|
||||
options. The most important one to know right now is the
|
||||
<option>-editor</option> option. When MH is installed the default
|
||||
editor is usually a program called <command>prompter</> which comes
|
||||
with MH. It's not a very exciting editor and basically just gets the
|
||||
job done. So when you go to compose a message to someone you might
|
||||
want to use <command>comp -editor /usr/bin/vi/</> or <command>comp
|
||||
-editor /usr/local/bin/pico/</> instead. Once you have run
|
||||
<emphasis>comp</emphasis> you are in your editor and you see
|
||||
something that looks like this:
|
||||
<informalexample>
|
||||
<screen>To:
|
||||
cc:
|
||||
Subject:
|
||||
--------
|
||||
</screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>You need to put the person you are sending the mail to after the
|
||||
<literal>To:</> line. It works the same way for the other headers
|
||||
also, so you would need to put your subject after the
|
||||
<literal>Subject:</> line. Then you would just put the body of your
|
||||
message after the dashed lines. It may seem a bit simplistic since a
|
||||
lot of email programs have special requesters that ask you for this
|
||||
information but there really isn't any point to that. Plus this
|
||||
really gives you excellent flexibility.
|
||||
<informalexample>
|
||||
<screen>To:<userinput>freebsd-rave@freebsd.org</>
|
||||
cc:
|
||||
Subject:<userinput>And on the 8th day God created the FreeBSD core team</>
|
||||
--------
|
||||
<userinput>Wow this is an amazing operating system. Thanks!</></screen>
|
||||
</informalexample>
|
||||
You can now save this message and exit your editor. You will see the
|
||||
<prompt>What now?</> prompt and you can type in
|
||||
<userinput>send</> or <userinput>s</> and hit
|
||||
<keycap>return</>. Then the freebsd core team will receive their just
|
||||
rewards. As I mentioned earlier you can also use other commands, for
|
||||
example <command>quit</> if you don't want to send the
|
||||
message.</para>
|
||||
|
||||
<para>The <command>forw</> command is stunningly similar. The big
|
||||
difference being that the message you are forwarding is automatically
|
||||
included in the outgoing message. When you run <command>forw</> it
|
||||
will forward your current message. You can always tell it to forward
|
||||
something else by doing something like <command>forw 23</> and then
|
||||
message number 23 will be put in your outgoing message instead of the
|
||||
current message. Beyond those small differences <command>forw</>
|
||||
functions exactly the same as <command>comp</>. You go through the
|
||||
exact same message sending process.</para>
|
||||
|
||||
<para>The <command>repl</> command will reply to whatever your
|
||||
current message is, unless you give it a different message to reply
|
||||
to. <command>repl</> will do its best to go ahead and fill in some of
|
||||
the email headers already. So you will notice that the
|
||||
<literal>To:</> header already has the address of the recipient in
|
||||
there. Also the <literal>Subject:</> line will already be filled in.
|
||||
You then go about the normal message composition process and you are
|
||||
done. One useful command line option to know here is the
|
||||
<option>-cc</option> option. You can use <parameter>all</>,
|
||||
<parameter>to</>, <parameter>cc</>, <parameter>me</> after the
|
||||
<option>-cc</option> option to have <command>repl</> automatically
|
||||
add the various addresses to the cc list in the message. You have
|
||||
probably noticed that the original message isn't included. This is
|
||||
because most MH setups are configured to do this from the
|
||||
start.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title><filename>components</>, and <filename>replcomps</>—components files for <command>comp</> and <command>repl</></title>
|
||||
|
||||
<para>The <filename>components</> file is usually in
|
||||
<filename>/usr/local/lib/mh</filename>. You can copy that file into
|
||||
your MH Mail directory and edit to contain what you want it to
|
||||
contain. It is a fairly basic file. You have various email headers at
|
||||
the top, a dashed line and then nothing. The
|
||||
<command>comp</command> command just copies this
|
||||
<filename>components</> file and then edits it. You can add any
|
||||
kind of valid RFC822 header you want. For instance you could have
|
||||
something like this in your <filename>components</> file:
|
||||
<informalexample>
|
||||
<screen>To:
|
||||
Fcc: out
|
||||
Subject:
|
||||
X-Mailer: MH 6.8.3
|
||||
X-Home-Page: http://www.freebsd.org/
|
||||
-------</screen>
|
||||
</informalexample>
|
||||
|
||||
MH would then copy this components file and throw you into your
|
||||
editor. The <filename>components</> file is fairly simple. If you
|
||||
wanted to have a signature on those messages you would just put your
|
||||
signature in that <filename>components</> file.</para>
|
||||
|
||||
<para>The <filename>replcomps</> file is a bit more complex. The default
|
||||
<filename>replcomps</> looks like this:
|
||||
<informalexample>
|
||||
<screen>%(lit)%(formataddr %<{reply-to}%?{from}%?{sender}%?{return-path}%>)\
|
||||
%<(nonnull)%(void(width))%(putaddr To: )\n%>\
|
||||
%(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\
|
||||
%<(nonnull)%(void(width))%(putaddr cc: )\n%>\
|
||||
%<{fcc}Fcc: %{fcc}\n%>\
|
||||
%<{subject}Subject: Re: %{subject}\n%>\
|
||||
%<{date}In-reply-to: Your message of "\
|
||||
%<(nodate{date})%{date}%|%(pretty{date})%>."%<{message-id}
|
||||
%{message-id}%>\n%>\
|
||||
--------
|
||||
</screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>It's in the same basic format as the <filename>components</> file but
|
||||
it contains quite a few extra formatting codes. The
|
||||
<literal>%(lit)</> command makes room for the address. The
|
||||
<literal>%(formataddr</> is a function that returns a proper email
|
||||
address. The next part is <literal>%<</literal> which means if and
|
||||
the <literal>{reply-to}</> means the reply-to field in the original
|
||||
message. So that might be translated this way:
|
||||
<informalexample>
|
||||
<screen>%<<emphasis remap=bf>if</emphasis> {reply-to} <emphasis remap=bf>the original message has a reply-to</emphasis>
|
||||
then give that to formataddr, %? <emphasis remap=bf>else</emphasis> {from} <emphasis remap=bf>take the
|
||||
from address</emphasis>, %? <emphasis remap=bf>else</emphasis> {sender} <emphasis remap=bf>take the sender address</emphasis>, %?
|
||||
<emphasis remap=bf>else</emphasis> {return-path} <emphasis remap=bf>take the return-path from the original
|
||||
message</emphasis>, %> <emphasis remap=bf>endif</emphasis>.</screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>As you can tell MH formatting can get rather involved. You can
|
||||
probably decipher what most of the other functions and variables
|
||||
mean. All of the information on writing these format strings is in the
|
||||
MH-Format man page. The really nice thing is that once you have built
|
||||
your customized <filename>replcomps</> file you won't need to touch it
|
||||
again. No other email program really gives you the power and
|
||||
flexibility that MH gives you.</para>
|
||||
|
||||
</sect1>
|
||||
</chapter>
|
||||
</book>
|
|
@ -1,5 +1,5 @@
|
|||
DOC= mh
|
||||
SRCS= mh.sgml
|
||||
DOCS= mh.docb
|
||||
INDEXLINK= mh.html
|
||||
|
||||
.include <bsd.sgml.mk>
|
||||
.include "../../web.mk"
|
||||
|
||||
|
|
704
en_US.ISO_8859-1/articles/mh/article.sgml
Normal file
704
en_US.ISO_8859-1/articles/mh/article.sgml
Normal file
|
@ -0,0 +1,704 @@
|
|||
<!-- $FreeBSD$ -->
|
||||
<!-- FreeBSD Documentation Project -->
|
||||
|
||||
<!DOCTYPE BOOK PUBLIC "-//Davenport//DTD DocBook V3.0//EN">
|
||||
<book>
|
||||
|
||||
<bookinfo>
|
||||
<bookbiblio>
|
||||
<title>An MH Primer</title>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Matt</firstname>
|
||||
<surname>Midboe</surname>
|
||||
<affiliation>
|
||||
<address>
|
||||
<email>matt@garply.com</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author></authorgroup>
|
||||
|
||||
<pubdate>v1.0, 16 January 1996</pubdate>
|
||||
|
||||
<abstract><para>This document contains an introduction to using MH on
|
||||
FreeBSD</para></abstract>
|
||||
|
||||
</bookbiblio>
|
||||
</bookinfo>
|
||||
|
||||
<chapter id="mhintro">
|
||||
<title>Introduction</title>
|
||||
|
||||
<para>MH started back in 1977 at the RAND Corporation, where the
|
||||
initial philosophies behind MH were developed. MH isn't so much a
|
||||
monolithic email program but a philosophy about how best to develop
|
||||
tools for reading email. The MH developers have done a great job
|
||||
adhering to the <acronym>KISS</> principle: Keep It Simple Stupid.
|
||||
Rather than have one large program for reading, sending and handling
|
||||
email they have written specialized programs for each part of your
|
||||
email life. One might liken MH to the specialization that one finds
|
||||
in insects and nature. Each tool in MH does one thing, and does it
|
||||
very well.</para>
|
||||
|
||||
<para>Beyond just the various tools that one uses to handle their
|
||||
email MH has done an excellent job keeping the configuration of each
|
||||
of these tools consistent and uniform. In fact, if you are not quite
|
||||
sure how something is supposed to work or what the arguments for some
|
||||
command are supposed to be then you can generally guess and be right.
|
||||
Each MH command is consistent about how it handles reading the
|
||||
configuration files and how it takes arguments on the command line.
|
||||
One useful thing to remember is that you can always add a
|
||||
<option>-help</option> to the command to have it display the options
|
||||
for that command.</para>
|
||||
|
||||
<para>The first thing that you need to do is to make sure that you have
|
||||
installed the MH package on your FreeBSD machine. If you installed
|
||||
from CDROM you should be able to execute the following to load mh:
|
||||
<informalexample>
|
||||
<screen># <userinput>pkg_add /cdrom/packages/mh-6.8.3.tgz</></screen>
|
||||
</informalexample>
|
||||
You will notice that it created a <filename>/usr/local/lib/mh</>
|
||||
directory for you as well as adding several binaries to the
|
||||
<filename>/usr/local/bin</> directory. If you would prefer to compile
|
||||
it yourself then you can anonymous ftp it from <ulink
|
||||
URL="ftp://ftp.ics.uci.edu/">ftp.ics.uci.edu</ulink> or <ulink
|
||||
URL="ftp://louie.udel.edu/">louie.udel.edu</ulink>.</para>
|
||||
|
||||
<para>This primer is not a full comprehensive explanation of how MH
|
||||
works. This is just intended to get you started on the road to
|
||||
happier, faster mail reading. You should read the man pages for the
|
||||
various commands. Also you might want to read the <ulink
|
||||
URL="news:comp.mail.mh">comp.mail.mh</ulink> newsgroup. Also you can
|
||||
read the <ulink
|
||||
URL="http://www.cis.ohio-state.edu/hypertext/faq/usenet/mh-faq/part1/faq.html">FAQ
|
||||
for MH</ulink>. The best resource for MH is the O'Reilly and Associates book
|
||||
written by Jerry Peek.</para>
|
||||
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Reading Mail</title>
|
||||
|
||||
<para>This section covers how to use <command>inc</>,
|
||||
<command>show</>, <command>scan</>, <command>next</>,
|
||||
<command>prev</>, <command>rmm</>, <command>rmf</>, and
|
||||
<command>msgchk</>. One of the best things about MH is the
|
||||
consistent interface between programs. A few things to keep in mind
|
||||
when using these commands is how to specify message lists. In the
|
||||
case of <command>inc</> this doesn't really make any sense but with
|
||||
commands like <command>show</> it is useful to know. </para>
|
||||
|
||||
<para>A message list can consist of something like <parameter>23 20
|
||||
16</> which will act on messages 23, 20 and 16. This is fairly simple
|
||||
but you can do more useful things like <parameter>23-30</> which will
|
||||
act on all the messages between 23 and 30. You can also specify
|
||||
something like <parameter>cur:10</> which will act on the current
|
||||
message and the next 9 messages. The <parameter>cur</>,
|
||||
<parameter>last</>, and <parameter>first</> messages are special
|
||||
messages that refer to the current, last or first message in the
|
||||
folder.</para>
|
||||
|
||||
|
||||
<sect1 id="inc">
|
||||
<title><command>inc</>, <command>msgchk</>—read in your new email or check it</title>
|
||||
|
||||
<para>If you just type in <userinput>inc</> and hit <keycap>return</>
|
||||
you will be well on your way to getting started with MH. The first
|
||||
time you run <command>inc</> it will setup your account to use all
|
||||
the MH defaults and ask you about creating a Mail directory. If you
|
||||
have mail waiting to be downloaded you will see something that looks
|
||||
like:
|
||||
<informalexample>
|
||||
<screen> 29 01/15 Doug White Re: Another Failed to boot problem<<On Mon, 15 J
|
||||
30 01/16 "Jordan K. Hubbar Re: FBSD 2.1<<> Do you want a library instead of
|
||||
31 01/16 Bruce Evans Re: location of bad144 table<<>> >It would appea
|
||||
32 01/16 "Jordan K. Hubbar Re: video is up<<> Anyway, mrouted won't run, ev
|
||||
33 01/16 Michael Smith Re: FBSD 2.1<<Nate Williams stands accused of sa</screen>
|
||||
</informalexample>
|
||||
This is the same thing you will see from a <command>scan</> (see
|
||||
<xref linkend="scan">). If you just run <command>inc</> with no
|
||||
arguments it will look on your computer for email that is supposed to
|
||||
be coming to you.</para>
|
||||
|
||||
<para>A lot of people like to use POP for grabbing their email. MH can do
|
||||
POP to grab your email. You will need to give <command>inc</> a few command
|
||||
line arguments.
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>inc -host mail.pop.org -user <replaceable>username</> -norpop</></screen>
|
||||
</informalexample>
|
||||
That tells <command>inc</> to go to <parameter>mail.pop.org</> to
|
||||
download your email, and that your username on their system is
|
||||
<replaceable>username</>. The <option>-norpop</option> option tells
|
||||
<command>inc</> to use plain POP3 for downloading your email. MH has
|
||||
support for a few different dialects of POP. More than likely you
|
||||
will never ever need to use them though. While you can do more
|
||||
complex things with inc such as audit files and scan format files
|
||||
this will get you going.</para>
|
||||
|
||||
<para>The <command>msgchk</> command is used to get information on
|
||||
whether or not you have new email. <command>msgchk</> takes the same
|
||||
<option>-host</option> and <option>-user</option> options that
|
||||
<command>inc</> takes.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="show">
|
||||
<title><command>show</>, <command>next</> and <command>prev</>—displaying and moving through email</title>
|
||||
|
||||
<para><command>show</> is to show a letter in your current folder.
|
||||
Like <command>inc</>, <command>show</> is a fairly straightforward
|
||||
command. If you just type <userinput>show</> and hit <keycap>return</>
|
||||
then it displays the current message. You can also give specific
|
||||
message numbers to show:
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>show 32 45 56</></screen>
|
||||
</informalexample>
|
||||
This would display message numbers 32, 45 and 56 right after each
|
||||
other. Unless you change the default behavior <command>show</>
|
||||
basically just does a <command>more</> on the email message.</para>
|
||||
|
||||
<para><command>next</> is used to move onto the next message and
|
||||
<command>prev</> will go to the previous message. Both commands have
|
||||
an implied <command>show</> command so that when you go to the next
|
||||
message it automatically displays it.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="scan">
|
||||
<title><command>scan</>—shows you a scan of your messages</title>
|
||||
|
||||
<para><command>scan</> will display a brief listing of the messages
|
||||
in your current folder. This is an example of what the
|
||||
<command>scan</> command will give you.
|
||||
<informalexample>
|
||||
<screen> 30+ 01/16 "Jordan K. Hubbar Re: FBSD 2.1<<> Do you want a library instead of
|
||||
31 01/16 Bruce Evans Re: location of bad144 table<<>> >It would appea
|
||||
32 01/16 "Jordan K. Hubbar Re: video is up<<> Anyway, mrouted won't run, ev
|
||||
33 01/16 Michael Smith Re: FBSD 2.1<<Nate Williams stands accused of sa</screen>
|
||||
</informalexample>
|
||||
Like just about everything in MH this display is very configurable.
|
||||
This is the typical default display. It gives you the message number,
|
||||
the date on the email, the sender, the subject line, and a sentence
|
||||
fragment from the very beginning of the email if it can fit it. The
|
||||
<literal>+</> means that message is the current message, so if you do
|
||||
a <command>show</> it will display that message.</para>
|
||||
|
||||
<para>One useful option for scan is the <option>-reverse</option>
|
||||
option. This will list your messages with the highest message number
|
||||
first and lowest message number last. Another useful option with
|
||||
<command>scan</> is to have it read from a file. If you want to scan
|
||||
your incoming mailbox on FreeBSD without having to <command>inc</> it
|
||||
you can do <command>scan -file
|
||||
/var/mail/<replaceable>username</></command>. This can be used with
|
||||
any file that is in the <database>mbox</> format.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="rmm">
|
||||
<title><command>rmm</> and <command>rmf</>—remove the current message or folder</title>
|
||||
|
||||
<para><command>rmm</> is used to remove a mail message. The default
|
||||
is typically to not actually remove the message but to rename the
|
||||
file to one that is ignored by the MH commands. You will need to
|
||||
through periodically and physically delete the <quote>removed</>
|
||||
messages.</para>
|
||||
|
||||
<para>The <command>rmf</> command is used to remove folders. This
|
||||
doesn't just rename the files but actually removes the from the hard
|
||||
drive so you should be careful when you use this command.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="samplereading">
|
||||
<title>A typical session of reading with MH</title>
|
||||
|
||||
<para>The first thing that you will want to do is <command>inc</>
|
||||
your new mail. So at a shell prompt just type in <command>inc</> and
|
||||
hit <keycap>return</>.
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>inc</>
|
||||
Incorporating new mail into inbox...
|
||||
|
||||
36+ 01/19 "Stephen L. Lange Request...<<Please remove me as contact for pind
|
||||
37 01/19 Matt Thomas Re: kern/950: Two PCI bridge chips fail (multipl
|
||||
38 01/19 "Amancio Hasty Jr Re: FreeBSD and VAT<<>>> Bill Fenner said: > In
|
||||
tempest%</screen>
|
||||
</informalexample>
|
||||
This shows you the new email that has been added to your mailbox. So
|
||||
the next thing to do is <command>show</> the email and move around.
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>show</>
|
||||
Received: by sashimi.wwa.com (Smail3.1.29.1 #2)
|
||||
id m0tdMZ2-001W2UC; Fri, 19 Jan 96 13:33 CST
|
||||
Date: Fri, 19 Jan 1996 13:33:31 -0600 (CST)
|
||||
From: "Stephen L. Lange" <stvlange@wwa.com>
|
||||
To: matt@garply.com
|
||||
Subject: Request...
|
||||
Message-Id: <Pine.BSD.3.91.960119133211.824A-100000@sashimi.wwa.com>
|
||||
Mime-Version: 1.0
|
||||
Content-Type: TEXT/PLAIN; charset=US-ASCII
|
||||
|
||||
|
||||
Please remove me as contact for pindat.com
|
||||
|
||||
tempest% <userinput>rmm</>
|
||||
tempest% <userinput>next</>
|
||||
Received: from localhost (localhost [127.0.0.1]) by whydos.lkg.dec.com (8.6.11/8
|
||||
.6.9) with SMTP id RAA24416; Fri, 19 Jan 1996 17:56:48 GMT
|
||||
Message-Id: <199601191756.RAA24416@whydos.lkg.dec.com>
|
||||
X-Authentication-Warning: whydos.lkg.dec.com: Host localhost didn't use HELO pro
|
||||
tocol
|
||||
To: hsu@clinet.fi
|
||||
Cc: hackers@FreeBSD.org
|
||||
Subject: Re: kern/950: Two PCI bridge chips fail (multiple multiport ethernet
|
||||
boards)
|
||||
In-Reply-To: Your message of "Fri, 19 Jan 1996 00:18:36 +0100."
|
||||
<199601182318.AA11772@Sysiphos>
|
||||
X-Mailer: exmh version 1.5omega 10/6/94
|
||||
Date: Fri, 19 Jan 1996 17:56:40 +0000
|
||||
From: Matt Thomas <matt@lkg.dec.com>
|
||||
Sender: owner-hackers@FreeBSD.org
|
||||
Precedence: bulk
|
||||
|
||||
|
||||
This is due to a typo in pcireg.h (to
|
||||
which I am probably the guilty party).</screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>The <command>rmm</> removed the current message and the
|
||||
<command>next</> command moved me on to the next message.
|
||||
Now if I wanted to look at ten most recent messages so I could read
|
||||
one of them here is what I would do:
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>scan last:10</>
|
||||
26 01/16 maddy Re: Testing some stuff<<yeah, well, Trinity has
|
||||
27 01/17 Automatic digest NET-HAPPENINGS Digest - 16 Jan 1996 to 17 Jan 19
|
||||
28 01/17 Evans A Criswell Re: Hey dude<<>From matt@tempest.garply.com Tue
|
||||
29 01/16 Karl Heuer need configure/make volunteers<<The FSF is looki
|
||||
30 01/18 Paul Stephanouk Re: [alt.religion.scientology] Raw Meat (humor)<
|
||||
31 01/18 Bill Lenherr Re: Linux NIS Solaris<<--- On Thu, 18 Jan 1996 1
|
||||
34 01/19 John Fieber Re: Stuff for the email section?<<On Fri, 19 Jan
|
||||
35 01/19 support@foo.garpl [garply.com #1138] parlor<<Hello. This is the Ne
|
||||
37+ 01/19 Matt Thomas Re: kern/950: Two PCI bridge chips fail (multipl
|
||||
38 01/19 "Amancio Hasty Jr Re: FreeBSD and VAT<<>>> Bill Fenner said: > In
|
||||
tempest%</screen>
|
||||
</informalexample>
|
||||
Then if I wanted to read message number 27 I would do a
|
||||
<userinput>show 27</> and it would be displayed. As you can probably
|
||||
tell from this sample session MH is pretty easy to use and looking
|
||||
through emails and displaying them is fairly intuitive and easy.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Folders and Mail Searching</title>
|
||||
|
||||
<para>Anybody who gets lots of email definitely wants to be able to
|
||||
prioritize, stamp, brief, de-brief, and number their emails in a
|
||||
variety of different ways. MH can do this better than just about
|
||||
anything. One thing that we haven't really talked about is the
|
||||
concept of folders. You have undoubtedly come across the folders
|
||||
concept using other email programs. MH has folders too. MH can even
|
||||
do sub-folders of a folder. One thing you should keep in mind with MH
|
||||
is that when you ran <command>inc</> for the first time and it asked
|
||||
you if it could create a <filename>Mail</> directory it began storing
|
||||
everything in that directory. If you look at that directory you will
|
||||
find a directory named <filename>inbox</>. The <filename>inbox</>
|
||||
directory houses all of your incoming mail that hasn't been thrown
|
||||
anywhere else.</para>
|
||||
|
||||
<para>Whenever you create a new folder a new directory is going to be
|
||||
created underneath your MH <filename>Mail</> directory, and messages
|
||||
in that folder are going to be stored in that directory. When new
|
||||
email comes in that new email is thrown into your <filename>inbox</>
|
||||
directory with a file name that is equivalent to the message number.
|
||||
So even if you didn't have any of the MH tools to read your email you
|
||||
could still use standard UNIX commands to munge around in those
|
||||
directories and just more your files. It's this simplicity that
|
||||
really gives you a lot of power with what you can do with your
|
||||
email.</para>
|
||||
|
||||
<para>Just as you can use message lists like <parameter>23 16 42</>
|
||||
with most MH commands there is a folder option you can specify with
|
||||
just about every MH command. If you do a <command>scan +freebsd</> it
|
||||
will scan your <filename>freebsd</> folder, and your current folder
|
||||
will be changed to <filename>freebsd</>. If you do a <command>show
|
||||
+freebsd 23 16 42</>, <command>show</> is going to switch to your
|
||||
<filename>freebsd</> folder and display messages 23, 16 and 42. So
|
||||
remember that <option>+<replaceable>folder</></> syntax. You will
|
||||
need to make sure you use it to make commands process different
|
||||
folders. Remember you default folder for mail is <filename>inbox</>
|
||||
so doing a <command>folder +inbox</> should always get you back to
|
||||
your mail. Of course, in MH's infinite flexibility this can be
|
||||
changed but most places have probably left it as
|
||||
<command>inbox</>.</para>
|
||||
|
||||
|
||||
<sect1>
|
||||
<title><command>pick</>—search email that matches certain criteria</title>
|
||||
|
||||
<para><command>pick</> is one of the more complex commands in the MH
|
||||
system. So you might want to read the
|
||||
<citerefentry><refentrytitle>pick</><manvolnum>1</></> man page for a
|
||||
more thorough understanding. At its simplest level you can do
|
||||
something like
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>pick -search pci</>
|
||||
15
|
||||
42
|
||||
55
|
||||
56
|
||||
57</screen>
|
||||
</informalexample>
|
||||
|
||||
This will tell <command>pick</> to look through every single line in
|
||||
every message in your current folder and tell you which message
|
||||
numbers it found the word <literal>pci</> in. You can then
|
||||
<command>show</> those messages and read them if you wish or
|
||||
<command>rmm</> them. You would have to specify something like
|
||||
<command>show 15 42 55-57</> to display them though. A slightly more
|
||||
useful thing to do is this:
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>pick -search pci -seq pick</>
|
||||
5 hits
|
||||
tempest% <userinput>show pick</></screen>
|
||||
</informalexample>
|
||||
This will show you the same messages you just didn't have to work as
|
||||
hard to do it. The <option>-seq</option> option is really an
|
||||
abbreviation of <option>-sequence</option> and <command>pick</> is
|
||||
just a sequence which contains the message numbers that matched. You
|
||||
can use sequences with just about any MH command. So you could have
|
||||
done an <command>rmm pick</> and all those messages would be removed
|
||||
instead. You sequence can be named anything. If you run pick again it
|
||||
will overwrite the old sequence if you use the same name.</para>
|
||||
|
||||
<para>Doing a <command>pick -search</command> can be a bit more time
|
||||
consuming than just searching for message from someone, or to
|
||||
someone. So <command>pick</> allows you to use the following
|
||||
predefined search criteria:
|
||||
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-to</option></term>
|
||||
<listitem>
|
||||
<para>search based upon who the message is to</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-cc</option></term>
|
||||
<listitem>
|
||||
<para>search based on who is in the cc list</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-from</option></term>
|
||||
<listitem>
|
||||
<para>search for who sent the message</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-subject</option></term>
|
||||
<listitem>
|
||||
<para>search for emails with this subject</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-date</option></term>
|
||||
<listitem>
|
||||
<para>find emails with a matching dat</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--<replaceable>component</replaceable></option></term>
|
||||
<listitem>
|
||||
<para>search for any other component in the header. (i.e.
|
||||
<option>--reply-to</> to find all emails with a certain reply-to in
|
||||
the header)</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist></para>
|
||||
|
||||
<para>This allows you to do things like
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>pick -to freebsd-hackers@freebsd.org -seq hackers</></screen>
|
||||
</informalexample>
|
||||
to get a list of all the email send to the FreeBSD hackers mailing
|
||||
list. <command>pick</> also allows you to group these criteria in
|
||||
different ways using the following options:
|
||||
<itemizedlist>
|
||||
|
||||
<listitem>
|
||||
<para>… <option>-and</option> …</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>… <option>-or</option> &hellip</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><option>-not</option> …</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><option>-lbrace</option> … <option>-rbrace</option></para>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
These commands allow you to do things like
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>pick -to freebsd-hackers -and -cc freebsd-hackers</></screen>
|
||||
</informalexample>
|
||||
That will grab all the email in your inbox that was sent to
|
||||
freebsd-hackers or cc'd to that list. The brace options allow you to
|
||||
group search criteria together. This is sometimes very necessary as
|
||||
in the following example
|
||||
<informalexample>
|
||||
<screen>tempest% <userinput>pick -lbrace -to freebsd-hackers -and
|
||||
-not -cc freebsd-questions -rbrace -and -subject pci</></screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>Basically this says <quote>pick (to freebsd-hackers and not cc'd on
|
||||
freebsd-questions) and the subject is pci</quote>. It should look through your
|
||||
folder and find all messages sent to the freebsd-hackers list that
|
||||
aren't cc'd to the freebsd-questions list that contain something on
|
||||
pci in the subject line. Ordinarily you might have to worry about
|
||||
something called operator precedence. Remember in math how you
|
||||
evaluate from left to right and you do multiplication and division
|
||||
first and addition and subtraction second? MH has the same type of
|
||||
rules for <command>pick</>. It's fairly complex so you might want to study
|
||||
the man page. This document is just to help you get acquainted with
|
||||
MH.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title><command>folder</>, <command>folders</>, <command>refile</>—three useful programs for folder maintenance</title>
|
||||
|
||||
<para>There are three programs which are primarily just for
|
||||
manipulating your folders. The <command>folder</> program is used to
|
||||
switch between folders, pack them, and list them. At its simplest
|
||||
level you can do a <command>folder +<replaceable>newfolder</></> and
|
||||
you will be switched into <replaceable>newfolder</>. From there on
|
||||
out all your MH commands like <command>comp</>, <command>repl</>,
|
||||
<command>scan</>, and <command>show</> will act on that
|
||||
<command>newfolder</> folder.</para>
|
||||
|
||||
<para>Sometimes when you are reading and deleting messages you will
|
||||
develop <quote>holes</> in your folders. If you do a <command>scan</>
|
||||
you might just see messages 34, 35, 36, 43, 55, 56, 57, 80. If you do
|
||||
a <command>folder -pack</command> this will renumber all your
|
||||
messages so that there are no holes. It doesn't actually delete any
|
||||
messages though. So you may need to periodically go through and
|
||||
physically delete <command>rmm</>'d messages.</para>
|
||||
|
||||
<para>If you need statistics on your folders you can do a
|
||||
<command>folders</> or <command>folder -all</command> to list all
|
||||
your folders, how many messages they have, what the current message
|
||||
is in each one and so on. This line of stats it displays for all your
|
||||
folders is the same one you get when you change to a folder with
|
||||
<command>folder +foldername</>. A <command>folders</> command looks
|
||||
like this:
|
||||
<informalexample>
|
||||
<screen> Folder # of messages ( range ); cur msg (other files)
|
||||
announce has 1 message ( 1- 1).
|
||||
drafts has no messages.
|
||||
f-hackers has 43 messages ( 1- 43).
|
||||
f-questions has 16 messages ( 1- 16).
|
||||
inbox+ has 35 messages ( 1- 38); cur= 37.
|
||||
lists has 8 messages ( 1- 8).
|
||||
netfuture has 1 message ( 1- 1).
|
||||
out has 31 messages ( 1- 31).
|
||||
personal has 6 messages ( 1- 6).
|
||||
todo has 58 messages ( 1- 58); cur= 1.
|
||||
|
||||
TOTAL= 199 messages in 13 folders.
|
||||
</screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>The <command>refile</> command is what you use to move messages
|
||||
between folders. When you do something like <command>refile 23
|
||||
+netfuture</> message number 23 is moved into the
|
||||
<filename>netfuture</> folder. You could also do something like
|
||||
<command>refile 23 +netfuture/latest</> which would put message
|
||||
number 23 in a subfolder called <filename>latest</> under the
|
||||
<filename>netfuture</> folder. If you want to keep a message in the
|
||||
current folder and link it you can do a <command>refile -link 23
|
||||
+netfuture</command> which would keep 23 in your current
|
||||
<filename>inbox</> but also list in your <filename>netfuture</>
|
||||
folder. You are probably beginning to realize some of the really
|
||||
powerful things you can do with MH.</para>
|
||||
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Sending Mail</title>
|
||||
|
||||
<para>Email is a two way street for most people so you want to be
|
||||
able to send something back. The way MH handles sending mail can be a
|
||||
bit difficult to follow at first, but it allows for incredible
|
||||
flexibility. The first thing MH does is to copy a components file
|
||||
into your outgoing email. A components file is basically a skeleton
|
||||
email letter with stuff like the To: and Subject: headers already in
|
||||
it. You are then sent into your editor where you fill in the header
|
||||
information and then type the body of your message below the dashed
|
||||
lines in the message. Then to the <command>whatnow</> program. When
|
||||
you are at the <prompt>What now?</prompt> prompt you can tell it to
|
||||
<command>send</>, <command>list</>, <command>edit</>,
|
||||
<command>edit</>, <command>push</>, and <command>quit</>. Most of
|
||||
these commands are self-explanatory. So the message sending process
|
||||
involves copying a component file, editing your email, and then
|
||||
telling the <command>whatnow</> program what to do with your
|
||||
email.</para>
|
||||
|
||||
|
||||
<sect1>
|
||||
<title><command>comp</>, <command>forw</>, <command>reply</>—compose, forward or reply to a message to someone</title>
|
||||
|
||||
<para>The <command>comp</> program has a few useful command line
|
||||
options. The most important one to know right now is the
|
||||
<option>-editor</option> option. When MH is installed the default
|
||||
editor is usually a program called <command>prompter</> which comes
|
||||
with MH. It's not a very exciting editor and basically just gets the
|
||||
job done. So when you go to compose a message to someone you might
|
||||
want to use <command>comp -editor /usr/bin/vi/</> or <command>comp
|
||||
-editor /usr/local/bin/pico/</> instead. Once you have run
|
||||
<emphasis>comp</emphasis> you are in your editor and you see
|
||||
something that looks like this:
|
||||
<informalexample>
|
||||
<screen>To:
|
||||
cc:
|
||||
Subject:
|
||||
--------
|
||||
</screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>You need to put the person you are sending the mail to after the
|
||||
<literal>To:</> line. It works the same way for the other headers
|
||||
also, so you would need to put your subject after the
|
||||
<literal>Subject:</> line. Then you would just put the body of your
|
||||
message after the dashed lines. It may seem a bit simplistic since a
|
||||
lot of email programs have special requesters that ask you for this
|
||||
information but there really isn't any point to that. Plus this
|
||||
really gives you excellent flexibility.
|
||||
<informalexample>
|
||||
<screen>To:<userinput>freebsd-rave@freebsd.org</>
|
||||
cc:
|
||||
Subject:<userinput>And on the 8th day God created the FreeBSD core team</>
|
||||
--------
|
||||
<userinput>Wow this is an amazing operating system. Thanks!</></screen>
|
||||
</informalexample>
|
||||
You can now save this message and exit your editor. You will see the
|
||||
<prompt>What now?</> prompt and you can type in
|
||||
<userinput>send</> or <userinput>s</> and hit
|
||||
<keycap>return</>. Then the freebsd core team will receive their just
|
||||
rewards. As I mentioned earlier you can also use other commands, for
|
||||
example <command>quit</> if you don't want to send the
|
||||
message.</para>
|
||||
|
||||
<para>The <command>forw</> command is stunningly similar. The big
|
||||
difference being that the message you are forwarding is automatically
|
||||
included in the outgoing message. When you run <command>forw</> it
|
||||
will forward your current message. You can always tell it to forward
|
||||
something else by doing something like <command>forw 23</> and then
|
||||
message number 23 will be put in your outgoing message instead of the
|
||||
current message. Beyond those small differences <command>forw</>
|
||||
functions exactly the same as <command>comp</>. You go through the
|
||||
exact same message sending process.</para>
|
||||
|
||||
<para>The <command>repl</> command will reply to whatever your
|
||||
current message is, unless you give it a different message to reply
|
||||
to. <command>repl</> will do its best to go ahead and fill in some of
|
||||
the email headers already. So you will notice that the
|
||||
<literal>To:</> header already has the address of the recipient in
|
||||
there. Also the <literal>Subject:</> line will already be filled in.
|
||||
You then go about the normal message composition process and you are
|
||||
done. One useful command line option to know here is the
|
||||
<option>-cc</option> option. You can use <parameter>all</>,
|
||||
<parameter>to</>, <parameter>cc</>, <parameter>me</> after the
|
||||
<option>-cc</option> option to have <command>repl</> automatically
|
||||
add the various addresses to the cc list in the message. You have
|
||||
probably noticed that the original message isn't included. This is
|
||||
because most MH setups are configured to do this from the
|
||||
start.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title><filename>components</>, and <filename>replcomps</>—components files for <command>comp</> and <command>repl</></title>
|
||||
|
||||
<para>The <filename>components</> file is usually in
|
||||
<filename>/usr/local/lib/mh</filename>. You can copy that file into
|
||||
your MH Mail directory and edit to contain what you want it to
|
||||
contain. It is a fairly basic file. You have various email headers at
|
||||
the top, a dashed line and then nothing. The
|
||||
<command>comp</command> command just copies this
|
||||
<filename>components</> file and then edits it. You can add any
|
||||
kind of valid RFC822 header you want. For instance you could have
|
||||
something like this in your <filename>components</> file:
|
||||
<informalexample>
|
||||
<screen>To:
|
||||
Fcc: out
|
||||
Subject:
|
||||
X-Mailer: MH 6.8.3
|
||||
X-Home-Page: http://www.freebsd.org/
|
||||
-------</screen>
|
||||
</informalexample>
|
||||
|
||||
MH would then copy this components file and throw you into your
|
||||
editor. The <filename>components</> file is fairly simple. If you
|
||||
wanted to have a signature on those messages you would just put your
|
||||
signature in that <filename>components</> file.</para>
|
||||
|
||||
<para>The <filename>replcomps</> file is a bit more complex. The default
|
||||
<filename>replcomps</> looks like this:
|
||||
<informalexample>
|
||||
<screen>%(lit)%(formataddr %<{reply-to}%?{from}%?{sender}%?{return-path}%>)\
|
||||
%<(nonnull)%(void(width))%(putaddr To: )\n%>\
|
||||
%(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\
|
||||
%<(nonnull)%(void(width))%(putaddr cc: )\n%>\
|
||||
%<{fcc}Fcc: %{fcc}\n%>\
|
||||
%<{subject}Subject: Re: %{subject}\n%>\
|
||||
%<{date}In-reply-to: Your message of "\
|
||||
%<(nodate{date})%{date}%|%(pretty{date})%>."%<{message-id}
|
||||
%{message-id}%>\n%>\
|
||||
--------
|
||||
</screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>It's in the same basic format as the <filename>components</> file but
|
||||
it contains quite a few extra formatting codes. The
|
||||
<literal>%(lit)</> command makes room for the address. The
|
||||
<literal>%(formataddr</> is a function that returns a proper email
|
||||
address. The next part is <literal>%<</literal> which means if and
|
||||
the <literal>{reply-to}</> means the reply-to field in the original
|
||||
message. So that might be translated this way:
|
||||
<informalexample>
|
||||
<screen>%<<emphasis remap=bf>if</emphasis> {reply-to} <emphasis remap=bf>the original message has a reply-to</emphasis>
|
||||
then give that to formataddr, %? <emphasis remap=bf>else</emphasis> {from} <emphasis remap=bf>take the
|
||||
from address</emphasis>, %? <emphasis remap=bf>else</emphasis> {sender} <emphasis remap=bf>take the sender address</emphasis>, %?
|
||||
<emphasis remap=bf>else</emphasis> {return-path} <emphasis remap=bf>take the return-path from the original
|
||||
message</emphasis>, %> <emphasis remap=bf>endif</emphasis>.</screen>
|
||||
</informalexample></para>
|
||||
|
||||
<para>As you can tell MH formatting can get rather involved. You can
|
||||
probably decipher what most of the other functions and variables
|
||||
mean. All of the information on writing these format strings is in the
|
||||
MH-Format man page. The really nice thing is that once you have built
|
||||
your customized <filename>replcomps</> file you won't need to touch it
|
||||
again. No other email program really gives you the power and
|
||||
flexibility that MH gives you.</para>
|
||||
|
||||
</sect1>
|
||||
</chapter>
|
||||
</book>
|
|
@ -2,7 +2,6 @@
|
|||
<a href="../../"><img src="../../gifs/home.gif" alt="FreeBSD Home Page"
|
||||
border="0" align="right"></a>
|
||||
<address>
|
||||
<a href="../../mailto.html">www@freebsd.org</a><br>
|
||||
@@UPDATE@@
|
||||
<a href="../../mailto.html">www@freebsd.org</a>
|
||||
</address>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" [
|
||||
<!ENTITY base CDATA "..">
|
||||
<!ENTITY date "$Date: 1997-01-19 15:29:57 $">
|
||||
<!ENTITY date "$Date: 1997-01-19 21:30:13 $">
|
||||
<!ENTITY title "FreeBSD Tutorials">
|
||||
<!ENTITY % includes SYSTEM "../includes.sgml"> %includes;
|
||||
]>
|
||||
|
@ -15,9 +15,8 @@
|
|||
<ul>
|
||||
<li><a href="newuser/newuser.html">For People New to Both FreeBSD
|
||||
<em>and</em> Unix</a></li>
|
||||
<li><a href="mh/mh.html">An introduction to the MH mail software</a>
|
||||
(<a href="mh/mh.ps">postscript</a>,
|
||||
<a href="mh/mh-html.tar.gz">gzipd tar file</a>)</li>
|
||||
|
||||
<li><a href="mh/mh.html">An introduction to the MH mail software</a></li>
|
||||
|
||||
<li><a href="devel/devel.html">A User's Guide to FreeBSD Programming
|
||||
Tools</a></li>
|
||||
|
|
Loading…
Reference in a new issue