mailx(1)

mailx(1)

-N

Do not print initial header summary.

-raddress

Pass address to network delivery software. All tilde commands are disabled.

-ssubject

Set the Subject header ®eld to subject.

-uuser

Read user's mailbox. Can be used only if read access to user's mailbox is not read pro-

 

tected.

-U

Convert UUCP-style addresses to Internet standards. Overrides the conv environ-

 

ment variable.

-d

Turn on debugging output. Neither particularly interesting nor recommended.

When reading mail, mailx operates in command mode. A header summary of the ®rst several messages is displayed, followed by a prompt indicating that mailx can accept regular commands (see COMMANDS below). When sending mail, mailx operates in input mode. If no subject is speci®ed on the command line, a prompt for the subject is printed. As the message is typed, mailx reads the message and stores it in a temporary ®le. Commands can be entered by beginning a line with the tilde (Ä) escape character followed by a single command letter and optional arguments. See TILDE ESCAPES for a summary of these commands.

The behavior of mailx at any given time is governed by a set of environment variables; ¯ags and valued parameters that are set and cleared by using the set and unset commands. See ENVIRONMENT VARIABLES below for a summary of these parameters.

Recipients listed on the command line can be of three types: login names, shell commands, or alias groups. Login names can be any network address, including mixed network addressing. If the recipient name begins with a pipe symbol (), the rest of the name is assumed to be a shell command to pipe the message through. This provides an automatic interface with any program that reads the standard input, such as lp (see lp(1)) for recording outgoing mail on paper. Alias groups are set by the alias command (see COMMANDS below) and are lists of recipients of any type.

Regular commands are of the form

[ command ] [ msglist ] [ arguments ]

If no command is speci®ed in command mode, print is assumed. In input mode, commands are recognized by the escape character (tilde unless rede®ned by the escape environment variable), and lines not treated as commands are treated as input for the message.

Each message is assigned a sequential number, and there is always the notion of a current message, marked by a > in the header summary. Many commands take an optional list of messages (msglist) to operate on, which defaults to the current message. A msglist is a list of message speci®cations separated by spaces. The message list can include:

nMessage number n.

. The current message.

^The ®rst undeleted message.

$

The last message.

*All messages.

n-mAn inclusive range of message numbers, n through m, where n is less than m.

user All messages from user.

/string All messages with string in the subject line (uppercase-lowercase differences are ignored).

:c

All messages of type c, where c is one of:

ddeleted messages

nnew messages

oold messages

rread messages

uunread messages

Note that the context of the command determines whether this type of message speci®cation makes sense.

HP-UX Release 11i: December 2000

− 2 −

Section 1499

m