The mailx utility shall conform to the Base Definitions volume of
POSIX.1‐2017, Section 12.2, Utility Syntax Guidelines.
The following options shall be supported. (Only the -s
subject
option shall be required on all systems. The other options are
required only on systems supporting the User Portability
Utilities option.)
-e
Test for the presence of mail in the system mailbox.
The mailx utility shall write nothing and exit with a
successful return code if there is mail to read.
-f
Read messages from the file named by the file operand
instead of the system mailbox. (See also folder
.) If
no file operand is specified, read messages from mbox
instead of the system mailbox.
-F
Record the message in a file named after the first
recipient. The name is the login-name portion of the
address found first on the To:
line in the mail header.
Overrides the record
variable, if set (see Internal
Variables in mailx).
-H
Write a header summary only.
-i
Ignore interrupts. (See also ignore
.)
-n
Do not initialize from the system default start-up
file. See the EXTENDED DESCRIPTION section.
-N
Do not write an initial header summary.
-s
subject
Set the Subject
header field to subject. All
characters in the subject string shall appear in the
delivered message. The results are unspecified if
subject is longer than {LINE_MAX} - 10 bytes or
contains a <newline>.
-u
user Read the system mailbox of the login name user. This
shall only be successful if the invoking user has
appropriate privileges to read the system mailbox of
that user.