m

mailx(1)

mailx(1)

NAME

mailx - interactive message processing system

SYNOPSIS

Send mode:

mailx [-FUm][-ssubject ] [-raddress ] [-hnumber ] address ...

Receive mode:

mailx -e

mailx [-UHLiNn][-u user ]

mailx -f [-UHLiNn] [ ®lename ]

Obsolescent:

mailx [-f ®lename ] [-UHLiNn]

DESCRIPTION

mailx provides a comfortable, ¯exible environment for sending and receiving messages electronically. When reading mail, mailx provides commands to facilitate saving, deleting, and responding to messages. When sending mail, mailx allows editing, reviewing and other modi®cation of the message as it is created.

Incoming mail for each user is stored in a standard ®le called the system mailbox for that user. When using mailx to read messages, the system mailbox is used unless an alternate mailbox ®le is speci®ed by using the -foption with or without a speci®c ®lename. As incoming messages are read from the system mailbox, they are marked to be moved to a secondary ®le for storage (unless speci®c action is taken) so that the messages need not be seen again. This secondary ®le is called the mbox and is usually located in the user's HOME directory (see MBOX description under ENVIRONMENT VARIABLES below for a description of this ®le and other environment variables used by mailx). Messages remain in this ®le until speci®cally removed.

Command-line options start with a hyphen (-), and any other arguments are assumed to be destinations (recipients). If no recipients are speci®ed, mailx attempts to read messages from the system mailbox.

Recipient addresses speci®ed on the command line must total less than 1024 characters in length. You may declare an alias or group (see COMMANDS below) to specify a recipient address or list of addresses of up to 8191 characters, and use that alias or group name (though each address in the list must still be less than 1024 characters). If you wish to specify a list of recipient addresses of greater length than this, have your system administrator declare an alias or group in the system alias ®le /etc/mail/aliases and use that alias name instead.

Options

mailx recognizes the following command-line options:

 

-e

Test for presence of mail.

mailx prints nothing and exits with a successful return

 

code if there is mail

to read. Sometimes

used in login scripts such as

 

$HOME/.profile to check for mail during login.

-f

Read messages from ®lename instead of the user's system mailbox. If ®lename is not

 

speci®ed, the secondary mbox is used.

 

-F

Record the message in a ®le named after the ®rst recipient. Overrides the record

 

environment variable, if set.

 

-hnumber

The number of network "hops" made so far. This is provided for network software to

 

prevent in®nite delivery loops.

 

-H

Print header summary only.

 

-L

Print complete header information only.

 

-i

Ignore interrupts. Also see the description of the

ignore environment below.

-n

Do not initialize from the system default mailx.rc ®le.

-m

Do not add MIME header lines Mime Version, Content Type & Content Encoding to

 

the header information while sending mails.

 

Section 1498

 

− 1 −

HP-UX Release 11i: December 2000