mailx - send and receive mail
mailx [ -v ] [ -s subject ] [ address... ]
mailx [ -HiNn ] [ -F ] [ -u user ]
mailx -f [ -HiNn ] [ -F ] [ file ]
mailx is an interactive mail processing system, which has a command
syntax reminiscent of ed with lines replaced by messages.
Send Mode can be used by applications or users to send messages from the
text in standard input. Receive Mode is more oriented to interactive
users. Mail can be read and sent in this interactive mode.
When reading mail, mailx provides commands to facilitate saving, deleting
and responding to messages. When sending mail, mailx allows editing,
reviewing and other modification of the message as it is entered.
Incoming mail is stored in one or more unspecified locations for each
user, collectively called the system mailbox for that user. When mailx
is invoked in Receive Mode, the system mailbox is the default place to
find them. As messages are read, they will be marked to be moved to a
secondary file for storage, unless specific action is taken. This
secondary file is called the mbox and is normally located in the HOME
directory of the user. When the -f option is used to read mail messages
from secondary files, messages will be retained in those files unless
specifically removed. All three of these locations system mailbox, mbox
and secondary file are referred to in this section as simply
``mailboxes,'' unless more specific identification is required.
mailx conforms to the X/Open Commands and Utilities Specifications Issue
4, Version 2 document.
-e Test for the presence of mail in the system mailbox. The mailx
utility will 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
-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.
-H Write a header summary only.
-v flag puts mailx into verbose mode; the details of delivery are
displayed on the users terminal.
-i flag causes tty interrupt signals to be ignored. This is
particularly useful when using mailx on noisy phone lines.
-n flag inhibits the reading of /usr/lib/Mail.rc.
-N Do not write an initial header summary.
-u Read the system mailbox of the login name user. This will only be
successful if the invoking user has the appropriate privileges to
read the system mailbox of that user.
Sending mail. To send a message to one or more other people, mailx can
be invoked with arguments which are the names of people to send to. You
are then expected to type in your message, followed by an EOT (control-D)
at the beginning of a line. A subject may be specified on the command
line by using the -s flag. (Only the first argument after the -s flag is
used as a subject; be careful to quote subjects containing spaces.) The
section below, labeled Replying to or originating mail, describes some
features of mailx available to help you compose your letter.
Reading mail. In normal usage mailx is given no arguments. It checks
your mail out of your system mailbox, then prints out a one line summary
of each message there. The current message is initially the first
message (numbered 1) and can be printed using the print command (which
can be abbreviated p). You can move among the messages much as you move
between lines in ed, with the commands `+' and `-' moving backwards and
forwards, and simple numbers.
Disposing of mail. After examining a message you can delete (d) the
message or reply (r) to it. Deletion causes the mailx program to forget
about the message. This is not irreversible; the message can be
undeleted (u) by giving its number, or the mailx session can be aborted
by giving the exit (x) command. Deleted messages will, however, usually
disappear never to be seen again.
Specifying messages. Commands such as print delete and from can be given
a list of messages as an argument in order to apply to a number of
messages at once. This list of messages can be specified in one of three
mutually exclusive ways:
First, messages may be specified by message number. Thus ``delete 1 2''
deletes messages 1 and 2, while ``delete 1-5'' deletes messages 1 through
5. In conjunction with message numbers, the following special names may
also be used: The special name `^' addresses the first message, and `$'
addresses the last message.
Second, messages may be specified by sender's name, sender's name
substring or subject substring. You may supply a list of whitespace
separated message senders' names and/or message senders' names substrings
and/or message subject substrings to commands accepting message lists. A
message sender's name is a string of characters which must begin with an
alphabetic character, and must match exactly the sender's name in the
target message. A message sender's name substring is a `?' character
immediately followed (no whitespace) by a string of characters and
specifies all messages with a sender's name containing the character
string as a substring. A message subject is a `/' character immediately
followed (no whitespace) by a string of characters and specifies all
messages with a subject line containing the character string as a
substring. Examples: ``from foo'' lists all messages from ``foo''
exactly, while ``from /foo'' lists all messages with substring ``foo'' in
their subject lines and ``from ?foo'' lists all messages with substring
foo in their senders' names.
Third, the special name `*' can be used to address all messages. Thus the
command top which prints the first few lines of a message could be used
as ``top *'' to print the first few lines of all messages.
Replying to or originating mail. You can use the reply command to set up
a response to a message, sending it back to the person who it was from.
Text you then type in, up to an end-of-file, defines the contents of the
message. While you are composing a message, mailx treats lines beginning
with the character `~' specially. For instance, typing ``~m'' (alone on
a line) will place a copy of the current message into the response right
shifting it by a tabstop. Other escapes will set up subject fields, add
and delete recipients to the message and allow you to escape to an editor
to revise the message or to a shell to run some commands. (These options
are given in the summary below.)
Incorporating new mail. You can read new mail which has arrived during
the session by using the folder command to reread your system mailbox. A
convenient way to do this is to type the command ``folder %'' or
``fo %''. This will have the same effect as typing the quit command to
end the session (see below) and then re-invoking mailx with no arguments.
Ending a mail processing session. You can end a mailx session with the
quit (q) or exit (x) commands. If you use the quit command, messages
which have been examined will be moved to your mbox file, messages which
have been deleted are discarded, and unexamined messages are copied back
to your system mailbox. If you have used the -f option to read in the
contents of your mbox (or other file) for processing; when you quit,
mailx writes undeleted messages back to this file. In the event that
mailx cannot rewrite mbox (or other file) to write back messages, mailx
will print a message indicating the trouble and will not exit. This
gives you the option of trying to set things right. If things cannot be
set right, you can escape mailx by using the exit command described
If you use the exit command, mailx exits without making any modifications
to the mail file. Deleted messages will not be discarded.
Personal and systemwide distribution lists. It is also possible to
create a personal distribution lists so that, for instance, you can send
mail to ``cohorts'' and have it go to a group of people. Such lists can
be defined by placing a line like
alias cohorts bill ozalp jkf mark kridle@ucbcory
in the file .mailrc in your home directory. The current list of such
aliases can be displayed with the alias (a) command in mailx. System
wide distribution lists can be created by editing /usr/lib/Mail.rc (which
may contain other mailx commands such as set). An alias of the form
alias bob sauron!bob
will be ignored on the sauron system so that the same /usr/lib/Mail.rc or
~/.mailrc file may be used on several machines with correct behavior.
You may include a pathname in the distribution list, and mailx will
record outgoing messages in that file. It is preferable to place
pathnames and folders in the ``Bcc:'' list, to prevent recipients from
replying to a nonexistent filename.
Forwarding mail. Forwarding of mail is done via the .forward file
mechanism of the sendmai
manual page for details.
Signatures. A signature line (or lines) may be automatically appended to
the end of all outgoing letters by placing the text in the file
.lsignature, .rsignature, or .signature in your home directory. The file
.lsignature is used for local mail, that is the recipients specified do
not have `!' or `@' in their names (prior to aliasing) and the file
.rsignature is used for remote mail. If the appropriate one of these
does not exist, .signature is used for compatibility with previous
versions of mailx.
mailx has a number of options which can be set in the .mailrc file to
alter its behavior; thus ``set askcc'' enables the ``askcc'' feature.
(These options are summarized below.)
Each command is typed on a line by itself, and may take arguments
following the command word. The command need not be typed in its
entirety - the first command which matches the typed prefix is used. For
commands which take message lists as arguments, if no message list is
given, then the next message forward which satisfies the command's
requirements is used. If there are no messages forward of the current
message, the search proceeds backwards, and if there are no good messages
at all, mailx types ``No applicable messages'' and aborts the command.
! Executes the UNIX shell command which follows.
- Goes to the previous message and prints it out.
= Prints the current message number.
? If the qmarkishelp option is set (see below), this is a
synonym for the help command. Otherwise, ? indicates the
start of a sender's name substring message list (see
``Specifying messages'' above).
More (M) Like Print but invokes your pager.
New (N) Identical to the unread command.
Page (Pa) A synonym for More.
Print (P) Like print but also prints out ignored header fields. See
also print and ignore.
Reply (R) Reply to originator. Does not reply to other recipients
of the original message.
Respond (Res) A synonym for Reply
Type (T) Identical to the Print command.
Unread (U) Identical to the unread command.
alias (a) With no arguments, prints out all currently-defined
aliases. With one argument, prints out that alias. With
more than one argument, creates an new or changes an on old
alternates (alt) The alternates command is useful if you have accounts
on several machines. It can be used to inform mailx that the
listed addresses are really you. When you reply to messages,
mailx will not send a copy of the message to any of the
addresses listed on the alternates list. If the alternates
command is given with no argument, the current set of
alternate names is displayed.
chdir (cd) Changes the user's working directory to that specified,
if given. If no directory is given, then changes to the
contents of HOME will be used.
copy (c) The copy command does the same thing that save does,
except that it does not mark the messages it is used on for
deletion when you quit.
Copy (C) The Copy command does the same thing that copy does,
except that it uses the file named from the author of the
message to be saved.
delete (d) Takes a list of messages as argument and marks them all
as deleted. Deleted messages will not be saved in mbox, nor
will they be available for most other commands.
discard (di) A synonym for ignore (ig).
dp (also dt) Deletes the current message and prints the next
message. If there is no next message, mailx says ``at EOF.''
echo (ec) Takes a string and echos it to standard output.
edit (e) Takes a list of messages and points the text editor at
each one in turn. On return from the editor, the message is
read back in.
exit (ex or x) Effects an immediate return to the Shell without
modifying the user's system mailbox, his mbox file, or his
edit file in -f.
file (fi) The same as folder.
folder (fold) The folder command switches to a new mail file or
folder. With no arguments, it tells you which file you are
currently reading. If you give it an argument, it will write
out changes (such as deletions) you have made in the current
file and read in the new file. Some special conventions are
recognized for the name. @ means the current file in readonly
mode, $ means the current file, in read/write mode if
possible, # means the previous file, % means your system
mailbox, %user means user's system mailbox, & means your
~/mbox file, and +folder means a file in your folder
Issuing the command ``folder %'' while you are reading your
system mailbox is a convenient way to incorporate new mail
which has arrived during the session.
folders List the names of the folders in your folder directory.
followup (fo) Respond to a message, recording the response in a file
whose name is derived from the author of the message.
Overrides the record variable, if set. See also the save and
copy commands and outfolder.
Followup (F) Respond to the first message in the msglist, sending the
message to the author of each message in the msglist. The
subject line is taken from the first message and the response
is recorded in a file whose name is derived from the author
of the first message. See also the Save and Copy commands and
from (f) Takes a list of messages and prints their summary lines.
See the Specifying messages section above for examples of how
to use this command to list only the messages from a
particular person, or about a particular subject.
group (g) A synonym for alias.
hd Lists the message summary lines of all deleted messages.
These are the messages that have been deleted by the delete
command, but that have not yet been removed from the mailbox.
These messages may be undeleted by use of the undelete
headers (h) Lists the current group of message summary lines
(historically called "headers"). Summary lines are grouped
and displayed by windowfuls (as many lines as will fit in the
window). If there are more summary lines than will fit in
the current window, the z command can be used to scroll
through multiple summary line groups.
help (hel) Prints a brief summary of commands.
hold (ho, also preserve (pre)) Takes a message list and marks each
message therein to be saved in the user's system mailbox
instead of in mbox. Does not override the delete command.
ignore (ig) Add the list of header fields named to the ignored list.
Header fields in the ignore list are not printed on your
terminal when you print a message. This command is very handy
for suppression of certain machine-generated header fields.
The Type and Print commands can be used to print a message in
its entirety, including ignored fields. If ignore is executed
with no arguments, it lists the current set of ignored
list (li) Prints the list of all mailx commands.
mail (m) Takes as argument login names and distribution group
names and sends mail to those people.
mbox (mb) Indicate that a list of messages be sent to mbox in your
home directory when you quit. This is the default action for
messages if you do not have the hold option set. See MBOX.
more (mo) Like print but invokes your pager.
new Identical to the unread command
next (n like + or CR) Goes to the next message in sequence and
types it. With an argument list, types the next matching
page (pa) A synonym for more.
pipe or | (pi) Pipe the messages through the given command by invoking
the command interpreter specified by SHELL with two
arguments: c and command. (See also sh (-c.) The command
must be given as a single argument. Quoting, described
previously, can be used to accomplish this. If no arguments
are given, the current message will be piped through the
command specified by the value of the cmd variable. If the
page variable is set, a form-feed character will be inserted
after each message.
preserve (pre) A synonym for hold.
print or type
(p or t) Takes a message list and types out each message to
standard output. If crt is set, the messages longer than the
number of lines specified by the crt variable will be paged
through the command specified by the PAGER environment
quit (q) Terminates the session, saving all undeleted, unsaved
messages in the user's mbox file in his login directory,
preserving all messages marked with hold or preserve or never
referenced in his system mailbox, and removing all other
messages from his system mailbox. If new mail has arrived
during the session, the message ``You have new mail'' is
given. If given while editing a mailbox file with the -f
flag, then the edit file is rewritten. A return to the Shell
is effected, unless the rewrite of edit file fails, in which
case the user can escape with the exit command.
reply (r) A synonym for Reply.
replyall (ra or RA) Takes a message list and sends mail to the sender
and all recipients of the specified message. The default
message must not be deleted.
respond (res) A synonym for Reply.
save (s) Takes a message list and a filename and appends each
message in turn to the end of the file. The filename in
quotes, followed by the line count and character count is
echoed on the user's terminal. If filename does not already
exist it will be created. If filename begins with a ``|'' or
``!'' then it will be interpreted as a shell command and the
contents of the messages passed to it on standard input.
Save (S) Takes a message list and appends each message in a file
whose name is derived from the author of the first message.
See also the Copy, followup and Followup commands and
set (se) With no arguments, prints all variable values.
Otherwise, sets option. Arguments are of the form
``option=value'' or ``option.''
shell (sh) Invokes an interactive version of the shell.
size (si) Takes a message list and prints out the size in
characters of each message.
source (so) The source command reads mailx commands from a file.
top (to) Takes a message list and prints the top few lines of
each. The number of lines printed is controlled by the
variable toplines and defaults to five.
touch (tou) Takes a message list and causes each message therein to
be saved in either the user's system mailbox or in mbox
according to the state of the hold option.
type (t) A synonym for print.
undelete (u) Takes a message list and marks each one as not being
unread (unr or U) Takes a message list and marks each message as not
having been read. Also see the Unread command.
unset Takes a list of option names and discards their remembered
values; the inverse of set.
version (ve) Prints the version number of mailx that you are using.
visual (v) Takes a message list and invokes the display editor on
write (w) Like save except that the message header and the blank
line after the message body are not appended to the file.
Only the message body of each message is appended to the
xit (x) A synonym for exit.
z mailx presents message summary lines in windowfuls as
described under the header command. You can move mailx's
attention forward to the next window with the z command.
Also, you can move to the previous window by using z-.
Here is a summary of the tilde escapes, which are used when composing
messages to perform special functions. Tilde escapes are only recognized
at the beginning of lines. The name ``tilde escape'' is somewhat of a
misnomer since the actual escape character can be set via the escape
~! command Execute the indicated shell command, then return to the
~: command Execute the indicated mailx command, then return to the
~? Display the tilde escape help file.
~b name ... Add the given names to the list of blind carbon copy
~c name ... Add the given names to the list of carbon copy (``Cc:'')
~cm string Cause the string to become the current ``Comments:''
~d Read the file ``dead.letter'' from your home directory
into the message.
~E Invoke the text editor on the entire message collected so
far including the message header fields. The existing
message header fields will be displayed above a dashed
line and the existing message body will be displayed below
the dashed line. You are free to edit the message headers
and body at will, but you must be careful that the final
format of the headers conforms to the RFC 822 standard.
You must also take care that no blank lines appear within
the header section of the message and that you do not
remove the dashed line separating the message headers from
the message body. After the editing session is finished,
you may continue appending text to the message.
~e Invoke the text editor on the body of the message
collected so far. After the editing session is finished,
you may continue appending text to the message.
~eh Same as ~E above.
~en string Cause the string to become the current ``Encrypted:''
~f messages Read the named messages into the message being sent. If
no messages are specified, read in the current message.
~H Edit all standard message header fields by typing each one
in turn and allowing the user to append text to the end or
modify the field by using the current terminal erase and
~h Edit the basic message header fields (To:, Subject:, Cc:,
Bcc:) by typing each one in turn and allowing the user to
append text to the end or modify the field by using the
current terminal erase and kill characters.
~irt string Add the string to the ``In-Reply-To:'' list.
~k string Add the string to the ``Keywords:'' list.
~m messages Read the named messages into the message being sent
shifted right one tab. Note that if the mprefix option is
set (see below), the tab will be replaced with the
specified string. If no messages are specified, read the
~p Print out the message collected so far. First the message
header fields are displayed followed by a dashed line
separator, then the message body.
~q Abort the message being sent, copying the message to
``dead.letter'' in your home directory.
~r file Read the named file into the message.
~rf string Add the string to the ``References:'' list.
~rr [string] Cause a ``Return-Receipt-To:'' field to be added to the
message. If the string is specified, it will be added to
the list of recipients in the ``Return-Receipt-To:''
field. If the string is not specified and no ``ReturnReceipt-To:''
field exists in the message, one will be
created and your user name will be specified. If the
string is not specified and a ``Return-Receipt-To:'' field
already exists in the message, the entire field will be
If the ``Return-Receipt-To:'' header field is present when
the message is sent, and if the intervening mail delivery
system supports return receipts, a return receipt will be
sent to your mailbox when the message is successfully
delivered to each of the specified recipients.
~rt name ... Add the given names to the ``Reply-To:'' list.
~s string Cause the string to become the current ``Subject:'' field.
~t name ... Add the given names to the direct recipients (``To:'')
~V Invoke an alternate editor (defined by the VISUAL option)
on the entire message collected so far including the
message header fields. The existing message header fields
will be displayed above a dashed line and the existing
message body will be displayed below the dashed line. You
are free to edit the message headers and body at will, but
you must be careful that the final format of the headers
conforms to the RFC 822 standard. You must also take care
that no blank lines appear within the header section of
the message and that you do not remove the dashed line
separating the message headers from the message body.
After the editing session is finished, you may continue
appending text to the message.
~v Invoke an alternate editor (defined by the VISUAL option)
on the body of the message collected so far. Usually, the
alternate editor will be a screen editor. After you quit
the editor, you may resume appending text to the end of
~vh Same as ~V above.
~w file Write the message onto the named file.
~|command Pipe the message through the command as a filter. If the
command gives no output or terminates abnormally, retain
the original text of the message. The command fmt(1) is
often used as command to rejustify the message.
~~string Insert the string into the message prefaced by a single ~.
If you have changed the escape character, then you should
double that character in order to send it.
Options are controlled via the set and unset commands. Options may be
either binary, in which case it is only significant to see whether they
are set or not, or string, in which case the actual value is of interest.
The binary options include the following:
Replyall Swaps the behavior of the r/Reply/Respond and ra/Replyall
commands resulting in a more BSD-like interface.
append Causes messages saved in mbox to be appended to the end
rather than prepended. (This is set in /usr/lib/Mail.rc
on version 7 systems.)
ask/asksub Prompt for a subject line on outgoing mail if one is not
specified on the command line with the -s option. The ask
and asksub forms are synonyms; the system will refer to
asksub and noasksub in its messages, but will accept ask
and noask as user input to mean asksub and noasksub. It is
not possible to set both ask and noasksub, or noask and
asksub asksub, but no prompting will be done if standard
input is not a terminal.
askbcc Prompt for the blind copy list. The default is noaskbcc.
askcc Causes you to be prompted for additional carbon copy
recipients at the end of each message. Responding with a
newline indicates your satisfaction with the current list.
The default is noaskcc.
autoprint Causes the delete command to behave like dp - thus, after
deleting a message, the next one will be typed
bang Enable the special-case treatment of exclamation-marks (!)
in escape command lines; see the escape command. The
default is nobang, disabling the expansion of ! in the
command argument to the !command and the <!command escape.
cmd=command Set the default command to be invoked by the pipe command.
The default is nocmd.
crt=number Pipe messages having more than number lines through the
command specified by the value of the PAGER variable. The
default is nocrt. If it is set to null, the value is set
to the current window size.
debug Enable verbose diagnostics for debugging. Messages are not
delivered. The default is nodebug.
dot The binary option dot causes mailx to interpret a period
alone on a line as the terminator of a message you are
sending. When dot is set, a period on a line by itself
during message input from a terminal also signifies endof-file
(in addition to normal end-of-file). The default
is nodot. If ignoreeof is set (see below), a setting of
nodot will be ignored and the period is the only method to
terminate input mode.
flipr Reverse the meanings of the R and r commands. The default
hold This option is used to hold messages in the system mailbox
(instead of mbox ) by default.
ignore Causes interrupt signals from your terminal to be ignored
and echoed as @'s.
ignoreeof Ignore normal control-D during message input. Input can be
terminated only by entering a period (.) on a line by
itself or by the noignoreeof. See also dot above.
keep Prevents mailx from deleting empty mailboxes when you
keepsave If set, messages which are saved via the save command are
not deleted from the current mailbox automatically.
metoo Usually, when a group is expanded that contains the
sender, the sender is removed from the expansion. Setting
this option causes the sender to be included in the group.
outfolder Cause the files used to record outgoing messages to be
located in the directory specified by the folder variable
unless the pathname is absolute. The default is
nooutfolder. See the record variable.
noaskrolock Normally, when mailx encounters a mailfile which is readonly
locked, it interactively asks the user how he wants
to proceed. This option causes mailx to bypass the
interactive dialog and automatically open the mailfile in
read-only mode. In order to select a different automatic
behaviour, this option can be used as a valued option (see
noheader Suppresses the printing of message summary lines when
mailx is first invoked.
nosave Normally, when you abort a message with two RUBOUT, mailx
copies the partial letter to the file ``dead.letter'' in
your home directory. Setting the binary option nosave
page Insert a form-feed after each message sent through the
pipe created by the pipe command. The default is nopage.
prompt=string Set the command-mode prompt to string. If string is null
or if noprompt is set, no prompting will occur. The
default is to prompt with the string "? ". qmarkishelp If
set, ? becomes a synonym for the help command.
quiet Suppresses the printing of the version when mailx is first
showlast If this option is set at the time when mailx is first
invoked, and if no new or unread messages are present in
the system mailbox, mailx will display the last windowful
of summary lines first, and will set the current message
to be the last message in the mailfile. This option only
makes sense when used with the hold option described
above. The default is noquiet.
showmsize If this option is set, mailx will include the line count
and character count on the summary line for each message.
showto Causes mailx to display the recipient instead of sender
when displaying the summary line of a message for which
you were the sender (your user name appears in the From:
header field). This is useful when using mailx to browse
or edit a file of saved outgoing mail such as is created
when the record option is defined (see below).
verbose Setting the option verbose is the same as using the -v
flag on the command line. When mail runs in verbose mode,
the actual delivery of messages is displayed on the users
The following options have string values:
DEAD Determine the pathname of the file in which to save
partial messages in case of interrupts or delivery errors.
The default is dead.letter in the directory named by the
EDITOR Pathname of the text editor to use in the edit command and
and ~eh escapes. This defaults to the value of the EDITOR
HOME The pathname of your home directory. This defaults to the
value of the HOME environment variable.
LISTER Determine a string representing the command for writing
the contents of the folder directory to standard output
when the folders command is given. Any string acceptable
as a command_string operand to the sh -c command is valid.
If this variable is null or not set, the output command
will be ls. The default value is unset.
MAILRC Determine the pathname of the start-up file. The default
is .mailrc in the HOME directory.
MBOX Determine a pathname of the file to save messages from the
system mailbox that have been read. The exit command
overrides this function, as will saving the message
explicitly in another file. The default is mbox in the
directory named by the HOME variable.
PAGER Pathname of your pager to use in the More or more
commands, or if the crt option is selected. If not
defined, this defaults to the value of the PAGER
environment variable. If the PAGER environment variable
is not defined either, then more(1) is the default.
SHELL Pathname of the shell to use in the ! command and the ~!
escape. This defaults to the value of the SHELL
TMPDIR The directory to use for temporary files. This defaults
to the value of the TMPDIR environment variable. If the
TMPDIR environment variable is not defined either, then
/tmp is the default.
VISUAL Pathname of the text editor to use in the visual command
and ~v and ~vh escapes. If this variable is null or not
set, the full-screen editor will be vi.
command: Allows the user to ``alias'' commands. Syntax is:
Where x is a new name for the command and y is the
original command. For example:
defines a new command ``ls'' which is equivalent to the
existing ``header'' command.
crt If crt is used as a valued option (see above for a
description of how crt is used as a binary option), it is
used as a threshold to determine how long a message must
be before the user's pager is used to read it. In effect,
this allows the user to override the current window size
which would be used in the case of the binary crt option.
escape If defined, the first character of this option gives the
character to use in the place of ~ to denote escapes.
The default directory for saving mail files. Userspecified
filenames beginning with a plus sign (+) will be
expanded by preceding the filename with this directory
name to obtain the real pathname. If directory does not
start with a slash (/), the contents of HOME will be
prefixed to it. The default is nofolder. If folder is
unset or set to null, user-specified filenames beginning
with + refer to files in the current directory that begin
with the literal + character. See also outfolder below.
The folder value need not affect the processing of the
files named in MBOX and DEAD.
If defined, gives the string which will be prepended to
each inserted line when using the ~m command to insert
text from a previous message into the current message
being composed. If not defined a tab will be the default.
noaskrolock Normally, when mailx encounters a mailfile which is readonly
locked, it interactively asks the user how he wants
to proceed. This option causes mailx to bypass the
interactive dialog and automatically proceed as follows:
If set to "R" or "r", mailx will open the mailfile readonly.
If set to "W" or "w", mailx will forcibly acquire the lock
and open the mailfile read-write.
record If defined, gives the pathname of the file used to record
all outgoing mail. If not defined, then outgoing mail is
not so saved. The default is noquiet.
replyto If defined, gives the address which should be entered into
the Reply-To: header field for all outgoing mail.
save Enable saving of messages in the dead-letter file on
interrupt or delivery error. See the variable DEAD for the
location of the dead-letter file. The default is save.
sendmail If defined, gives the full pathname of the mail transfer
agent program to use to send mail. If not set,
/usr/lib/sendmail will be used. It is usually unnecessary
to set this option.
sign=string Set the variable inserted into the text of a message when
the a command escape is given. The default is nosign. The
character sequences \t and \n are recognized in the
variable as tab and newline characters, respectively.
Sign=string Set the variable inserted into the text of a message when
the A command escape is given. The default is noSign. The
character sequences \t and \n will be recognized in the
variable as tab and newline characters, respectively.
toplines If defined, gives the number of lines of a message to be
printed out with the top command; normally, the first five
lines are printed.
$HOME/mbox Your saved mail (unless the hold option is set).
$HOME/dead.letter File where the text of the last aborted message
will be saved (unless the nosave option is set).
Note that in the event of a delivery failure,
sendmail may append the failed message to
``dead.letter.'' This may result in multiple
messages being present in ``dead.letter.''
$HOME/.mailrc File giving initial mail commands.
$HOME/.lsignature File to append to outgoing local mail.
$HOME/.rsignature File to append to outgoing remote mail.
$HOME/.signature File to append to outgoing mail if .lsignature
and .rsignature do not exist.
$TMPDIR/R* Misc. temporary files.
$TMPDIR/Message* Temporary editor files.
/usr/mail/* System mail directory.
/usr/mail/user System mailbox for user.
/usr/mail/user.lock Lock for user's mailbox.
/usr/mail/user.rolock Read-only lock for user's mailbox. Used to
prevent file contention between multiple mailx
/usr/lib/mailx.help* Help files.
/usr/lib/Mail.rc System initialization file.
/usr/sbin/mailx mailx program.
mail_att(1), mail_bsd(1), sendmail(1M).
Internet RFC 822 - Standard for the Format of Internet Text Messages.
mailx recognizes and acts upon tilde escapes in the body of the message
being collected on standard input regardless of whether or not standard
input is connected to a tty. If you redirect mailx 's standard input to
come from a file or pipe:
mailx someuser < msgfile
cat msgfile | mailx someuser
you must take care to insure that no line of msgfile inadvertently begins
with a '~' character or mailx will produce unwanted results. Note that
there is nothing wrong with imbedding tilde escapes in the body of such a
msgfile provided you know what you are doing. Such imbedded tilde
escapes are useful for setting the Cc: list, arranging return receipts,
and performing other functions not available via command line options.
There are many flags that are not documented here. Most are not useful to
the general user.
PPPPaaaaggggeeee 11119999 [ Back ]