2054 lines
86 KiB
HTML
2054 lines
86 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
|
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
|
<title>mailx</title>
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
|
|
</script>
|
|
|
|
<basefont size="3"> <a name="mailx"></a> <a name="tag_04_83"></a><!-- mailx -->
|
|
<!--header start-->
|
|
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
|
IEEE Std 1003.1-2001<br>
|
|
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
|
|
|
<!--header end-->
|
|
<hr size="2" noshade>
|
|
<h4><a name="tag_04_83_01"></a>NAME</h4>
|
|
|
|
<blockquote>mailx - process messages</blockquote>
|
|
|
|
<h4><a name="tag_04_83_02"></a>SYNOPSIS</h4>
|
|
|
|
<blockquote class="synopsis">
|
|
<h5><a name="tag_04_83_02_01"></a>Send Mode</h5>
|
|
|
|
<pre>
|
|
<tt>mailx</tt> <b>[</b><tt>-s</tt> <i>subject</i><b>]</b> <i>address</i><tt>...
|
|
</tt>
|
|
</pre>
|
|
|
|
<h5><a name="tag_04_83_02_02"></a>Receive Mode</h5>
|
|
|
|
<pre>
|
|
<tt>mailx -e
|
|
<br>
|
|
<br>
|
|
mailx</tt> <b>[</b><tt>-HiNn</tt><b>][</b><tt>-F</tt><b>][</b><tt>-u</tt> <i>user</i><b>]</b><tt><br>
|
|
<br>
|
|
mailx -f</tt><b>[</b><tt>-HiNn</tt><b>][</b><tt>-F</tt><b>][</b><i>file</i><b>]</b><tt><br>
|
|
</tt>
|
|
</pre>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_03"></a>DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>mailx</i> utility provides a message sending and receiving facility. It has two major modes, selected by the options
|
|
used: Send Mode and Receive Mode.</p>
|
|
|
|
<p>On systems that do not support the User Portability Utilities option, an application using <i>mailx</i> shall have the ability
|
|
to send messages in an unspecified manner (Send Mode). Unless the first character of one or more lines is tilde ( <tt>'˜'</tt>
|
|
), all characters in the input message shall appear in the delivered message, but additional characters may be inserted in the
|
|
message before it is retrieved.</p>
|
|
|
|
<p>On systems supporting the User Portability Utilities option, mail-receiving capabilities and other interactive features, Receive
|
|
Mode, described below, also shall be enabled.</p>
|
|
|
|
<h5><a name="tag_04_83_03_01"></a>Send Mode</h5>
|
|
|
|
<p>Send Mode can be used by applications or users to send messages from the text in standard input.</p>
|
|
|
|
<h5><a name="tag_04_83_03_02"></a>Receive Mode</h5>
|
|
|
|
<p>Receive Mode is more oriented towards interactive users. Mail can be read and sent in this interactive mode.</p>
|
|
|
|
<p>When reading mail, <i>mailx</i> provides commands to facilitate saving, deleting, and responding to messages. When sending mail,
|
|
<i>mailx</i> allows editing, reviewing, and other modification of the message as it is entered.</p>
|
|
|
|
<p>Incoming mail shall be stored in one or more unspecified locations for each user, collectively called the system <i>mailbox</i>
|
|
for that user. When <i>mailx</i> is invoked in Receive Mode, the system mailbox shall be the default place to find new mail. As
|
|
messages are read, they shall be marked to be moved to a secondary file for storage, unless specific action is taken. This
|
|
secondary file is called the <b>mbox</b> and is normally located in the directory referred to by the <i>HOME</i> environment
|
|
variable (see <i>MBOX</i> in the ENVIRONMENT VARIABLES section for a description of this file). Messages shall remain in this file
|
|
until explicitly removed. When the <b>-f</b> option is used to read mail messages from secondary files, messages shall be retained
|
|
in those files unless specifically removed. All three of these locations-system mailbox, <b>mbox</b>, and secondary file-are
|
|
referred to in this section as simply "mailboxes", unless more specific identification is required.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_04"></a>OPTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>mailx</i> utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a>.</p>
|
|
|
|
<p>The following options shall be supported. (Only the <b>-s</b> <i>subject</i> option shall be required on all systems. The other
|
|
options are required only on systems supporting the User Portability Utilities option.)</p>
|
|
|
|
<dl compact>
|
|
<dt><b>-e</b></dt>
|
|
|
|
<dd>Test for the presence of mail in the system mailbox. The <i>mailx</i> utility shall write nothing and exit with a successful
|
|
return code if there is mail to read.</dd>
|
|
|
|
<dt><b>-f</b></dt>
|
|
|
|
<dd>Read messages from the file named by the <i>file</i> operand instead of the system mailbox. (See also <b>folder</b>.) If no
|
|
<i>file</i> operand is specified, read messages from <b>mbox</b> instead of the system mailbox.</dd>
|
|
|
|
<dt><b>-F</b></dt>
|
|
|
|
<dd>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 <b>To:</b> line in the mail header. Overrides the <b>record</b> variable, if set (see <a href="#tag_04_83_13_02">Internal
|
|
Variables in mailx</a> .)</dd>
|
|
|
|
<dt><b>-H</b></dt>
|
|
|
|
<dd>Write a header summary only.</dd>
|
|
|
|
<dt><b>-i</b></dt>
|
|
|
|
<dd>Ignore interrupts. (See also <b>ignore</b>.)</dd>
|
|
|
|
<dt><b>-n</b></dt>
|
|
|
|
<dd>Do not initialize from the system default start-up file. See the EXTENDED DESCRIPTION section.</dd>
|
|
|
|
<dt><b>-N</b></dt>
|
|
|
|
<dd>Do not write an initial header summary.</dd>
|
|
|
|
<dt><b>-s </b> <i>subject</i></dt>
|
|
|
|
<dd>Set the <b>Subject</b> header field to <i>subject</i>. All characters in the <i>subject</i> string shall appear in the
|
|
delivered message. The results are unspecified if <i>subject</i> is longer than {LINE_MAX} - 10 bytes or contains a
|
|
<newline>.</dd>
|
|
|
|
<dt><b>-u </b> <i>user</i></dt>
|
|
|
|
<dd>Read the system mailbox of the login name <i>user</i>. This shall only be successful if the invoking user has the appropriate
|
|
privileges to read the system mailbox of that user.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_05"></a>OPERANDS</h4>
|
|
|
|
<blockquote>
|
|
<p>The following operands shall be supported:</p>
|
|
|
|
<dl compact>
|
|
<dt><i>address</i></dt>
|
|
|
|
<dd>Addressee of message. When <b>-n</b> is specified and no user start-up files are accessed (see the EXTENDED DESCRIPTION
|
|
section), the user or application shall ensure this is an address to pass to the mail delivery system. Any system or user start-up
|
|
files may enable aliases (see <b>alias</b> under <a href="#tag_04_83_13_03">Commands in mailx</a> ) that may modify the form of
|
|
<i>address</i> before it is passed to the mail delivery system.</dd>
|
|
|
|
<dt><i>file</i></dt>
|
|
|
|
<dd>A pathname of a file to be read instead of the system mailbox when <b>-f</b> is specified. The meaning of the <i>file</i>
|
|
option-argument shall be affected by the contents of the <b>folder</b> internal variable; see <a href="#tag_04_83_13_02">Internal
|
|
Variables in mailx</a> .</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_06"></a>STDIN</h4>
|
|
|
|
<blockquote>
|
|
<p>When <i>mailx</i> is invoked in Send Mode (the first synopsis line), standard input shall be the message to be delivered to the
|
|
specified addresses. When in Receive Mode, user commands shall be accepted from <i>stdin</i>. If the User Portability Utilities
|
|
option is not supported, standard input lines beginning with a tilde ( <tt>'˜'</tt> ) character produce unspecified
|
|
results.</p>
|
|
|
|
<p>If the User Portability Utilities option is supported, then in both Send and Receive Modes, standard input lines beginning with
|
|
the escape character (usually tilde ( <tt>'˜'</tt> )) shall affect processing as described in <a href=
|
|
"#tag_04_83_13_49">Command Escapes in mailx</a> .</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_07"></a>INPUT FILES</h4>
|
|
|
|
<blockquote>
|
|
<p>When <i>mailx</i> is used as described by this volume of IEEE Std 1003.1-2001, the <i>file</i> option-argument (see
|
|
the <b>-f</b> option) and the <b>mbox</b> shall be text files containing mail messages, formatted as described in the OUTPUT FILES
|
|
section. The nature of the system mailbox is unspecified; it need not be a file.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_08"></a>ENVIRONMENT VARIABLES</h4>
|
|
|
|
<blockquote>
|
|
<p>The following environment variables shall affect the execution of <i>mailx</i>:</p>
|
|
|
|
<dl compact>
|
|
<dt><i>DEAD</i></dt>
|
|
|
|
<dd>Determine the pathname of the file in which to save partial messages in case of interrupts or delivery errors. The default
|
|
shall be <b>dead.letter</b> in the directory named by the <i>HOME</i> variable. The behavior of <i>mailx</i> in saving partial
|
|
messages is unspecified if the User Portability Utilities option is not supported and <i>DEAD</i> is not defined with the value
|
|
<b>/dev/null</b>.</dd>
|
|
|
|
<dt><i>EDITOR</i></dt>
|
|
|
|
<dd>Determine the name of a utility to invoke when the <b>edit</b> (see <a href="#tag_04_83_13_03">Commands in mailx</a> ) or
|
|
<b>˜e</b> (see <a href="#tag_04_83_13_49">Command Escapes in mailx</a> ) command is used. The default editor is unspecified.
|
|
<sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
On XSI-conformant systems it is <a href="../utilities/ed.html"><i>ed</i></a>. <img src="../images/opt-end.gif" alt=
|
|
"[Option End]" border="0"> The effects of this variable are unspecified if the User Portability Utilities option is not
|
|
supported.</dd>
|
|
|
|
<dt><i>HOME</i></dt>
|
|
|
|
<dd>Determine the pathname of the user's home directory.</dd>
|
|
|
|
<dt><i>LANG</i></dt>
|
|
|
|
<dd>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of
|
|
IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap08.html#tag_08_02">Section 8.2, Internationalization Variables</a> for
|
|
the precedence of internationalization variables used to determine the values of locale categories.)</dd>
|
|
|
|
<dt><i>LC_ALL</i></dt>
|
|
|
|
<dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
|
|
|
|
<dt><i>LC_CTYPE</i></dt>
|
|
|
|
<dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as
|
|
opposed to multi-byte characters in arguments and input files) and the handling of case-insensitive address and header-field
|
|
comparisons.</dd>
|
|
|
|
<dt><i>LC_TIME</i></dt>
|
|
|
|
<dd>Determine the format and contents of the date and time strings written by <i>mailx</i>.</dd>
|
|
|
|
<dt><i>LC_MESSAGES</i></dt>
|
|
|
|
<dd>Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error and
|
|
informative messages written to standard output.</dd>
|
|
|
|
<dt><i>LISTER</i></dt>
|
|
|
|
<dd>Determine a string representing the command for writing the contents of the <b>folder</b> directory to standard output when the
|
|
<b>folders</b> command is given (see <b>folders</b> in <a href="#tag_04_83_13_03">Commands in mailx</a> ). Any string acceptable as
|
|
a <i>command_string</i> operand to the <a href="../utilities/sh.html"><i>sh</i></a> <b>-c</b> command shall be valid. If this
|
|
variable is null or not set, the output command shall be <a href="../utilities/ls.html"><i>ls</i></a>. The effects of this variable
|
|
are unspecified if the User Portability Utilities option is not supported.</dd>
|
|
|
|
<dt><i>MAILRC</i></dt>
|
|
|
|
<dd>Determine the pathname of the start-up file. The default shall be <b>.mailrc</b> in the directory referred to by the
|
|
<i>HOME</i> environment variable. The behavior of <i>mailx</i> is unspecified if the User Portability Utilities option is not
|
|
supported and <i>MAILRC</i> is not defined with the value <b>/dev/null</b>.</dd>
|
|
|
|
<dt><i>MBOX</i></dt>
|
|
|
|
<dd>Determine a pathname of the file to save messages from the system mailbox that have been read. The <b>exit</b> command shall
|
|
override this function, as shall saving the message explicitly in another file. The default shall be <b>mbox</b> in the directory
|
|
named by the <i>HOME</i> variable. The effects of this variable are unspecified if the User Portability Utilities option is not
|
|
supported.</dd>
|
|
|
|
<dt><i>NLSPATH</i></dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Determine the location of message catalogs for the processing of <i>LC_MESSAGES .</i> <img src="../images/opt-end.gif" alt=
|
|
"[Option End]" border="0"></dd>
|
|
|
|
<dt><i>PAGER</i></dt>
|
|
|
|
<dd>Determine a string representing an output filtering or pagination command for writing the output to the terminal. Any string
|
|
acceptable as a <i>command_string</i> operand to the <a href="../utilities/sh.html"><i>sh</i></a> <b>-c</b> command shall be valid.
|
|
When standard output is a terminal device, the message output shall be piped through the command if the <i>mailx</i> internal
|
|
variable <b>crt</b> is set to a value less the number of lines in the message; see <a href="#tag_04_83_13_02">Internal Variables in
|
|
mailx</a> . If the <i>PAGER</i> variable is null or not set, the paginator shall be either <a href=
|
|
"../utilities/more.html"><i>more</i></a> or another paginator utility documented in the system documentation. The effects of this
|
|
variable are unspecified if the User Portability Utilities option is not supported.</dd>
|
|
|
|
<dt><i>SHELL</i></dt>
|
|
|
|
<dd>Determine the name of a preferred command interpreter. The default shall be <a href="../utilities/sh.html"><i>sh</i></a>. The
|
|
effects of this variable are unspecified if the User Portability Utilities option is not supported.</dd>
|
|
|
|
<dt><i>TERM</i></dt>
|
|
|
|
<dd>If the internal variable <b>screen</b> is not specified, determine the name of the terminal type to indicate in an unspecified
|
|
manner the number of lines in a screenful of headers. If <i>TERM</i> is not set or is set to null, an unspecified default terminal
|
|
type shall be used and the value of a screenful is unspecified. The effects of this variable are unspecified if the User
|
|
Portability Utilities option is not supported.</dd>
|
|
|
|
<dt><i>TZ</i></dt>
|
|
|
|
<dd>This variable may determine the timezone used to calculate date and time strings written by <i>mailx</i>. If <i>TZ</i> is unset
|
|
or null, an unspecified default timezone shall be used.</dd>
|
|
|
|
<dt><i>VISUAL</i></dt>
|
|
|
|
<dd>Determine a pathname of a utility to invoke when the <b>visual</b> command (see <a href="#tag_04_83_13_03">Commands in
|
|
mailx</a> ) or <b>˜v</b> command-escape (see <a href="#tag_04_83_13_49">Command Escapes in mailx</a> ) is used. If this
|
|
variable is null or not set, the full-screen editor shall be <a href="../utilities/vi.html"><i>vi</i></a>. The effects of this
|
|
variable are unspecified if the User Portability Utilities option is not supported.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_09"></a>ASYNCHRONOUS EVENTS</h4>
|
|
|
|
<blockquote>
|
|
<p>When <i>mailx</i> is in Send Mode and standard input is not a terminal, it shall take the standard action for all signals.</p>
|
|
|
|
<p>In Receive Mode, or in Send Mode when standard input is a terminal, if a SIGINT signal is received:</p>
|
|
|
|
<ol>
|
|
<li>
|
|
<p>If in command mode, the current command, if there is one, shall be aborted, and a command-mode prompt shall be written.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>If in input mode:</p>
|
|
|
|
<ol type="a">
|
|
<li>
|
|
<p>If <b>ignore</b> is set, <i>mailx</i> shall write <tt>"@\n"</tt> , discard the current input line, and continue processing,
|
|
bypassing the message-abort mechanism described in item 2b.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>If the interrupt was received while sending mail, either when in Receive Mode or in Send Mode, a message shall be written, and
|
|
another subsequent interrupt, with no other intervening characters typed, shall be required to abort the mail message. If in
|
|
Receive Mode and another interrupt is received, a command-mode prompt shall be written. If in Send Mode and another interrupt is
|
|
received, <i>mailx</i> shall terminate with a non-zero status.</p>
|
|
|
|
<p>In both cases listed in item b, if the message is not empty:</p>
|
|
|
|
<ol type="i">
|
|
<li>
|
|
<p>If <b>save</b> is enabled and the file named by <i>DEAD</i> can be created, the message shall be written to the file named by
|
|
<i>DEAD .</i> If the file exists, the message shall be written to replace the contents of the file.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>If <b>save</b> is not enabled, or the file named by <i>DEAD</i> cannot be created, the message shall not be saved.</p>
|
|
</li>
|
|
</ol>
|
|
</li>
|
|
</ol>
|
|
</li>
|
|
</ol>
|
|
|
|
<p>The <i>mailx</i> utility shall take the standard action for all other signals.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_10"></a>STDOUT</h4>
|
|
|
|
<blockquote>
|
|
<p>In command and input modes, all output, including prompts and messages, shall be written to standard output.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_11"></a>STDERR</h4>
|
|
|
|
<blockquote>
|
|
<p>The standard error shall be used only for diagnostic messages.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_12"></a>OUTPUT FILES</h4>
|
|
|
|
<blockquote>
|
|
<p>Various <i>mailx</i> commands and command escapes can create or add to files, including the <b>mbox</b>, the dead-letter file,
|
|
and secondary mailboxes. When <i>mailx</i> is used as described in this volume of IEEE Std 1003.1-2001, these files shall
|
|
be text files, formatted as follows:</p>
|
|
|
|
<blockquote><tt>line beginning with</tt> <b>From<space><br>
|
|
[</b><tt>one or more</tt> <i>header-lines</i>; see <a href="#tag_04_83_13_03">Commands in mailx</a> <b>]<br>
|
|
</b> <i>empty line<br>
|
|
</i> <b>[</b><tt>zero or more</tt> <i>body lines<br>
|
|
empty line</i><b>]<br>
|
|
[</b><tt>line beginning with</tt> <b>From<space>...]</b></blockquote>
|
|
|
|
<p>where each message begins with the <b>From <space></b> line shown, preceded by the beginning of the file or an empty
|
|
line. (The <b>From <space></b> line is considered to be part of the message header, but not one of the header-lines referred
|
|
to in <a href="#tag_04_83_13_03">Commands in mailx</a> ; thus, it shall not be affected by the <b>discard</b>, <b>ignore</b>, or
|
|
<b>retain</b> commands.) The formats of the remainder of the <b>From <space></b> line and any additional header lines are
|
|
unspecified, except that none shall be empty. The format of a message body line is also unspecified, except that no line following
|
|
an empty line shall start with <b>From <space></b>; <i>mailx</i> shall modify any such user-entered message body lines
|
|
(following an empty line and beginning with <b>From <space></b>) by adding one or more characters to precede the <tt>'F'</tt>
|
|
; it may add these characters to <b>From <space></b> lines that are not preceded by an empty line.</p>
|
|
|
|
<p>When a message from the system mailbox or entered by the user is not a text file, it is implementation-defined how such a
|
|
message is stored in files written by <i>mailx</i>.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_13"></a>EXTENDED DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>The entire EXTENDED DESCRIPTION section shall apply only to implementations supporting the User Portability Utilities
|
|
option.</p>
|
|
|
|
<p>The <i>mailx</i> utility cannot guarantee support for all character encodings in all circumstances. For example, inter-system
|
|
mail may be restricted to 7-bit data by the underlying network, 8-bit data need not be portable to non-internationalized systems,
|
|
and so on. Under these circumstances, it is recommended that only characters defined in the ISO/IEC 646:1991 standard
|
|
International Reference Version (equivalent to ASCII) 7-bit range of characters be used.</p>
|
|
|
|
<p>When <i>mailx</i> is invoked using one of the Receive Mode synopsis forms, it shall write a page of header-summary lines (if
|
|
<b>-N</b> was not specified and there are messages, see below), followed by a prompt indicating that <i>mailx</i> can accept
|
|
regular commands (see <a href="#tag_04_83_13_03">Commands in mailx</a> ); this is termed <i>command mode</i>. The page of
|
|
header-summary lines shall contain the first new message if there are new messages, or the first unread message if there are unread
|
|
messages, or the first message. When <i>mailx</i> is invoked using the Send Mode synopsis and standard input is a terminal, if no
|
|
subject is specified on the command line and the <b>asksub</b> variable is set, a prompt for the subject shall be written. At this
|
|
point, <i>mailx</i> shall be in input mode. This input mode shall also be entered when using one of the Receive Mode synopsis forms
|
|
and a reply or new message is composed using the <b>reply</b>, <b>Reply</b>, <b>followup</b>, <b>Followup</b>, or <b>mail</b>
|
|
commands and standard input is a terminal. When the message is typed and the end of the message is encountered, the message shall
|
|
be passed to the mail delivery software. Commands can be entered by beginning a line with the escape character (by default, tilde (
|
|
<tt>'˜'</tt> )) followed by a single command letter and optional arguments. See <a href="#tag_04_83_13_03">Commands in
|
|
mailx</a> for a summary of these commands. It is unspecified what effect these commands will have if standard input is not a
|
|
terminal when a message is entered using either the Send Mode synopsis, or the Read Mode commands <b>reply</b>, <b>Reply</b>,
|
|
<b>followup</b>, <b>Followup</b>, or <b>mail</b>. <basefont size="2"></p>
|
|
|
|
<dl>
|
|
<dt><b>Note:</b></dt>
|
|
|
|
<dd>For notational convenience, this section uses the default escape character, tilde, in all references and examples.</dd>
|
|
</dl>
|
|
|
|
<basefont size="3">
|
|
|
|
<p>At any time, the behavior of <i>mailx</i> shall be governed by a set of environmental and internal variables. These are flags
|
|
and valued parameters that can be set and cleared via the <i>mailx</i> <b>set</b> and <b>unset</b> commands.</p>
|
|
|
|
<p>Regular commands are of the form:</p>
|
|
|
|
<pre>
|
|
<b>[</b><i>command</i><b>] [</b><i>msglist</i><b>] [</b><i>argument</i> <tt>...</tt><b>]
|
|
</b>
|
|
</pre>
|
|
|
|
<p>If no <i>command</i> is specified in command mode, <b>next</b> shall be assumed. In input mode, commands shall be recognized by
|
|
the escape character, and lines not treated as commands shall be taken as input for the message.</p>
|
|
|
|
<p>In command mode, each message shall be assigned a sequential number, starting with 1.</p>
|
|
|
|
<p>All messages have a state that shall affect how they are displayed in the header summary and how they are retained or deleted
|
|
upon termination of <i>mailx</i>. There is at any time the notion of a <i>current</i> message, which shall be marked by a
|
|
<tt>'>'</tt> at the beginning of a line in the header summary. When <i>mailx</i> is invoked using one of the Receive Mode
|
|
synopsis forms, the current message shall be the first new message, if there is a new message, or the first unread message if there
|
|
is an unread message, or the first message if there are any messages, or unspecified if there are no messages in the mailbox. Each
|
|
command that takes an optional list of messages (<i>msglist</i>) or an optional single message (<i>message</i>) on which to operate
|
|
shall leave the current message set to the highest-numbered message of the messages specified, unless the command deletes messages,
|
|
in which case the current message shall be set to the first undeleted message (that is, a message not in the deleted state) after
|
|
the highest-numbered message deleted by the command, if one exists, or the first undeleted message before the highest-numbered
|
|
message deleted by the command, if one exists, or to an unspecified value if there are no remaining undeleted messages. All
|
|
messages shall be in one of the following states:</p>
|
|
|
|
<dl compact>
|
|
<dt><i>new</i></dt>
|
|
|
|
<dd>The message is present in the system mailbox and has not been viewed by the user or moved to any other state. Messages in state
|
|
<i>new</i> when <i>mailx</i> quits shall be retained in the system mailbox.</dd>
|
|
|
|
<dt><i>unread</i></dt>
|
|
|
|
<dd>The message has been present in the system mailbox for more than one invocation of <i>mailx</i> and has not been viewed by the
|
|
user or moved to any other state. Messages in state <i>unread</i> when <i>mailx</i> quits shall be retained in the system
|
|
mailbox.</dd>
|
|
|
|
<dt><i>read</i></dt>
|
|
|
|
<dd>The message has been processed by one of the following commands: <b>˜f</b>, <b>˜m</b>, <b>˜F</b>,
|
|
<b>˜M</b>, <b>copy</b>, <b>mbox</b>, <b>next</b>, <b>pipe</b>, <b>print</b>, <b>Print</b>, <b>top</b>, <b>type</b>,
|
|
<b>Type</b>, <b>undelete</b>. The <b>delete</b>, <b>dp</b>, and <b>dt</b> commands may also cause the next message to be marked as
|
|
<i>read</i>, depending on the value of the <b>autoprint</b> variable. Messages that are in the system mailbox and in state
|
|
<i>read</i> when <i>mailx</i> quits shall be saved in the <b>mbox</b>, unless the internal variable <b>hold</b> was set. Messages
|
|
that are in the <b>mbox</b> or in a secondary mailbox and in state <i>read</i> when <i>mailx</i> quits shall be retained in their
|
|
current location.</dd>
|
|
|
|
<dt><i>deleted</i></dt>
|
|
|
|
<dd>The message has been processed by one of the following commands: <b>delete</b>, <b>dp</b>, <b>dt</b>. Messages in state
|
|
<i>deleted</i> when <i>mailx</i> quits shall be deleted. Deleted messages shall be ignored until <i>mailx</i> quits or changes
|
|
mailboxes or they are specified to the undelete command; for example, the message specification / <i>string</i> shall only search
|
|
the subject lines of messages that have not yet been deleted, unless the command operating on the list of messages is
|
|
<b>undelete</b>. No deleted message or deleted message header shall be displayed by any <i>mailx</i> command other than
|
|
<b>undelete</b>.</dd>
|
|
|
|
<dt><i>preserved</i></dt>
|
|
|
|
<dd>The message has been processed by a <b>preserve</b> command. When <i>mailx</i> quits, the message shall be retained in its
|
|
current location.</dd>
|
|
|
|
<dt><i>saved</i></dt>
|
|
|
|
<dd>The message has been processed by one of the following commands: <b>save</b> or <b>write</b>. If the current mailbox is the
|
|
system mailbox, and the internal variable <b>keepsave</b> is set, messages in the state saved shall be saved to the file designated
|
|
by the <i>MBOX</i> variable (see the ENVIRONMENT VARIABLES section). If the current mailbox is the system mailbox, messages in the
|
|
state <i>saved</i> shall be deleted from the current mailbox, when the <b>quit</b> or <b>file</b> command is used to exit the
|
|
current mailbox.</dd>
|
|
</dl>
|
|
|
|
<p>The header-summary line for each message shall indicate the state of the message.</p>
|
|
|
|
<p>Many commands take an optional list of messages ( <i>msglist</i>) on which to operate, which defaults to the current message. A
|
|
<i>msglist</i> is a list of message specifications separated by <blank>s, which can include:</p>
|
|
|
|
<dl compact>
|
|
<dt><tt>n</tt></dt>
|
|
|
|
<dd>Message number <i>n</i>.</dd>
|
|
|
|
<dt><tt>+</tt></dt>
|
|
|
|
<dd>The next undeleted message, or the next deleted message for the <b>undelete</b> command.</dd>
|
|
|
|
<dt><tt>-</tt></dt>
|
|
|
|
<dd>The next previous undeleted message, or the next previous deleted message for the <b>undelete</b> command.</dd>
|
|
|
|
<dt><tt>.</tt></dt>
|
|
|
|
<dd>The current message.</dd>
|
|
|
|
<dt><tt>^</tt></dt>
|
|
|
|
<dd>The first undeleted message, or the first deleted message for the <b>undelete</b> command.</dd>
|
|
|
|
<dt><tt>$</tt></dt>
|
|
|
|
<dd>The last message.</dd>
|
|
|
|
<dt><tt>*</tt></dt>
|
|
|
|
<dd>All messages.</dd>
|
|
|
|
<dt><tt>n-m</tt></dt>
|
|
|
|
<dd>An inclusive range of message numbers.</dd>
|
|
|
|
<dt><i>address</i></dt>
|
|
|
|
<dd>All messages from <i>address</i>; any address as shown in a header summary shall be matchable in this form.</dd>
|
|
|
|
<dt>/<i>string</i></dt>
|
|
|
|
<dd>All messages with <i>string</i> in the subject line (case ignored).</dd>
|
|
|
|
<dt><tt>:c</tt></dt>
|
|
|
|
<dd>All messages of type <i>c</i>, where <i>c</i> shall be one of:
|
|
|
|
<dl compact>
|
|
<dt><tt>d</tt></dt>
|
|
|
|
<dd>Deleted messages.</dd>
|
|
|
|
<dt><tt>n</tt></dt>
|
|
|
|
<dd>New messages.</dd>
|
|
|
|
<dt><tt>o</tt></dt>
|
|
|
|
<dd>Old messages (any not in state <i>read</i> or <i>new</i>).</dd>
|
|
|
|
<dt><tt>r</tt></dt>
|
|
|
|
<dd>Read messages.</dd>
|
|
|
|
<dt><tt>u</tt></dt>
|
|
|
|
<dd>Unread messages.</dd>
|
|
</dl>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Other commands take an optional message ( <i>message</i>) on which to operate, which defaults to the current message. All of the
|
|
forms allowed for <i>msglist</i> are also allowed for <i>message</i>, but if more than one message is specified, only the first
|
|
shall be operated on.</p>
|
|
|
|
<p>Other arguments are usually arbitrary strings whose usage depends on the command involved.</p>
|
|
|
|
<h5><a name="tag_04_83_13_01"></a>Start-Up in mailx</h5>
|
|
|
|
<p>At start-up time, <i>mailx</i> shall take the following steps in sequence:</p>
|
|
|
|
<ol>
|
|
<li>
|
|
<p>Establish all variables at their stated default values.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Process command line options, overriding corresponding default values.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Import any of the <i>DEAD ,</i> <i>EDITOR ,</i> <i>MBOX ,</i> <i>LISTER ,</i> <i>PAGER ,</i> <i>SHELL ,</i> or <i>VISUAL</i>
|
|
variables that are present in the environment, overriding the corresponding default values.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Read <i>mailx</i> commands from an unspecified system start-up file, unless the <b>-n</b> option is given, to initialize any
|
|
internal <i>mailx</i> variables and aliases.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Process the start-up file of <i>mailx</i> commands named in the user <i>MAILRC</i> variable.</p>
|
|
</li>
|
|
</ol>
|
|
|
|
<p>Most regular <i>mailx</i> commands are valid inside start-up files, the most common use being to set up initial display options
|
|
and alias lists. The following commands shall be invalid in the start-up file: <b>!</b>, <b>edit</b>, <b>hold</b>, <b>mail</b>,
|
|
<b>preserve</b>, <b>reply</b>, <b>Reply</b>, <b>shell</b>, <b>visual</b>, <b>Copy</b>, <b>followup</b>, and <b>Followup</b>. Any
|
|
errors in the start-up file shall either cause <i>mailx</i> to terminate with a diagnostic message and a non-zero status or to
|
|
continue after writing a diagnostic message, ignoring the remainder of the lines in the start-up file.</p>
|
|
|
|
<p>A blank line in a start-up file shall be ignored.</p>
|
|
|
|
<h5><a name="tag_04_83_13_02"></a>Internal Variables in mailx</h5>
|
|
|
|
<p>The following variables are internal <i>mailx</i> variables. Each internal variable can be set via the <i>mailx</i> <b>set</b>
|
|
command at any time. The <b>unset</b> and <b>set no</b> <i>name</i> commands can be used to erase variables.</p>
|
|
|
|
<p>In the following list, variables shown as:</p>
|
|
|
|
<pre>
|
|
<tt>variable
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>represent Boolean values. Variables shown as:</p>
|
|
|
|
<pre>
|
|
<tt>variable=</tt><i>value</i>
|
|
</pre>
|
|
|
|
<p>shall be assigned string or numeric values. For string values, the rules in <a href="#tag_04_83_13_03">Commands in mailx</a>
|
|
concerning filenames and quoting shall also apply.</p>
|
|
|
|
<p>The defaults specified here may be changed by the implementation-defined system start-up file unless the user specifies the
|
|
<b>-n</b> option.</p>
|
|
|
|
<dl compact>
|
|
<dt><b>allnet</b></dt>
|
|
|
|
<dd>All network names whose login name components match shall be treated as identical. This shall cause the <i>msglist</i> message
|
|
specifications to behave similarly. The default shall be <b>noallnet</b>. See also the <b>alternates</b> command and the
|
|
<b>metoo</b> variable.</dd>
|
|
|
|
<dt><b>append</b></dt>
|
|
|
|
<dd>Append messages to the end of the <b>mbox</b> file upon termination instead of placing them at the beginning. The default shall
|
|
be <b>noappend</b>. This variable shall not affect the <b>save</b> command when saving to <b>mbox</b>.</dd>
|
|
|
|
<dt><b>ask</b>, <b>asksub</b></dt>
|
|
|
|
<dd>Prompt for a subject line on outgoing mail if one is not specified on the command line with the <b>-s</b> option. The
|
|
<b>ask</b> and <b>asksub</b> forms are synonyms; the system shall refer to <b>asksub</b> and <b>noasksub</b> in its messages, but
|
|
shall accept <b>ask</b> and <b>noask</b> as user input to mean <b>asksub</b> and <b>noasksub</b>. It shall not be possible to set
|
|
both <b>ask</b> and <b>noasksub</b>, or <b>noask</b> and <b>asksub</b>. The default shall be <b>asksub</b>, but no prompting shall
|
|
be done if standard input is not a terminal.</dd>
|
|
|
|
<dt><b>askbcc</b></dt>
|
|
|
|
<dd>Prompt for the blind copy list. The default shall be <b>noaskbcc</b>.</dd>
|
|
|
|
<dt><b>askcc</b></dt>
|
|
|
|
<dd>Prompt for the copy list. The default shall be <b>noaskcc</b>.</dd>
|
|
|
|
<dt><b>autoprint</b></dt>
|
|
|
|
<dd>Enable automatic writing of messages after <b>delete</b> and <b>undelete</b> commands. The default shall be
|
|
<b>noautoprint</b>.</dd>
|
|
|
|
<dt><b>bang</b></dt>
|
|
|
|
<dd>Enable the special-case treatment of exclamation marks ( <tt>'!'</tt> ) in escape command lines; see the <b>escape</b> command
|
|
and <a href="#tag_04_83_13_49">Command Escapes in mailx</a> . The default shall be <b>nobang</b>, disabling the expansion of
|
|
<tt>'!'</tt> in the <i>command</i> argument to the <b>˜!</b> command and the <b>˜<!</b> <i>command</i> escape.</dd>
|
|
|
|
<dt><b>cmd</b>=<i>command</i></dt>
|
|
|
|
<dd><br>
|
|
Set the default command to be invoked by the <b>pipe</b> command. The default shall be <b>nocmd</b>.</dd>
|
|
|
|
<dt><b>crt</b>=<i>number</i></dt>
|
|
|
|
<dd>Pipe messages having more than <i>number</i> lines through the command specified by the value of the <i>PAGER</i> variable. The
|
|
default shall be <b>nocrt</b>. If it is set to null, the value used is implementation-defined.</dd>
|
|
|
|
<dt><b>debug</b></dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Enable verbose diagnostics for debugging. Messages are not delivered. The default shall be <b>nodebug</b>. <img src=
|
|
"../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
|
|
|
<dt><b>dot</b></dt>
|
|
|
|
<dd>When <b>dot</b> is set, a period on a line by itself during message input from a terminal shall also signify end-of-file (in
|
|
addition to normal end-of-file). The default shall be <b>nodot</b>. If <b>ignoreeof</b> is set (see below), a setting of
|
|
<b>nodot</b> shall be ignored and the period is the only method to terminate input mode.</dd>
|
|
|
|
<dt><b>escape</b>=<i>c</i></dt>
|
|
|
|
<dd>Set the command escape character to be the character <tt>'c'</tt> . By default, the command escape character shall be tilde. If
|
|
<b>escape</b> is unset, tilde shall be used; if it is set to null, command escaping shall be disabled.</dd>
|
|
|
|
<dt><b>flipr</b></dt>
|
|
|
|
<dd>Reverse the meanings of the <b>R</b> and <b>r</b> commands. The default shall be <b>noflipr</b>.</dd>
|
|
|
|
<dt><b>folder</b>=<i>directory</i></dt>
|
|
|
|
<dd><br>
|
|
The default directory for saving mail files. User-specified filenames beginning with a plus sign ( <tt>'+'</tt> ) shall be expanded
|
|
by preceding the filename with this directory name to obtain the real pathname. If <i>directory</i> does not start with a slash (
|
|
<tt>'/'</tt> ), the contents of <i>HOME</i> shall be prefixed to it. The default shall be <b>nofolder</b>. If <b>folder</b> is
|
|
unset or set to null, user-specified filenames beginning with <tt>'+'</tt> shall refer to files in the current directory that begin
|
|
with the literal <tt>'+'</tt> character. See also <b>outfolder</b> below. The <b>folder</b> value need not affect the processing of
|
|
the files named in <i>MBOX</i> and <i>DEAD .</i></dd>
|
|
|
|
<dt><b>header</b></dt>
|
|
|
|
<dd>Enable writing of the header summary when entering <i>mailx</i> in Receive Mode. The default shall be <b>header</b>.</dd>
|
|
|
|
<dt><b>hold</b></dt>
|
|
|
|
<dd>Preserve all messages that are read in the system mailbox instead of putting them in the <b>mbox</b> save file. The default
|
|
shall be <b>nohold</b>.</dd>
|
|
|
|
<dt><b>ignore</b></dt>
|
|
|
|
<dd>Ignore interrupts while entering messages. The default shall be <b>noignore</b>.</dd>
|
|
|
|
<dt><b>ignoreeof</b></dt>
|
|
|
|
<dd>Ignore normal end-of-file during message input. Input can be terminated only by entering a period ( <tt>'.'</tt> ) on a line by
|
|
itself or by the <b>˜.</b> command escape. The default shall be <b>noignoreeof</b>. See also <b>dot</b> above.</dd>
|
|
|
|
<dt><b>indentprefix</b>=<i>string</i></dt>
|
|
|
|
<dd><br>
|
|
A string that shall be added as a prefix to each line that is inserted into the message by the <b>˜m</b> command escape. This
|
|
variable shall default to one <tab>.</dd>
|
|
|
|
<dt><b>keep</b></dt>
|
|
|
|
<dd>When a system mailbox, secondary mailbox, or <b>mbox</b> is empty, truncate it to zero length instead of removing it. The
|
|
default shall be <b>nokeep</b>.</dd>
|
|
|
|
<dt><b>keepsave</b></dt>
|
|
|
|
<dd>Keep the messages that have been saved from the system mailbox into other files in the file designated by the variable <i>MBOX
|
|
,</i> instead of deleting them. The default shall be <b>nokeepsave</b>.</dd>
|
|
|
|
<dt><b>metoo</b></dt>
|
|
|
|
<dd>Suppress the deletion of the login name of the user from the recipient list when replying to a message or sending to a group.
|
|
The default shall be <b>nometoo</b>.</dd>
|
|
|
|
<dt><b>onehop</b></dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
When responding to a message that was originally sent to several recipients, the other recipient addresses are normally forced to
|
|
be relative to the originating author's machine for the response. This flag disables alteration of the recipients' addresses,
|
|
improving efficiency in a network where all machines can send directly to all other machines (that is, one hop away). The default
|
|
shall be <b>noonehop</b>. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
|
|
|
<dt><b>outfolder</b></dt>
|
|
|
|
<dd>Cause the files used to record outgoing messages to be located in the directory specified by the <b>folder</b> variable unless
|
|
the pathname is absolute. The default shall be <b>nooutfolder</b>. See the <b>record</b> variable.</dd>
|
|
|
|
<dt><b>page</b></dt>
|
|
|
|
<dd>Insert a <form-feed> after each message sent through the pipe created by the <b>pipe</b> command. The default shall be
|
|
<b>nopage</b>.</dd>
|
|
|
|
<dt><b>prompt</b>=<i>string</i></dt>
|
|
|
|
<dd><br>
|
|
Set the command-mode prompt to <i>string</i>. If <i>string</i> is null or if <b>noprompt</b> is set, no prompting shall occur. The
|
|
default shall be to prompt with the string <tt>"? "</tt> .</dd>
|
|
|
|
<dt><b>quiet</b></dt>
|
|
|
|
<dd>Refrain from writing the opening message and version when entering <i>mailx</i>. The default shall be <b>noquiet</b>.</dd>
|
|
|
|
<dt><b>record</b>=<i>file</i></dt>
|
|
|
|
<dd>Record all outgoing mail in the file with the pathname <i>file</i>. The default shall be <b>norecord</b>. See also
|
|
<b>outfolder</b> above.</dd>
|
|
|
|
<dt><b>save</b></dt>
|
|
|
|
<dd>Enable saving of messages in the dead-letter file on interrupt or delivery error. See the variable <i>DEAD</i> for the location
|
|
of the dead-letter file. The default shall be <b>save</b>.</dd>
|
|
|
|
<dt><b>screen</b>=<i>number</i></dt>
|
|
|
|
<dd><br>
|
|
Set the number of lines in a screenful of headers for the <b>headers</b> and <b>z</b> commands. If <b>screen</b> is not specified,
|
|
a value based on the terminal type identified by the <i>TERM</i> environment variable, the window size, the baud rate, or some
|
|
combination of these shall be used.</dd>
|
|
|
|
<dt><b>sendwait</b></dt>
|
|
|
|
<dd>Wait for the background mailer to finish before returning. The default shall be <b>nosendwait</b>.</dd>
|
|
|
|
<dt><b>showto</b></dt>
|
|
|
|
<dd>When the sender of the message was the user who is invoking <i>mailx</i>, write the information from the <b>To:</b> line
|
|
instead of the <b>From:</b> line in the header summary. The default shall be <b>noshowto</b>.</dd>
|
|
|
|
<dt><b>sign</b>=<i>string</i></dt>
|
|
|
|
<dd>Set the variable inserted into the text of a message when the <b>˜a</b> command escape is given. The default shall be
|
|
<b>nosign</b>. The character sequences <tt>'\t'</tt> and <tt>'\n'</tt> shall be recognized in the variable as <tab>s and
|
|
<newline>s, respectively. (See also <b>˜i</b> in <a href="#tag_04_83_13_49">Command Escapes in mailx</a> .)</dd>
|
|
|
|
<dt><b>Sign</b>=<i>string</i></dt>
|
|
|
|
<dd>Set the variable inserted into the text of a message when the <b>˜A</b> command escape is given. The default shall be
|
|
<b>noSign</b>. The character sequences <tt>'\t'</tt> and <tt>'\n'</tt> shall be recognized in the variable as <tab>s and
|
|
<newline>s, respectively.</dd>
|
|
|
|
<dt><b>toplines</b>=<i>number</i></dt>
|
|
|
|
<dd><br>
|
|
Set the number of lines of the message to write with the <b>top</b> command. The default shall be 5.</dd>
|
|
</dl>
|
|
|
|
<h5><a name="tag_04_83_13_03"></a>Commands in mailx</h5>
|
|
|
|
<p>The following <i>mailx</i> commands shall be provided. In the following list, header refers to lines from the message header, as
|
|
shown in the OUTPUT FILES section. Header-line refers to lines within the header that begin with one or more non-white-space
|
|
characters, immediately followed by a colon and white space and continuing until the next line beginning with a non-white-space
|
|
character or an empty line. Header-field refers to the portion of a header line prior to the first colon in that line.</p>
|
|
|
|
<p>For each of the commands listed below, the command can be entered as the abbreviation (those characters in the Synopsis command
|
|
word preceding the <tt>'['</tt> ), the full command (all characters shown for the command word, omitting the <tt>'['</tt> and
|
|
<tt>']'</tt> ), or any truncation of the full command down to the abbreviation. For example, the <b>exit</b> command (shown as
|
|
<b>ex[it]</b> in the Synopsis) can be entered as <b>ex</b>, <b>exi</b>, or <b>exit</b>.</p>
|
|
|
|
<p>The arguments to commands can be quoted, using the following methods:</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>An argument can be enclosed between paired double-quotes ( <tt>""</tt> ) or single-quotes ( <tt>''</tt> ); any white space,
|
|
shell word expansion, or backslash characters within the quotes shall be treated literally as part of the argument. A double-quote
|
|
shall be treated literally within single-quotes and <i>vice versa</i>. These special properties of the quote marks shall occur only
|
|
when they are paired at the beginning and end of the argument.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>A backslash outside of the enclosing quotes shall be discarded and the following character treated literally as part of the
|
|
argument.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>An unquoted backslash at the end of a command line shall be discarded and the next line shall continue the command.</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<p>Filenames, where expected, shall be subjected to the process of shell word expansions (see <a href=
|
|
"xcu_chap02.html#tag_02_06"><i>Word Expansions</i></a> ); if more than a single pathname results and the command is expecting one
|
|
file, the effects are unspecified. If the filename begins with an unquoted plus sign, it shall not be expanded, but treated as the
|
|
named file (less the leading plus) in the <b>folder</b> directory. (See the <b>folder</b> variable.)</p>
|
|
|
|
<h5><a name="tag_04_83_13_04"></a>Declare Aliases</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>a</tt><b>[</b><tt>lias</tt><b>] [</b><i>alias</i> <b>[</b><i>address</i><tt>...</tt><b>]]</b><tt>g</tt><b>[</b><tt>roup</tt><b>] [</b><i>alias</i> <b>[</b><i>address</i><tt>...</tt><b>]]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Add the given addresses to the alias specified by <i>alias</i>. The names shall be substituted when <i>alias</i> is used as a
|
|
recipient address specified by the user in an outgoing message (that is, other recipients addressed indirectly through the
|
|
<b>reply</b> command shall not be substituted in this manner). Mail address alias substitution shall apply only when the alias
|
|
string is used as a full address; for example, when <b>hlj</b> is an alias, <i>hlj@posix.com</i> does not trigger the alias
|
|
substitution. If no arguments are given, write a listing of the current aliases to standard output. If only an <i>alias</i>
|
|
argument is given, write a listing of the specified alias to standard output. These listings need not reflect the same order of
|
|
addresses that were entered.</p>
|
|
|
|
<h5><a name="tag_04_83_13_05"></a>Declare Alternatives</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>alt</tt><b>[</b><tt>ernates</tt><b>]</b> <i>name</i><tt>...
|
|
</tt>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>(See also the <b>metoo</b> command.) Declare a list of alternative names for the user's login. When responding to a message,
|
|
these names shall be removed from the list of recipients for the response. The comparison of names shall be in a case-insensitive
|
|
manner. With no arguments, <b>alternates</b> shall write the current list of alternative names.</p>
|
|
|
|
<h5><a name="tag_04_83_13_06"></a>Change Current Directory</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>cd</tt> <b>[</b><i>directory</i><b>]</b><tt>ch</tt><b>[</b><tt>dir</tt><b>] [</b><i>directory</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Change directory. If <i>directory</i> is not specified, the contents of <i>HOME</i> shall be used.</p>
|
|
|
|
<h5><a name="tag_04_83_13_07"></a>Copy Messages</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>c</tt><b>[</b><tt>opy</tt><b>] [</b><i>file</i><b>]</b><tt>c</tt><b>[</b><tt>opy</tt><b>] [</b><i>msglist</i><b>]</b> <i>file</i><tt>C</tt><b>[</b><tt>opy</tt><b>] [</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Copy messages to the file named by the pathname <i>file</i> without marking the messages as saved. Otherwise, it shall be
|
|
equivalent to the <b>save</b> command.</p>
|
|
|
|
<p>In the capitalized form, save the specified messages in a file whose name is derived from the author of the message to be saved,
|
|
without marking the messages as saved. Otherwise, it shall be equivalent to the <b>Save</b> command.</p>
|
|
|
|
<h5><a name="tag_04_83_13_08"></a>Delete Messages</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>d</tt><b>[</b><tt>elete</tt><b>] [</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Mark messages for deletion from the mailbox. The deletions shall not occur until <i>mailx</i> quits (see the <b>quit</b>
|
|
command) or changes mailboxes (see the <b>folder</b> command). If <b>autoprint</b> is set and there are messages remaining after
|
|
the <b>delete</b> command, the current message shall be written as described for the <b>print</b> command (see the <b>print</b>
|
|
command); otherwise, the <i>mailx</i> prompt shall be written.</p>
|
|
|
|
<h5><a name="tag_04_83_13_09"></a>Discard Header Fields</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>di</tt><b>[</b><tt>scard</tt><b>] [</b><i>header-field</i><tt>...</tt><b>]</b><tt>ig</tt><b>[</b><tt>nore</tt><b>] [</b><i>header-field</i><tt>...</tt><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Suppress the specified header fields when writing messages. Specified <i>header-fields</i> shall be added to the list of
|
|
suppressed header fields. Examples of header fields to ignore are <b>status</b> and <b>cc</b>. The fields shall be included when
|
|
the message is saved. The <b>Print</b> and <b>Type</b> commands shall override this command. The comparison of header fields shall
|
|
be in a case-insensitive manner. If no arguments are specified, write a list of the currently suppressed header fields to standard
|
|
output; the listing need not reflect the same order of header fields that were entered.</p>
|
|
|
|
<p>If both <b>retain</b> and <b>discard</b> commands are given, <b>discard</b> commands shall be ignored.</p>
|
|
|
|
<h5><a name="tag_04_83_13_10"></a>Delete Messages and Display</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>dp</tt> <b>[</b><i>msglist</i><b>]</b><tt>dt</tt> <b>[</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Delete the specified messages as described for the <b>delete</b> command, except that the <b>autoprint</b> variable shall have
|
|
no effect, and the current message shall be written only if it was set to a message after the last message deleted by the command.
|
|
Otherwise, an informational message to the effect that there are no further messages in the mailbox shall be written, followed by
|
|
the <i>mailx</i> prompt.</p>
|
|
|
|
<h5><a name="tag_04_83_13_11"></a>Echo a String</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>ec</tt><b>[</b><tt>ho</tt><b>]</b> <i>string</i> <tt>...
|
|
</tt>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Echo the given strings, equivalent to the shell <a href="../utilities/echo.html"><i>echo</i></a> utility.</p>
|
|
|
|
<h5><a name="tag_04_83_13_12"></a>Edit Messages</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>e</tt><b>[</b><tt>dit</tt><b>] [</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Edit the given messages. The messages shall be placed in a temporary file and the utility named by the <i>EDITOR</i> variable is
|
|
invoked to edit each file in sequence. The default <i>EDITOR</i> is unspecified.</p>
|
|
|
|
<p>The <b>edit</b> command does not modify the contents of those messages in the mailbox.</p>
|
|
|
|
<h5><a name="tag_04_83_13_13"></a>Exit</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>ex</tt><b>[</b><tt>it</tt><b>]</b><tt>x</tt><b>[</b><tt>it</tt><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Exit from <i>mailx</i> without changing the mailbox. No messages shall be saved in the <b>mbox</b> (see also <b>quit</b>).</p>
|
|
|
|
<h5><a name="tag_04_83_13_14"></a>Change Folder</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>fi</tt><b>[</b><tt>le</tt><b>] [</b><i>file</i><b>]</b><tt>fold</tt><b>[</b><tt>er</tt><b>] [</b><i>file</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Quit (see the <b>quit</b> command) from the current file of messages and read in the file named by the pathname <i>file</i>. If
|
|
no argument is given, the name and status of the current mailbox shall be written.</p>
|
|
|
|
<p>Several unquoted special characters shall be recognized when used as <i>file</i> names, with the following substitutions:</p>
|
|
|
|
<dl compact>
|
|
<dt><tt>%</tt></dt>
|
|
|
|
<dd>The system mailbox for the invoking user.</dd>
|
|
|
|
<dt><tt>%</tt><i>user</i></dt>
|
|
|
|
<dd>The system mailbox for <i>user</i>.</dd>
|
|
|
|
<dt><tt>#</tt></dt>
|
|
|
|
<dd>The previous file.</dd>
|
|
|
|
<dt><tt>&</tt></dt>
|
|
|
|
<dd>The current <b>mbox</b>.</dd>
|
|
|
|
<dt><tt>+</tt><i>file</i></dt>
|
|
|
|
<dd>The named file in the <b>folder</b> directory. (See the <b>folder</b> variable.)</dd>
|
|
</dl>
|
|
|
|
<p>The default file shall be the current mailbox.</p>
|
|
|
|
<h5><a name="tag_04_83_13_15"></a>Display List of Folders</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>folders</tt>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Write the names of the files in the directory set by the <b>folder</b> variable. The command specified by the <i>LISTER</i>
|
|
environment variable shall be used (see the ENVIRONMENT VARIABLES section).</p>
|
|
|
|
<h5><a name="tag_04_83_13_16"></a>Follow Up Specified Messages</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>fo</tt><b>[</b><tt>llowup</tt><b>] [</b><i>message</i><b>]</b><tt>F</tt><b>[</b><tt>ollowup</tt><b>] [</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>In the lowercase form, respond to a message, recording the response in a file whose name is derived from the author of the
|
|
message. See also the <b>save</b> and <b>copy</b> commands and <b>outfolder</b>.</p>
|
|
|
|
<p>In the capitalized form, respond to the first message in the <i>msglist</i>, sending the message to the author of each message
|
|
in the <i>msglist</i>. The subject line shall be taken from the first message and the response shall be recorded in a file whose
|
|
name is derived from the author of the first message. See also the <b>Save</b> and <b>Copy</b> commands and <b>outfolder</b>.</p>
|
|
|
|
<p>Both forms shall override the <b>record</b> variable, if set.</p>
|
|
|
|
<h5><a name="tag_04_83_13_17"></a>Display Header Summary for Specified Messages</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>f</tt><b>[</b><tt>rom</tt><b>] [</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Write the header summary for the specified messages.</p>
|
|
|
|
<h5><a name="tag_04_83_13_18"></a>Display Header Summary</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>h</tt><b>[</b><tt>eaders</tt><b>] [</b><i>message</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Write the page of headers that includes the message specified. If the <i>message</i> argument is not specified, the current
|
|
message shall not change. However, if the <i>message</i> argument is specified, the current message shall become the message that
|
|
appears at the top of the page of headers that includes the message specified. The <b>screen</b> variable sets the number of
|
|
headers per page. See also the <b>z</b> command.</p>
|
|
|
|
<h5><a name="tag_04_83_13_19"></a>Help</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>hel</tt><b>[</b><tt>p</tt><b>]</b><tt>?
|
|
</tt>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Write a summary of commands.</p>
|
|
|
|
<h5><a name="tag_04_83_13_20"></a>Hold Messages</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>ho</tt><b>[</b><tt>ld</tt><b>] [</b><i>msglist</i><b>]</b><tt>pre</tt><b>[</b><tt>serve</tt><b>] [</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Mark the messages in <i>msglist</i> to be retained in the mailbox when <i>mailx</i> terminates. This shall override any commands
|
|
that might previously have marked the messages to be deleted. During the current invocation of <i>mailx</i>, only the
|
|
<b>delete</b>, <b>dp</b>, or <b>dt</b> commands shall remove the <i>preserve</i> marking of a message.</p>
|
|
|
|
<h5><a name="tag_04_83_13_21"></a>Execute Commands Conditionally</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>i</tt><b>[</b><tt>f</tt><b>]</b> <tt>s|r
|
|
</tt><i>mail-command</i><tt>s
|
|
el</tt><b>[</b><tt>se</tt><b>]
|
|
</b><i>mail-command</i><tt>s
|
|
en</tt><b>[</b><tt>dif</tt><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Execute commands conditionally, where <b>if s</b> executes the following <i>mail-command</i>s, up to an <b>else</b> or
|
|
<b>endif</b>, if the program is in Send Mode, and <b>if r</b> shall cause the <i>mail-command</i>s to be executed only in
|
|
Receive Mode.</p>
|
|
|
|
<h5><a name="tag_04_83_13_22"></a>List Available Commands</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>l</tt><b>[</b><tt>ist</tt><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Write a list of all commands available. No explanation shall be given.</p>
|
|
|
|
<h5><a name="tag_04_83_13_23"></a>Mail a Message</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>m</tt><b>[</b><tt>ail</tt><b>]</b> <i>address</i><tt>...
|
|
</tt>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Mail a message to the specified addresses or aliases.</p>
|
|
|
|
<h5><a name="tag_04_83_13_24"></a>Direct Messages to mbox</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>mb</tt><b>[</b><tt>ox</tt><b>] [</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Arrange for the given messages to end up in the <b>mbox</b> save file when <i>mailx</i> terminates normally. See <i>MBOX .</i>
|
|
See also the <b>exit</b> and <b>quit</b> commands.</p>
|
|
|
|
<h5><a name="tag_04_83_13_25"></a>Process Next Specified Message</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>n</tt><b>[</b><tt>ext</tt><b>] [</b><i>message</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>If the current message has not been written (for example, by the <b>print</b> command) since <i>mailx</i> started or since any
|
|
other message was the current message, behave as if the <b>print</b> command was entered. Otherwise, if there is an undeleted
|
|
message after the current message, make it the current message and behave as if the <b>print</b> command was entered. Otherwise, an
|
|
informational message to the effect that there are no further messages in the mailbox shall be written, followed by the
|
|
<i>mailx</i> prompt.</p>
|
|
|
|
<h5><a name="tag_04_83_13_26"></a>Pipe Message</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>pi</tt><b>[</b><tt>pe</tt><b>] [[</b><i>msglist</i><b>]</b> <i>command</i><b>]</b><tt>|</tt> <b>[[</b><i>msglist</i><b>]</b> <i>command</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Pipe the messages through the given <i>command</i> by invoking the command interpreter specified by <i>SHELL</i> with two
|
|
arguments: <b>-c</b> and <i>command</i>. (See also <a href="../utilities/sh.html"><i>sh</i></a> <b>-c</b>.) The application shall
|
|
ensure that the command is given as a single argument. Quoting, described previously, can be used to accomplish this. If no
|
|
arguments are given, the current message shall be piped through the command specified by the value of the <b>cmd</b> variable. If
|
|
the <b>page</b> variable is set, a <form-feed> shall be inserted after each message.</p>
|
|
|
|
<h5><a name="tag_04_83_13_27"></a>Display Message with Headers</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>P</tt><b>[</b><tt>rint</tt><b>] [</b><i>msglist</i><b>]</b><tt>T</tt><b>[</b><tt>ype</tt><b>] [</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Write the specified messages, including all header lines, to standard output. Override suppression of lines by the
|
|
<b>discard</b>, <b>ignore</b>, and <b>retain</b> commands. If <b>crt</b> is set, the messages longer than the number of lines
|
|
specified by the <b>crt</b> variable shall be paged through the command specified by the <i>PAGER</i> environment variable.</p>
|
|
|
|
<h5><a name="tag_04_83_13_28"></a>Display Message</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>p</tt><b>[</b><tt>rint</tt><b>] [</b><i>msglist</i><b>]</b><tt>t</tt><b>[</b><tt>ype</tt><b>] [</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Write the specified messages to standard output. If <b>crt</b> is set, the messages longer than the number of lines specified by
|
|
the <b>crt</b> variable shall be paged through the command specified by the <i>PAGER</i> environment variable.</p>
|
|
|
|
<h5><a name="tag_04_83_13_29"></a>Quit</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>q</tt><b>[</b><tt>uit</tt><b>]
|
|
</b><i>end-of-file</i>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Terminate <i>mailx</i>, storing messages that were read in <b>mbox</b> (if the current mailbox is the system mailbox and unless
|
|
<b>hold</b> is set), deleting messages that have been explicitly saved (unless <b>keepsave</b> is set), discarding messages that
|
|
have been deleted, and saving all remaining messages in the mailbox.</p>
|
|
|
|
<h5><a name="tag_04_83_13_30"></a>Reply to a Message List</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>R</tt><b>[</b><tt>eply</tt><b>] [</b><i>msglist</i><b>]</b><tt>R</tt><b>[</b><tt>espond</tt><b>] [</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Mail a reply message to the sender of each message in the <i>msglist</i>. The subject line shall be formed by concatenating
|
|
<b>Re:</b> <space> (unless it already begins with that string) and the subject from the first message. If <b>record</b> is
|
|
set to a filename, the response shall be saved at the end of that file.</p>
|
|
|
|
<p>See also the <b>flipr</b> variable.</p>
|
|
|
|
<h5><a name="tag_04_83_13_31"></a>Reply to a Message</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>r</tt><b>[</b><tt>eply</tt><b>] [</b><i>message</i><b>]</b><tt>r</tt><b>[</b><tt>espond</tt><b>] [</b><i>message</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Mail a reply message to all recipients included in the header of the message. The subject line shall be formed by concatenating
|
|
<b>Re:</b> <space> (unless it already begins with that string) and the subject from the message. If <b>record</b> is set to a
|
|
filename, the response shall be saved at the end of that file.</p>
|
|
|
|
<p>See also the <b>flipr</b> variable.</p>
|
|
|
|
<h5><a name="tag_04_83_13_32"></a>Retain Header Fields</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>ret</tt><b>[</b><tt>ain</tt><b>] [</b><i>header-field</i><tt>...</tt><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Retain the specified header fields when writing messages. This command shall override all <b>discard</b> and <b>ignore</b>
|
|
commands. The comparison of header fields shall be in a case-insensitive manner. If no arguments are specified, write a list of the
|
|
currently retained header fields to standard output; the listing need not reflect the same order of header fields that were
|
|
entered.</p>
|
|
|
|
<h5><a name="tag_04_83_13_33"></a>Save Messages</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>s</tt><b>[</b><tt>ave</tt><b>] [</b><i>file</i><b>]</b><tt>s</tt><b>[</b><tt>ave</tt><b>] [</b><i>msglist</i><b>]</b> <i>file</i><tt>S</tt><b>[</b><tt>ave</tt><b>] [</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Save the specified messages in the file named by the pathname <i>file</i>, or the <b>mbox</b> if the <i>file</i> argument is
|
|
omitted. The file shall be created if it does not exist; otherwise, the messages shall be appended to the file. The message shall
|
|
be put in the state <i>saved</i>, and shall behave as specified in the description of the <i>saved</i> state when the current
|
|
mailbox is exited by the <b>quit</b> or <b>file</b> command.</p>
|
|
|
|
<p>In the capitalized form, save the specified messages in a file whose name is derived from the author of the first message. The
|
|
name of the file shall be taken to be the author's name with all network addressing stripped off. See also the <b>Copy</b>,
|
|
<b>followup</b>, and <b>Followup</b> commands and <b>outfolder</b> variable.</p>
|
|
|
|
<h5><a name="tag_04_83_13_34"></a>Set Variables</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>se</tt><b>[</b><tt>t</tt><b>] [</b><i>name</i><b>[</b><tt>=</tt><b>[</b><i>string</i><b>]]</b> <tt>...</tt><b>] [</b><i>name</i><tt>=</tt><i>number</i> <tt>...</tt><b>] [</b><tt>no</tt><i>name</i> <tt>...</tt><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Define one or more variables called <i>name</i>. The variable can be given a null, string, or numeric value. Quoting and
|
|
backslash escapes can occur anywhere in <i>string</i>, as described previously, as if the <i>string</i> portion of the argument
|
|
were the entire argument. The forms <i>name</i> and <i>name</i>= shall be equivalent to <i>name</i>="" for variables that take
|
|
string values. The <b>set</b> command without arguments shall write a list of all defined variables and their values. The <b>no</b>
|
|
<i>name</i> form shall be equivalent to <b>unset</b> <i>name</i>.</p>
|
|
|
|
<h5><a name="tag_04_83_13_35"></a>Invoke a Shell</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>sh</tt><b>[</b><tt>ell</tt><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Invoke an interactive command interpreter (see also <i>SHELL ).</i></p>
|
|
|
|
<h5><a name="tag_04_83_13_36"></a>Display Message Size</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>si</tt><b>[</b><tt>ze</tt><b>] [</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Write the size in bytes of each of the specified messages.</p>
|
|
|
|
<h5><a name="tag_04_83_13_37"></a>Read mailx Commands From a File</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>so</tt><b>[</b><tt>urce</tt><b>]</b> <i>file</i>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Read and execute commands from the file named by the pathname <i>file</i> and return to command mode.</p>
|
|
|
|
<h5><a name="tag_04_83_13_38"></a>Display Beginning of Messages</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>to</tt><b>[</b><tt>p</tt><b>] [</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Write the top few lines of each of the specified messages. If the <b>toplines</b> variable is set, it is taken as the number of
|
|
lines to write. The default shall be 5.</p>
|
|
|
|
<h5><a name="tag_04_83_13_39"></a>Touch Messages</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>tou</tt><b>[</b><tt>ch</tt><b>] [</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Touch the specified messages. If any message in <i>msglist</i> is not specifically deleted nor saved in a file, it shall be
|
|
placed in the <b>mbox</b> upon normal termination. See <b>exit</b> and <b>quit</b>.</p>
|
|
|
|
<h5><a name="tag_04_83_13_40"></a>Delete Aliases</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>una</tt><b>[</b><tt>lias</tt><b>] [</b><i>alias</i><b>]</b><tt>...
|
|
</tt>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Delete the specified alias names. If a specified alias does not exist, the results are unspecified.</p>
|
|
|
|
<h5><a name="tag_04_83_13_41"></a>Undelete Messages</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>u</tt><b>[</b><tt>ndelete</tt><b>] [</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Change the state of the specified messages from deleted to read. If <b>autoprint</b> is set, the last message of those restored
|
|
shall be written. If <i>msglist</i> is not specified, the message shall be selected as follows:</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>If there are any deleted messages that follow the current message, the first of these shall be chosen.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Otherwise, the last deleted message that also precedes the current message shall be chosen.</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<h5><a name="tag_04_83_13_42"></a>Unset Variables</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>uns</tt><b>[</b><tt>et</tt><b>]</b> <i>name</i><tt>...
|
|
</tt>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Cause the specified variables to be erased.</p>
|
|
|
|
<h5><a name="tag_04_83_13_43"></a>Edit Message with Full-Screen Editor</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>v</tt><b>[</b><tt>isual</tt><b>] [</b><i>msglist</i><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Edit the given messages with a screen editor. Each message shall be placed in a temporary file, and the utility named by the
|
|
<i>VISUAL</i> variable shall be invoked to edit each file in sequence. The default editor shall be <a href=
|
|
"../utilities/vi.html"><i>vi</i></a>.</p>
|
|
|
|
<p>The <b>visual</b> command does not modify the contents of those messages in the mailbox.</p>
|
|
|
|
<h5><a name="tag_04_83_13_44"></a>Write Messages to a File</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>w</tt><b>[</b><tt>rite</tt><b>] [</b><i>msglist</i><b>]</b> <i>file</i>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Write the given messages to the file specified by the pathname <i>file</i>, minus the message header. Otherwise, it shall be
|
|
equivalent to the <b>save</b> command.</p>
|
|
|
|
<h5><a name="tag_04_83_13_45"></a>Scroll Header Display</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>z</tt><b>[</b><tt>+|-</tt><b>]</b>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Scroll the header display forward (if <tt>'+'</tt> is specified or if no option is specified) or backward (if <tt>'-'</tt> is
|
|
specified) one screenful. The number of headers written shall be set by the <b>screen</b> variable.</p>
|
|
|
|
<h5><a name="tag_04_83_13_46"></a>Invoke Shell Command</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>!</tt><i>command</i>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Invoke the command interpreter specified by <i>SHELL</i> with two arguments: <b>-c</b> and <i>command</i>. (See also <a href=
|
|
"../utilities/sh.html"><i>sh</i></a> <b>-c</b>.) If the <b>bang</b> variable is set, each unescaped occurrence of <tt>'!'</tt> in
|
|
<i>command</i> shall be replaced with the command executed by the previous <b>!</b> command or <b>˜!</b> command escape.</p>
|
|
|
|
<h5><a name="tag_04_83_13_47"></a>Null Command</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>#</tt> <i>comment</i>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>This null command (comment) shall be ignored by <i>mailx</i>.</p>
|
|
|
|
<h5><a name="tag_04_83_13_48"></a>Display Current Message Number</h5>
|
|
|
|
<dl compact>
|
|
<dt><i>Synopsis</i>:</dt>
|
|
|
|
<dd>
|
|
<pre>
|
|
<tt>=
|
|
</tt>
|
|
</pre>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Write the current message number.</p>
|
|
|
|
<h5><a name="tag_04_83_13_49"></a>Command Escapes in mailx</h5>
|
|
|
|
<p>The following commands can be entered only from input mode, by beginning a line with the escape character (by default, tilde (
|
|
<tt>'˜'</tt> )). See the <b>escape</b> variable description for changing this special character. The format for the commands
|
|
shall be:</p>
|
|
|
|
<pre>
|
|
<tt><</tt><i>escape-character</i><tt>><</tt><i>command-char</i><tt>><</tt><i>separator</i><tt>></tt><b>[</b><tt><</tt><i>arguments</i><tt>></tt><b>]</b>
|
|
</pre>
|
|
|
|
<p>where the <<i>separator</i>> can be zero or more <blank>s.</p>
|
|
|
|
<p>In the following descriptions, the application shall ensure that the argument <i>command</i> (but not <i>mailx-command)</i> is a
|
|
shell command string. Any string acceptable to the command interpreter specified by the <i>SHELL</i> variable when it is invoked as
|
|
<i>SHELL</i> <b>-c</b> <i>command_string</i> shall be valid. The command can be presented as multiple arguments (that is, quoting
|
|
is not required).</p>
|
|
|
|
<p>Command escapes that are listed with <i>msglist</i> or <i>mailx-command</i> arguments are invalid in Send Mode and produce
|
|
unspecified results.</p>
|
|
|
|
<dl compact>
|
|
<dt><b>˜! </b> <i>command</i></dt>
|
|
|
|
<dd>Invoke the command interpreter specified by <i>SHELL</i> with two arguments: <b>-c</b> and <i>command</i>; and then return to
|
|
input mode. If the <b>bang</b> variable is set, each unescaped occurrence of <tt>'!'</tt> in <i>command</i> shall be replaced with
|
|
the command executed by the previous <b>!</b> command or <b>˜!</b> command escape.</dd>
|
|
|
|
<dt><b>˜.</b></dt>
|
|
|
|
<dd>Simulate end-of-file (terminate message input).</dd>
|
|
|
|
<dt><b>˜: </b> <i>mailx-command</i>, <b>˜_ </b> <i>mailx-command</i></dt>
|
|
|
|
<dd><br>
|
|
Perform the command-level request.</dd>
|
|
|
|
<dt><b>˜?</b></dt>
|
|
|
|
<dd>Write a summary of command escapes.</dd>
|
|
|
|
<dt><b>˜A</b></dt>
|
|
|
|
<dd>This shall be equivalent to <b>˜i Sign</b>.</dd>
|
|
|
|
<dt><b>˜a</b></dt>
|
|
|
|
<dd>This shall be equivalent to <b>˜i sign</b>.</dd>
|
|
|
|
<dt><b>˜b </b> <i>name</i>...</dt>
|
|
|
|
<dd>Add the <i>name</i>s to the blind carbon copy ( <b>Bcc</b>) list.</dd>
|
|
|
|
<dt><b>˜c </b> <i>name</i>...</dt>
|
|
|
|
<dd>Add the <i>name</i>s to the carbon copy ( <b>Cc</b>) list.</dd>
|
|
|
|
<dt><b>˜d</b></dt>
|
|
|
|
<dd>Read in the dead-letter file. See <i>DEAD</i> for a description of this file.</dd>
|
|
|
|
<dt><b>˜e</b></dt>
|
|
|
|
<dd>Invoke the editor, as specified by the <i>EDITOR</i> environment variable, on the partial message.</dd>
|
|
|
|
<dt><b>˜f [</b><i>msglist</i><b>]</b></dt>
|
|
|
|
<dd>Forward the specified messages. The specified messages shall be inserted into the current message without alteration. This
|
|
command escape also shall insert message headers into the message with field selection affected by the <b>discard</b>,
|
|
<b>ignore</b>, and <b>retain</b> commands.</dd>
|
|
|
|
<dt><b>˜F [</b><i>msglist</i><b>]</b></dt>
|
|
|
|
<dd>This shall be the equivalent of the <b>˜f</b> command escape, except that all headers shall be included in the message,
|
|
regardless of previous <b>discard</b>, <b>ignore</b>, and <b>retain</b> commands.</dd>
|
|
|
|
<dt><b>˜h</b></dt>
|
|
|
|
<dd>If standard input is a terminal, prompt for a <b>Subject</b> line and the <b>To</b>, <b>Cc</b>, and <b>Bcc</b> lists. Other
|
|
implementation-defined headers may also be presented for editing. If the field is written with an initial value, it can be edited
|
|
as if it had just been typed.</dd>
|
|
|
|
<dt><b>˜i </b> <i>string</i></dt>
|
|
|
|
<dd>Insert the value of the named variable, followed by a <newline>, into the text of the message. If the string is unset or
|
|
null, the message shall not be changed.</dd>
|
|
|
|
<dt><b>˜m [</b><i>msglist</i><b>]</b></dt>
|
|
|
|
<dd>Insert the specified messages into the message, prefixing non-empty lines with the string in the <b>indentprefix</b> variable.
|
|
This command escape also shall insert message headers into the message, with field selection affected by the <b>discard</b>,
|
|
<b>ignore</b>, and <b>retain</b> commands.</dd>
|
|
|
|
<dt><b>˜M [</b><i>msglist</i><b>]</b></dt>
|
|
|
|
<dd>This shall be the equivalent of the <b>˜m</b> command escape, except that all headers shall be included in the message,
|
|
regardless of previous <b>discard</b>, <b>ignore</b>, and <b>retain</b> commands.</dd>
|
|
|
|
<dt><b>˜p</b></dt>
|
|
|
|
<dd>Write the message being entered. If the message is longer than <b>crt</b> lines (see <a href="#tag_04_83_13_02">Internal
|
|
Variables in mailx</a> ), the output shall be paginated as described for the <i>PAGER</i> variable.</dd>
|
|
|
|
<dt><b>˜q</b></dt>
|
|
|
|
<dd>Quit (see the <b>quit</b> command) from input mode by simulating an interrupt. If the body of the message is not empty, the
|
|
partial message shall be saved in the dead-letter file. See <i>DEAD</i> for a description of this file.</dd>
|
|
|
|
<dt><b>˜r </b> <i>file</i>, <b>˜< </b>
|
|
<i>file</i>, <b>˜r !</b><i>command</i>, <b>˜< !</b><i>command</i></dt>
|
|
|
|
<dd><br>
|
|
Read in the file specified by the pathname <i>file</i>. If the argument begins with an exclamation mark ( <tt>'!'</tt> ), the rest
|
|
of the string shall be taken as an arbitrary system command; the command interpreter specified by <i>SHELL</i> shall be invoked
|
|
with two arguments: <b>-c</b> and <i>command</i>. The standard output of <i>command</i> shall be inserted into the message.</dd>
|
|
|
|
<dt><b>˜s </b> <i>string</i></dt>
|
|
|
|
<dd>Set the subject line to <i>string</i>.</dd>
|
|
|
|
<dt><b>˜t </b> <i>name</i>...</dt>
|
|
|
|
<dd>Add the given <i>name</i>s to the <b>To</b> list.</dd>
|
|
|
|
<dt><b>˜v</b></dt>
|
|
|
|
<dd>Invoke the full-screen editor, as specified by the <i>VISUAL</i> environment variable, on the partial message.</dd>
|
|
|
|
<dt><b>˜w </b> <i>file</i></dt>
|
|
|
|
<dd>Write the partial message, without the header, onto the file named by the pathname <i>file</i>. The file shall be created or
|
|
the message shall be appended to it if the file exists.</dd>
|
|
|
|
<dt><b>˜x</b></dt>
|
|
|
|
<dd>Exit as with <b>˜q</b>, except the message shall not be saved in the dead-letter file.</dd>
|
|
|
|
<dt><b>˜| </b> <i>command</i></dt>
|
|
|
|
<dd>Pipe the body of the message through the given <i>command</i> by invoking the command interpreter specified by <i>SHELL</i>
|
|
with two arguments: <b>-c</b> and <i>command</i>. If the <i>command</i> returns a successful exit status, the standard output of
|
|
the command shall replace the message. Otherwise, the message shall remain unchanged. If the <i>command</i> fails, an error message
|
|
giving the exit status shall be written.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_14"></a>EXIT STATUS</h4>
|
|
|
|
<blockquote>
|
|
<p>When the <b>-e</b> option is specified, the following exit values are returned:</p>
|
|
|
|
<dl compact>
|
|
<dt> 0</dt>
|
|
|
|
<dd>Mail was found.</dd>
|
|
|
|
<dt>>0</dt>
|
|
|
|
<dd>Mail was not found or an error occurred.</dd>
|
|
</dl>
|
|
|
|
<p>Otherwise, the following exit values are returned:</p>
|
|
|
|
<dl compact>
|
|
<dt> 0</dt>
|
|
|
|
<dd>Successful completion; note that this status implies that all messages were <i>sent</i>, but it gives no assurances that any of
|
|
them were actually <i>delivered</i>.</dd>
|
|
|
|
<dt>>0</dt>
|
|
|
|
<dd>An error occurred.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_15"></a>CONSEQUENCES OF ERRORS</h4>
|
|
|
|
<blockquote>
|
|
<p>When in input mode (Receive Mode) or Send Mode:</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>If an error is encountered processing a command escape (see <a href="#tag_04_83_13_49">Command Escapes in mailx</a> ), a
|
|
diagnostic message shall be written to standard error, and the message being composed may be modified, but this condition shall not
|
|
prevent the message from being sent.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Other errors shall prevent the sending of the message.</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<p>When in command mode:</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>Default.</p>
|
|
</li>
|
|
</ul>
|
|
</blockquote>
|
|
|
|
<hr>
|
|
<div class="box"><em>The following sections are informative.</em></div>
|
|
|
|
<h4><a name="tag_04_83_16"></a>APPLICATION USAGE</h4>
|
|
|
|
<blockquote>
|
|
<p>Delivery of messages to remote systems requires the existence of communication paths to such systems. These need not exist.</p>
|
|
|
|
<p>Input lines are limited to {LINE_MAX} bytes, but mailers between systems may impose more severe line-length restrictions. This
|
|
volume of IEEE Std 1003.1-2001 does not place any restrictions on the length of messages handled by <i>mailx</i>, and for
|
|
delivery of local messages the only limitations should be the normal problems of available disk space for the target mail file.
|
|
When sending messages to external machines, applications are advised to limit messages to less than 100000 bytes because some mail
|
|
gateways impose message-length restrictions.</p>
|
|
|
|
<p>The format of the system mailbox is intentionally unspecified. Not all systems implement system mailboxes as flat files,
|
|
particularly with the advent of multimedia mail messages. Some system mailboxes may be multiple files, others records in a
|
|
database. The internal format of the messages themselves is specified with the historical format from Version 7, but only
|
|
after the messages have been saved in some file other than the system mailbox. This was done so that many historical applications
|
|
expecting text-file mailboxes are not broken.</p>
|
|
|
|
<p>Some new formats for messages can be expected in the future, probably including binary data, bit maps, and various multimedia
|
|
objects. As described here, <i>mailx</i> is not prohibited from handling such messages, but it must store them as text files in
|
|
secondary mailboxes (unless some extension, such as a variable or command line option, is used to change the stored format). Its
|
|
method of doing so is implementation-defined and might include translating the data into text file-compatible or readable form or
|
|
omitting certain portions of the message from the stored output.</p>
|
|
|
|
<p>The <b>discard</b> and <b>ignore</b> commands are not inverses of the <b>retain</b> command. The <b>retain</b> command discards
|
|
all header-fields except those explicitly retained. The <b>discard</b> command keeps all header-fields except those explicitly
|
|
discarded. If headers exist on the retained header list, <b>discard</b> and <b>ignore</b> commands are ignored.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_17"></a>EXAMPLES</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_18"></a>RATIONALE</h4>
|
|
|
|
<blockquote>
|
|
<p>The standard developers felt strongly that a method for applications to send messages to specific users was necessary. The
|
|
obvious example is a batch utility, running non-interactively, that wishes to communicate errors or results to a user. However, the
|
|
actual format, delivery mechanism, and method of reading the message are clearly beyond the scope of this volume of
|
|
IEEE Std 1003.1-2001.</p>
|
|
|
|
<p>The intent of this command is to provide a simple, portable interface for sending messages non-interactively. It merely defines
|
|
a "front-end" to the historical mail system. It is suggested that implementations explicitly denote the sender and recipient in
|
|
the body of the delivered message. Further specification of formats for either the message envelope or the message itself were
|
|
deliberately not made, as the industry is in the midst of changing from the current standards to a more internationalized standard
|
|
and it is probably incorrect, at this time, to require either one.</p>
|
|
|
|
<p>Implementations are encouraged to conform to the various delivery mechanisms described in the CCITT X.400 standards or to the
|
|
equivalent Internet standards, described in Internet Request for Comment (RFC) documents RFC 819, RFC 822, RFC 920,
|
|
RFC 921, and RFC 1123.</p>
|
|
|
|
<p>Many historical systems modified each body line that started with <b>From </b> by prefixing the <tt>'F'</tt> with
|
|
<tt>'>'</tt> . It is unnecessary, but allowed, to do that when the string does not follow a blank line because it cannot be
|
|
confused with the next header.</p>
|
|
|
|
<p>The <b>edit</b> and <b>visual</b> commands merely edit the specified messages in a temporary file. They do not modify the
|
|
contents of those messages in the mailbox; such a capability could be added as an extension, such as by using different command
|
|
names.</p>
|
|
|
|
<p>The restriction on a subject line being {LINE_MAX}-10 bytes is based on the historical format that consumes 10 bytes for
|
|
<b>Subject: </b> and the trailing <newline>. Many historical mailers that a message may encounter on other systems are
|
|
not able to handle lines that long, however.</p>
|
|
|
|
<p>Like the utilities <a href="../utilities/logger.html"><i>logger</i></a> and <a href="../utilities/lp.html"><i>lp</i></a>,
|
|
<i>mailx</i> admittedly is difficult to test. This was not deemed sufficient justification to exclude this utility from this volume
|
|
of IEEE Std 1003.1-2001. It is also arguable that it is, in fact, testable, but that the tests themselves are not
|
|
portable.</p>
|
|
|
|
<p>When <i>mailx</i> is being used by an application that wishes to receive the results as if none of the User Portability
|
|
Utilities option features were supported, the <i>DEAD</i> environment variable must be set to <b>/dev/null</b>. Otherwise, it may
|
|
be subject to the file creations described in <i>mailx</i> ASYNCHRONOUS EVENTS. Similarly, if the <i>MAILRC</i> environment
|
|
variable is not set to <b>/dev/null</b>, historical versions of <i>mailx</i> and <i>Mail</i> read initialization commands from a
|
|
file before processing begins. Since the initialization that a user specifies could alter the contents of messages an application
|
|
is trying to send, such applications must set <i>MAILRC</i> to <b>/dev/null</b>.</p>
|
|
|
|
<p>The description of <i>LC_TIME</i> uses "may affect" because many historical implementations do not or cannot manipulate the
|
|
date and time strings in the incoming mail headers. Some headers found in incoming mail do not have enough information to determine
|
|
the timezone in which the mail originated, and, therefore, <i>mailx</i> cannot convert the date and time strings into the internal
|
|
form that then is parsed by routines like <a href="../functions/strftime.html"><i>strftime</i>()</a> that can take <i>LC_TIME</i>
|
|
settings into account. Changing all these times to a user-specified format is allowed, but not required.</p>
|
|
|
|
<p>The paginator selected when <i>PAGER</i> is null or unset is partially unspecified to allow the System V historical practice of
|
|
using <i>pg</i> as the default. Bypassing the pagination function, such as by declaring that <a href=
|
|
"../utilities/cat.html"><i>cat</i></a> is the paginator, would not meet with the intended meaning of this description. However, any
|
|
"portable user" would have to set <i>PAGER</i> explicitly to get his or her preferred paginator on all systems. The paginator
|
|
choice was made partially unspecified, unlike the <i>VISUAL</i> editor choice (mandated to be <a href=
|
|
"../utilities/vi.html"><i>vi</i></a>) because most historical pagers follow a common theme of user input, whereas editors differ
|
|
dramatically.</p>
|
|
|
|
<p>Options to specify addresses as <b>cc</b> (carbon copy) or <b>bcc</b> (blind carbon copy) were considered to be format details
|
|
and were omitted.</p>
|
|
|
|
<p>A zero exit status implies that all messages were <i>sent</i>, but it gives no assurances that any of them were actually
|
|
<i>delivered</i>. The reliability of the delivery mechanism is unspecified and is an appropriate marketing distinction between
|
|
systems.</p>
|
|
|
|
<p>In order to conform to the Utility Syntax Guidelines, a solution was required to the optional <i>file</i> option-argument to
|
|
<b>-f</b>. By making <i>file</i> an operand, the guidelines are satisfied and users remain portable. However, it does force
|
|
implementations to support usage such as:</p>
|
|
|
|
<pre>
|
|
<tt>mailx -fin mymail.box
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>The <b>no</b> <i>name</i> method of unsetting variables is not present in all historical systems, but it is in System V and
|
|
provides a logical set of commands corresponding to the format of the display of options from the <i>mailx</i> <a href=
|
|
"../utilities/set.html"><i>set</i></a> command without arguments.</p>
|
|
|
|
<p>The <b>ask</b> and <b>asksub</b> variables are the names selected by BSD and System V, respectively, for the same feature. They
|
|
are synonyms in this volume of IEEE Std 1003.1-2001.</p>
|
|
|
|
<p>The <i>mailx</i> <a href="../utilities/echo.html"><i>echo</i></a> command was not documented in the BSD version and has been
|
|
omitted here because it is not obviously useful for interactive users.</p>
|
|
|
|
<p>The default prompt on the System V <i>mailx</i> is a question mark, on BSD <i>Mail</i> an ampersand. Since this volume of
|
|
IEEE Std 1003.1-2001 chose the <i>mailx</i> name, it kept the System V default, assuming that BSD users would not have
|
|
difficulty with this minor incompatibility (that they can override).</p>
|
|
|
|
<p>The meanings of <b>r</b> and <b>R</b> are reversed between System V <i>mailx</i> and SunOS <i>Mail</i>. Once again, since this
|
|
volume of IEEE Std 1003.1-2001 chose the <i>mailx</i> name, it kept the System V default, but allows the SunOS user to
|
|
achieve the desired results using <b>flipr</b>, an internal variable in System V <i>mailx</i>, although it has not been documented
|
|
in the SVID.</p>
|
|
|
|
<p>The <b>indentprefix</b> variable, the <b>retain</b> and <b>unalias</b> commands, and the <b>˜F</b> and <b>˜M</b>
|
|
command escapes were adopted from 4.3 BSD <i>Mail</i>.</p>
|
|
|
|
<p>The <b>version</b> command was not included because no sufficiently general specification of the version information could be
|
|
devised that would still be useful to a portable user. This command name should be used by suppliers who wish to provide version
|
|
information about the <i>mailx</i> command.</p>
|
|
|
|
<p>The "implementation-specific (unspecified) system start-up file" historically has been named <b>/etc/mailx.rc</b>, but this
|
|
specific name and location are not required.</p>
|
|
|
|
<p>The intent of the wording for the <b>next</b> command is that if any command has already displayed the current message it should
|
|
display a following message, but, otherwise, it should display the current message. Consider the command sequence:</p>
|
|
|
|
<pre>
|
|
<tt>next 3
|
|
delete 3
|
|
next
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>where the <b>autoprint</b> option was not set. The normative text specifies that the second <b>next</b> command should display a
|
|
message following the third message, because even though the current message has not been displayed since it was set by the
|
|
<b>delete</b> command, it has been displayed since the current message was anything other than message number 3. This does not
|
|
always match historical practice in some implementations, where the command file address followed by <b>next</b> (or the default
|
|
command) would skip the message for which the user had searched.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_19"></a>FUTURE DIRECTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_20"></a>SEE ALSO</h4>
|
|
|
|
<blockquote>
|
|
<p><a href="xcu_chap02.html#tag_02"><i>Shell Command Language</i></a> , <a href="ed.html"><i>ed</i></a> , <a href=
|
|
"ls.html"><i>ls</i></a> , <a href="more.html"><i>more</i></a> , <a href="vi.html"><i>vi</i></a></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_21"></a>CHANGE HISTORY</h4>
|
|
|
|
<blockquote>
|
|
<p>First released in Issue 2.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_22"></a>Issue 5</h4>
|
|
|
|
<blockquote>
|
|
<p>The description of the <i>EDITOR</i> environment variable is changed to indicate that <a href=
|
|
"../utilities/ed.html"><i>ed</i></a> is the default editor if this variable is not set. In previous issues, this default was not
|
|
stated explicitly at this point but was implied further down in the text.</p>
|
|
|
|
<p>The FUTURE DIRECTIONS section is added.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_83_23"></a>Issue 6</h4>
|
|
|
|
<blockquote>
|
|
<p>The following new requirements on POSIX implementations derive from alignment with the Single UNIX Specification:</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>The <b>-F</b> option is added.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The <b>allnet</b>, <b>debug</b>, and <b>sendwait</b> internal variables are added.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The <b>C</b>, <b>ec</b>, <b>fo</b>, <b>F</b>, and <b>S</b> <i>mailx</i> commands are added.</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<p>In the DESCRIPTION and ENVIRONMENT VARIABLES sections, text stating " <i>HOME</i> directory" is replaced by "directory
|
|
referred to by the <i>HOME</i> environment variable".</p>
|
|
|
|
<p>The <i>mailx</i> utility is aligned with the IEEE P1003.2b draft standard, which includes various clarifications to resolve
|
|
IEEE PASC Interpretations submitted for the ISO POSIX-2:1993 standard. In particular, the changes here address IEEE PASC
|
|
Interpretations 1003.2 #10, #11, #103, #106, #108, #114, #115, #122, and #129.</p>
|
|
|
|
<p>The normative text is reworded to avoid use of the term "must" for application requirements.</p>
|
|
|
|
<p>The <i>TZ</i> entry is added to the ENVIRONMENT VARIABLES section.</p>
|
|
</blockquote>
|
|
|
|
<div class="box"><em>End of informative text.</em></div>
|
|
|
|
<hr>
|
|
<hr size="2" noshade>
|
|
<center><font size="2"><!--footer start-->
|
|
UNIX ® is a registered Trademark of The Open Group.<br>
|
|
POSIX ® is a registered Trademark of The IEEE.<br>
|
|
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
|
|
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
|
|
]</font></center>
|
|
|
|
<!--footer end-->
|
|
<hr size="2" noshade>
|
|
</body>
|
|
</html>
|
|
|