HP-UX Mailing Services Administrator's Guide
Mailing Services Overview
The mailx Utility
Chapter 122
The mailx Utility
mailx is an interactive message processing system. It provides a flexible
environment for sending and receiving messages electronically. mailx
provides commands to save, delete, and reply to messages.
You can use mailx to edit, review, and modify messages. By default,
incoming mail is stored in a standard file called a system mailbox,
unless you specify an alternate mailbox file using the -f option. As
incoming messages are read from the system mailbox, they are marked
to be moved to a secondary file for storage. When you exit from mailx,
these marked messages are moved to the secondary storage file. Hence
these messages are not displayed the next time mailx is invoked.
Messages remain in this file until removed explicitly.
During startup, mailx reads commands from a system-wide file,
/usr/share/lib/mailx.rc, to initialize certain parameters. It then
uses the personalized variables available in the user-specific startup file,
$HOME/mailrc. When you invoke mailx, a header summary of all the
messages is displayed, followed by a prompt indicating that mailx can
accept regular options. Each message is assigned with a sequential
number, and the first message is always marked by a > in the header
summary.
mailx operates in command mode when you read mail and in input mode
when you send mail. The behavior of mailx is governed by a set of
environment variables, flags, and valued parameters that you can enable
and disable using the set and unset options.
mailx provides a list of options, environment variables, and tilde escape
commands. You can use tilde escape commands only in input mode by
beginning a line with the tilde escape character (~). Environment
variables are internal mailx program variables, and can be imported
from the execution environment.
mailx provides native language support (NLS) for processing mails in
different languages. To enable NLS support for a language, the
respective language definition must exist in the HP-UX system. In an
NLS environment, mailx depends on the time zone information defined
in the mail header to display the date and time information. Table 1-2
lists the time zones currently supported by mailx.