Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

mh(1)  —  Commands

Digital

NAME

mh − introduction to MH

DESCRIPTION

MH is the name of a powerful message handling system.  Rather than being a single comprehensive program, MH consists of a collection of fairly simple single-purpose programs to send, receive, save, and retrieve messages.  Refer to the individual MH reference pages for descriptions of the programs that make up MH. 

Unlike mail, MH is not a closed system which must be explicitly run, and then exited when you wish to return to the shell.  Instead, you may freely intersperse MH commands with other shell commands.  This allows you to read and answer your mail while you have (for example) a compilation running, or are searching for a file or running programs to find an answer to someone’s question before replying to them. 

To get started using MH, add the directory /usr/bin/mh to your $PATH.  This is best done in one of the files .profile, .login, or .cshrc in your home directory.  Check the manual entry for the shell you use if you do not know how to do this.  Run the inc command.  If you have never used MH before, it creates the necessary default files and directories after asking you if you wish it to do so.  The inc command moves mail from your system maildrop into your MH +inbox folder.  Each message is converted to MH format, and stored as separate files in your +inbox folder until you have read it.  When you have read a message, you can refile it in another folder that you have created. 

Folders are directories in which messages are stored: the folders themselves are stored in your Mail directory.  See refile(1) and folder(1) for more details. 

For each message it processes, inc prints a one-line display.  The one-line display contains the From: field, the Subject: field, and as much of the first line of the message as it can accommodate.  The first message that inc processes becomes your current message.  All MH commands operate on the current message unless you have specified the msg argument. 

You need to run inc each time you wish to incorporate new mail into your +inbox folder. 

The scan command prints a list of the messages in your current folder. 

The commands show, next, and prev are used to read specific messages from the current folder.  Of these, show displays the current message.  You can also display a specific message by specifying its number.  In the following example, the mail system displays the contents of message number 10 in the current folder:

% show 10

The commands next and prev display the message numerically following and numerically preceding the current message, respectively.  In all cases, the message displayed becomes the current message.  If there is no current message, show may be called with an argument, or next may be used to advance to the first message.  The command rmm (remove message) deletes the current message. 

You can delete messages other than the current message by specifying the message number or numbers.  When you specify more than one message, you separate each message number by a space.  In the following example, messages 2, 4 and 6 in the current folder are deleted:

% rmm 2 4 6

The command repl is used to reply to a message.  It places you in the editor with a prototype response form.  While you are in the editor, you may view the item you are responding to by reading the file @. 

The comp command allows you to compose a message by putting you in the editor on a blank message header form, and then lets you send it. 

All the MH commands may be run with the single argument −help, which causes them to print a list of the arguments with which they may be invoked. 

Commands which take a message number as an argument ( also take one of the following keywords:

first The first message in the current folder. 

last The last message in the current folder. 

cur The current message in the current folder. 

prev The previous message in the current folder. 

next The next message in the current folder. 

Commands which take a range of message numbers, such as rmm, scan, or show, also take any of the following abbreviations:

num1-num2
Indicates all messages in the range num1 to num2, inclusive.  The specified range must contain at least one message. 

num:+n

num:-nUp to n messages beginning with (or ending with) message num.  The value of num may be any of the MH message keywords: first, prev, cur, next or last. 

first:n

prev:n

next:n

last:nThe first, previous, next or last n messages, if they exist. 

There are many other possibilities, such as creating multiple folders for different topics, and automatically refiling messages according to subject, source, destination, or content.  See the individual reference pages for more details of the rest of the MH commands. 

Following is a list of all the MH commands:

alex(1) extract addresses from message headers
ali(1) list mail aliases
anno(1) annotate messages
burst(1) explode digests into messages
comp(1) compose a message
dist(1) redistribute a message to additional addresses
folder(1) set/list current folder/message
folders(1) list all folders
forw(1) forward messages
inc(1) incorporate new mail
mark(1) mark messages
mhl(1) produce formatted listings of MH messages
mhmail(1) send or read mail
mhpath(1) print full pathnames of MH messages and folders
msgchk(1) check for messages
msh(1) MH shell
next(1) show the next message
packf(1) compress a folder into a single file
pick(1) select messages by content
prev(1) show the previous message
prompter(1) prompting editor front end
rcvstore(1) incorporate new mail asynchronously
refile(1) file messages in other folders
repl(1) reply to a message
rmf(1) remove folder
rmm(1) remove messages
scan(1) produce a one line per message scan listing
send(1) send a message
slocal(1) receive mail hooks
show(1) show (list) messages
sortm(1) sort messages
whatnow(1) prompting front-end for send
whom(1) report who will receive a message when it is sent
mh-alias(5) alias file for MH message system
mh-format(5) format file for MH message system
mh-mail(5) message format for MH message system
mh_profile(5) user customization for MH message system
mtstailor(5) system customization for MH
ap(8) parse addresses RFC 822-style
conflict(8) search for alias/password conflicts
dp(8) parse dates RFC 822-style
install-mh(8) initialize the MH environment
post(8) deliver a message

FILES

/usr/bin/mh
Directory containing commands

/usr/lib/mh
MH library

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026