Content-type: text/html Man page of mh

mh

Section: User Commands (1)
Index Return to Main Contents
 

NAME

mh, MH - Introduction to the MH system for handling mail  

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.

Unlike mail, MH is not a closed system that 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 reference page 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, the inc command creates the necessary default files and directories after asking you if you want 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. This command 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 can be run with only the -help option, which causes them to print a list of the parameters and options with which they can be used.

Commands that take a message number as an argument (scan, show, and repl, for example) also take one of the following keywords: Specifies the first message in the current folder. Specifies the last message in the current folder. Specifies the current message in the current folder. Specifies the previous message in the current folder. Specifies the next message in the current folder.

Commands that take a range of message numbers, such as rmm, scan, or show, also take any of the following abbreviations: Indicates all messages in the range num1 to num2, inclusive. The specified range must contain at least one message. Indicate up 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. Specify the first, previous, next, or last n messages, if they exist.

MH software offers many other options, such as creating multiple folders for different topics, and automatically refiling messages according to subject, source, destination, or content. The following MH reference pages provide information on the specified topics: Extracting addresses from message headers Listing mail aliases Annotating messages Exploding digests into messages Composing a message Redistributing a message to additional addresses Setting/listing the current folder/message Listing all folders Forwarding messages Incorporating new mail Marking messages Producing formatted listings of MH messages Sending or reading mail Printing full pathnames of MH messages and folders Checking for messages Running the MH shell Showing the next message Compressing a folder into a single file Selecting messages by content Showing the previous message Prompting editor front end Incorporating new mail asynchronously Filing messages in other folders Replying to a message Removing a folder Removing messages Producing a one line per message scan listing Sending a message Receiving mail hooks Showing (listing) messages Sorting messages Using the prompting front-end for send Reporting who will receive a message when it is sent Using the alias file for the MH message system Using the format file for the MH message system Using the message format file for the MH message system Using the user customization for the MH message system Using the systemwide customization for the MH message system Running the program that parses addresses in RFC 822-style Searching for alias/password conflicts Running the program that parses dates in RFC 822-style Initializing the MH environment for a system Running the backend processor for the send command
 

Internationalization (I18N) Features

The default mail interchange code in the United States is based on using only 7 bits of each byte to represent each character. To provide full support for European languages other than English, MH software must reserve the full 8 bits of each byte for character representation. Support for 8-bit code in mail is enabled by the system manager as part of the configuration process for worldwide support software.

In Asian countries, there are a variety of coded character sets (codesets) that are used for interchange of mail between systems and for processing by local applications. Most of these codesets require more than one byte to represent each character. For Asian languages, the MH software therefore supports codeset conversion of mail messages between the mail interchange codeset and the user's application codeset. For example, if the mail interchange codeset at sites in Japan is ISO-2022-JP and the user's application codeset is eucJP, the next command needs to convert the next message to eucJP before displaying the message. Otherwise, Japanese characters do not display correctly.

Codeset conversion is controlled through entries in various files, command options, and variable settings that are associated with MH software. The conversion is actually done by converters that reside in the /usr/lib/nls/loc/iconv directory. Each converter supports a single from_code and to_code conversion that is identified in the converter name. For example, the converter that supports conversion from the ISO-2022-JP mail interchange codeset to the eucJP user application codeset is named ISO-2022-JP_eucJP. Codeset conversion works only if converters are available for the mail interchange and user application codesets that apply to the message and if those converters are installed. (Converters are installed from optional language-specific subsets). Refer to the iconv_intro(5) reference page for more information about codeset conversion.

By default, to eliminate risk of data loss, the inc command stores incoming mail messages in mail folders without codeset conversion. In this case, the codeset conversion is performed later when you display or extract messages from mail folders. If you want codeset conversion to be performed at the time messages are stored in folders, you can specify the -conv option on the inc command line. To ensure correct codeset conversion in some Asian countries, you may need to use the inc -conv inshdr command when incoming messages do not include a Content-Type entry in the header. Refer to the inc(1) reference page for more information on the -conv option.

To include mail interchange codeset information in outgoing mail messages, the MH software adds new header lines. For example, if ISO-2022-JP is the mail interchange code, the following header lines are added to outgoing messages:

Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-2022-JP

For non-ISO codesets, the software adds the prefix ``X-'' to the codeset name for identification purposes. For example, if the codeset is eucJP, the following header lines are added to the message:

Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-eucJP

For incoming mail, MH software uses the following settings (in the order listed) to determine the mail interchange codeset: The value specified for charset in the Content-Type: header line, if present in the incoming message The default systemwide mail interchange codeset as specified in the /usr/lib/mail-codesets file

This file must be created by the system administrator and contains one line that is the name of the systemwide mail interchange codeset. For example:
ISO-2022-JP
When parsing the mail-codesets file, the MH software ignores comment lines (lines beginning with #), blank lines, and leading or trailing white space around the codeset name. The first line that is not a comment or blank line is assumed to specify the systemwide mail interchange codeset.

The MH software does not perform codeset conversion on incoming mail if neither of these settings specifies a codeset.

For outgoing mail, MH software uses the following settings (in the order listed) to determine the mail interchange codeset: The EXCODE environment variable The profile component excode defined in $HOME/.mh_profile The content of /usr/lib/mail-codesets

MH software determines the user application codeset from the codeset part of locale name settings for the following variables and file entries (listed in order of high to low precedence): The LC_ALL environment variable The LANG environment variable The profile component lang defined in $HOME/.mh_profile
 

RESTRICTIONS

You cannot create folder names that are made up of only digits.
 

FILES

Directory containing commands MH library


 

Index

NAME
DESCRIPTION
Internationalization (I18N) Features
RESTRICTIONS
FILES

This document was created by man2html, using the manual pages.
Time: 02:42:46 GMT, October 02, 2010