Your IP : 216.73.216.155


Current Path : /usr/share/doc/heirloom-mailx/
Upload File :
Current File : //usr/share/doc/heirloom-mailx/heirloom-mailx.1.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<TITLE>mailx.1</TITLE>
<META NAME="keywords" CONTENT="mailx, Linux, Unix, Solaris, command, utility, tool, manual page, manpage,
source, source code, open source, free software, implementation">
<STYLE TYPE="text/css">
<!-- BODY { max-width:480pt; }
BODY,TD,P,BLOCKQUOTE,PRE { text-align:justify;
	font-family:Verdana,Arial,Helvetica,sans-serif;
	font-size:10pt; line-height:14pt; }
H1,H2,H3,H4,H5,H6 { color:#666666; 
	font-family:Verdana,Arial,Helvetica,sans-serif; }
H1 { line-height:32pt; font-size:24pt; font-weight:bold; }
H3 { line-height:20pt; font-size:16pt; font-weight:bold;
	margin-bottom: 0px; }
H4 { line-height:16pt; font-size:13pt; font-weight:bold;
	margin-bottom: 0px; }
BLOCKQUOTE { margin-top: 0px; } 
HR { width:100%; height:1pt; border-width:0px; background-color:#AAAAAA; }
ADDRESS { font-style:normal; } //--> </STYLE> </HEAD>
<BODY><A NAME=top></A>
<!--  t -->
<!--  Copyright (c) 1980, 1990, 1993 -->
<!--      The Regents of the University of California.  All rights reserved. -->
<!--  Copyright (c) 2000 -->
<!--      Gunnar Ritter.  All rights reserved. -->
<!--  -->
<!--  Redistribution and use in source and binary forms, with or without -->
<!--  modification, are permitted provided that the following conditions -->
<!--  are met: -->
<!--  1. Redistributions of source code must retain the above copyright -->
<!--     notice, this list of conditions and the following disclaimer. -->
<!--  2. Redistributions in binary form must reproduce the above copyright -->
<!--     notice, this list of conditions and the following disclaimer in the -->
<!--     documentation and/or other materials provided with the distribution. -->
<!--  3. All advertising materials mentioning features or use of this software -->
<!--     must display the following acknowledgement: -->
<!--      This product includes software developed by the University of -->
<!--      California, Berkeley and its contributors. -->
<!--      This product includes software developed by Gunnar Ritter -->
<!--      and his contributors. -->
<!--  4. Neither the name of the University nor the names of its contributors -->
<!--     may be used to endorse or promote products derived from this software -->
<!--     without specific prior written permission. -->
<!--  -->
<!--  THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS '\fIAS IS\fR' AND -->
<!--  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -->
<!--  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -->
<!--  ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -->
<!--  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -->
<!--  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -->
<!--  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -->
<!--  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -->
<!--  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -->
<!--  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -->
<!--  SUCH DAMAGE. -->
<!--  -->
<!--      Sccsid: @(#)mailx.1	2.326 (gritter) 10/1/07 -->
<!--  -->
<CENTER>
<H1><HR><NOBR>MAILX (1)</NOBR><HR></H1>
</CENTER>
<A name=0>

     <H3>NAME</H3>

</A>
<BLOCKQUOTE>
mailx - send and receive Internet mail
</BLOCKQUOTE>
<A name=contents></A><H3>CONTENTS</H3></A>
<BLOCKQUOTE>
<A HREF=#1>Synopsis</A><BR>
<A HREF=#2>Description</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#3>Sending mail</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#4>Reading mail</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#5>Disposing of mail</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#6>Specifying messages</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#7>Replying to or originating mail</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#8>Ending a mail processing session</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#9>Personal and systemwide distribution lists</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#10>Recipient address specifications</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#11>Network mail (Internet / ARPA, UUCP, Berknet)</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#12>MIME types</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#13>Character sets</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#14>Commands</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#15>Tilde escapes</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#16>Variable options</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#17>Binary options</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#18>String Options</A><BR>
<A HREF=#19>Environment Variables</A><BR>
<A HREF=#20>Files</A><BR>
<A HREF=#21>Examples</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#22>Getting started</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#23>IMAP or POP3 client setup</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#24>Creating a score file or message filter</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#25>Activating the Bayesian filter</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#26>Reading HTML mail</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#27>Viewing PDF attachments</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#28>Signed and encrypted messages with S/MIME</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#29>Using CRLs with S/MIME or SSL/TLS</A><BR>
&nbsp; &nbsp; &nbsp;<A HREF=#30>Sending mail from scripts</A><BR>
<A HREF=#31>See Also</A><BR>
<A HREF=#32>Notes</A><BR>
</BLOCKQUOTE>
<A name=33>

     <H3>SYNOPSIS</H3>

</A>
<BLOCKQUOTE>
<P>
<!-- ignored unsupported tag .ad -->
<B>mailx</B> [<B>-BDdEFintv~</B>]
[<B>-s</B><I>&nbsp;subject</I>] [<B>-a</B><I>&nbsp;attachment</I> ]
[<B>-c</B><I>&nbsp;cc-addr</I>] [<B>-b</B><I>&nbsp;bcc-addr</I>] [<B>-r</B><I>&nbsp;from-addr</I>]
[<B>-h</B><I>&nbsp;hops</I>]
[<B>-A</B><I>&nbsp;account</I>]
[<B>-S</B><I>&nbsp;variable</I>[<B>=</B><I>value</I>]]
<I>to-addr</I> .&nbsp;.&nbsp;.
<P>
<!-- ignored unsupported tag .ad -->
<B>mailx</B> [<B>-BDdeEHiInNRv~</B>] [<B>-T</B><I>&nbsp;name</I>]
[<B>-A</B><I>&nbsp;account</I>]
[<B>-S</B><I>&nbsp;variable</I>[<B>=</B><I>value</I>]]
<B>-f</B> [<I>name</I>]
<P>
<!-- ignored unsupported tag .ad -->
<B>mailx</B> [<B>-BDdeEinNRv~</B>]
[<B>-A</B><I>&nbsp;account</I>]
[<B>-S</B><I>&nbsp;variable</I>[<B>=</B><I>value</I>]]
[<B>-u</B><I>&nbsp;user</I>]
<!-- ignored unsupported tag .ad -->
</BLOCKQUOTE>
<A name=2>

     <H3>DESCRIPTION</H3>

</A>
<BLOCKQUOTE>
<I>Mailx</I> is an intelligent mail processing system, which has
a command syntax reminiscent of
<a href=http://heirloom.sourceforge.net/man/ed.1.html><i>ed</i></a>(1)
with lines replaced by messages.
It is based on Berkeley Mail 8.1,
is intended to provide the functionality of the POSIX
<B>mailx</B> command,
and offers extensions
for MIME, IMAP, POP3, SMTP, and S/MIME.
<I>Mailx</I> provides enhanced
features for interactive use, such as caching and disconnected
operation for IMAP, message threading, scoring, and filtering.
It is also usable as a mail batch language, both for sending
and receiving mail.
<P>
The following options are accepted:
<TABLE cellpadding=3><!-- tsb: The following options are accepted:
 -->
<TR></TR><TR></TR>
<TR valign=top><TD width=6% nowrap>
<B>-A</B><I>&nbsp;name</I> </TD><TD valign=bottom>
Executes an
<I>account</I> command (see below)
for <I>name</I> after the startup files have been read.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-a</B><I>&nbsp;file</I> </TD><TD valign=bottom>
Attach the given file to the message.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-B</B> </TD><TD valign=bottom>
Make standard input and standard output line-buffered.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>-b</B><I>&nbsp;address</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Send blind carbon copies to list.
List should be a comma-separated
list of names.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>-c</B><I>&nbsp;address</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Send carbon copies to list of users.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-D</B> </TD><TD valign=bottom>
Start in
<I>disconnected</I> mode; see the description for the
<I>disconnected</I> variable option.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-d</B> </TD><TD valign=bottom>
Enables debugging messages and disables the actual delivery of messages.
Unlike
<I>-v</I>, this option is intended for
<I>mailx</I> development only.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-e</B> </TD><TD valign=bottom>
Just check if mail is present in the system mailbox.
If yes, return an exit status of zero,
else, a non-zero value.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-E</B> </TD><TD valign=bottom>
If an outgoing message does not contain any text
in its first or only message part,
do not send it but discard it silently,
effectively setting the
<I>skipemptybody</I> variable at program startup.
This is useful for sending messages
from scripts started by
<I>cron</I>(8).
</TD></TR>
<TR valign=top><TD colspan=2>
<B>-f</B> [<I>file</I>]
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Read in the contents of the user&#39;s mbox
(or the specified file)
for processing;
when
<I>mailx</I> is quit, it writes
undeleted messages back
to this file.
The string <I>file</I> is handled
as described for the
<I>folder</I> command below.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-F</B> </TD><TD valign=bottom>
Save the message to send
in a file named after the local part
of the first recipient&#39;s address.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-H</B> </TD><TD valign=bottom>
Print header summaries for all messages and exit.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-h</B><I> hops</I>
</TD><TD valign=bottom>
Invoke sendmail with the specified hop count.
This option has no effect when SMTP is used for sending mail.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-i</B> </TD><TD valign=bottom>
Ignore tty interrupt signals.
This is
particularly useful when using
<I>mailx</I> on noisy phone lines.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-I</B> </TD><TD valign=bottom>
Shows the &#39;Newsgroup:&#39; or &#39;Article-Id:&#39; fields
in the header summary.
Only applicable in combination with
<I>-f</I>. </TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-n</B> </TD><TD valign=bottom>
Inhibits reading /etc/nail.rc upon startup.
This option should be activated for
<I>mailx</I> scripts that are invoked on more than one machine,
because the contents of that file may differ between them.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-N</B> </TD><TD valign=bottom>
Inhibits the initial display of message headers when reading mail
or editing a mail folder.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-q</B><I>&nbsp;file</I> </TD><TD valign=bottom>
Start the message with the contents of the specified file.
May be given in send mode only.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>-r</B><I>&nbsp;address</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Sets the
<I>From</I> address. Overrides any
<I>from</I> variable specified in environment or startup files.
Tilde escapes are disabled.
The <I>-r</I><I> address</I> options are passed to the mail transfer agent
unless SMTP is used.
This option exists for compatibility only;
it is recommended to set the
<I>from</I> variable directly instead.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-R</B> </TD><TD valign=bottom>
Opens any folders read-only.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>-s</B><I>&nbsp;subject</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Specify subject on command line (only the first argument after the
<I>-s</I> flag is used as a subject; be careful to quote subjects
containing spaces).
</TD></TR>
<TR valign=top><TD colspan=2>
<B>-S</B><I>&nbsp;variable</I>[<B>=</B><I>value</I>]
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Sets the internal option
<I>variable</I> and, in case of a string option,
assigns
<I>value</I> to it.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-T</B><I>&nbsp;name</I> </TD><TD valign=bottom>
Writes the &#39;Message-Id:&#39; and &#39;Article-Id:&#39; header fields
of each message read in the file
<I>name</I>. Implies
<I>-I</I>. Compressed files are handled as described for the
<I>folder</I> command below.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-t</B> </TD><TD valign=bottom>
The message to be sent is expected to contain a message header
with &#39;To:&#39;, &#39;Cc:&#39;, or &#39;Bcc:&#39; fields giving its recipients.
Recipients specified on the command line are ignored.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-u</B><I>&nbsp;user</I> </TD><TD valign=bottom>
Reads the mailbox of the given user name.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-v</B> </TD><TD valign=bottom>
Verbose mode.
The details of
delivery are displayed on the user&#39;s terminal.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-V</B> </TD><TD valign=bottom>
Print <I>mailx</I>&#39;s version and exit.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-~</B> </TD><TD valign=bottom>
Enable tilde escapes even if not in interactive mode.
</TD></TR>
<TR></TR></TABLE><P></BLOCKQUOTE>
<A name=3>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Sending mail</H4>
</A>
<BLOCKQUOTE>
To send a message to one or more people,
<I>mailx</I> can be invoked with arguments
which are the names of people
to whom the mail will be sent.
The user is then expected to type in his message,
followed by an &#39;control-D&#39; at the beginning of a line.
The section below Replying to
or originating mail,
describes some features of <I>mailx</I>
available to help when composing letters.
</BLOCKQUOTE>
<A name=4>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Reading mail</H4>
</A>
<BLOCKQUOTE>
In normal usage <I>mailx</I> is given no arguments
and checks the user&#39;s mail out of the post office,
then prints out a one line header
of each message found.
The current message is initially
the first message (numbered 1)
and can be printed using the print command
which can be abbreviated &#39;p&#39;).
The user can move among the messages
much as he moves between lines in
<a href=http://heirloom.sourceforge.net/man/ed.1.html><i>ed</i></a>(1),
with the commands &#39;+&#39; and &#39;-&#39; moving backwards and forwards,
and simple numbers.
</BLOCKQUOTE>
<A name=5>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Disposing of mail</H4>
</A>
<BLOCKQUOTE>
After examining a message
the user can delete &#39;d&#39;) the message
or reply &#39;r&#39;) to it.
Deletion causes the <I>mailx</I> program
to forget about the message.
This is not irreversible;
the message can be undeleted &#39;u&#39;)
by giving its number,
or the <I>mailx</I> session can be aborted
by giving the exit &#39;x&#39;) command.
Deleted messages will, however,
usually disappear never to be seen again.
</BLOCKQUOTE>
<A name=6>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Specifying messages</H4>
</A>
<BLOCKQUOTE>
Commands such as print and delete
can be given a list of message numbers
as arguments to apply to a number of messages at once.
Thus &#39;<I>delete 1 2</I>&#39; deletes messages 1 and 2,
while &#39;<I>delete 1-5</I>&#39; deletes messages 1 through 5.
In sorted or threaded mode (see the
<I>sort</I> and
<I>thread</I> commands),
&#39;<I>delete 1-5</I>&#39; deletes the messages
that are located between (and including) messages 1 through 5
in the sorted/threaded order,
as shown in the header summary.
The following special message names exist:
<TABLE cellpadding=3><!-- tsb: Commands such as print and delete
 -->
<TR></TR><TR></TR>
<TR valign=top><TD width=6% nowrap>
<B>:n</B> </TD><TD valign=bottom>
All new messages.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>:o</B> </TD><TD valign=bottom>
All old messages (any not in state read or new).
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>:u</B> </TD><TD valign=bottom>
All unread messages.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>:d</B> </TD><TD valign=bottom>
All deleted messages (for the
<I>undelete</I> command).
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>:r</B> </TD><TD valign=bottom>
All read messages.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>:f</B> </TD><TD valign=bottom>
All &#39;flagged&#39; messages.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>:a</B> </TD><TD valign=bottom>
All answered messages
(cf. the
<I>markanswered</I> variable).
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>:t</B> </TD><TD valign=bottom>
All messages marked as draft.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>:k</B> </TD><TD valign=bottom>
All &#39;killed&#39; messages.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>:j</B> </TD><TD valign=bottom>
All messages classified as junk.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>.</B> </TD><TD valign=bottom>
The current message.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>;</B> </TD><TD valign=bottom>
The message that was previously the current message.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>,</B> </TD><TD valign=bottom>
The parent message of the current message,
that is the message with the Message-ID
given in the &#39;In-Reply-To:&#39; field
or the last entry of the &#39;References:&#39; field
of the current message.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-</B> </TD><TD valign=bottom>
The next previous undeleted message,
or the next previous deleted message for the
<I>undelete</I> command.
In sorted/threaded mode,
the next previous such message in the sorted/threaded order.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>+</B> </TD><TD valign=bottom>
The next undeleted message,
or the next deleted message for the
<I>undelete</I> command.
In sorted/threaded mode,
the next such message in the sorted/threaded order.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>^</B> </TD><TD valign=bottom>
The first undeleted message,
or the first deleted message
for the
<I>undelete</I> command.
In sorted/threaded mode,
the first such message in the sorted/threaded order.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>$</B> </TD><TD valign=bottom>
The last message.
In sorted/threaded mode,
the last message in the sorted/threaded order.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>&amp;</B><I>x</I> </TD><TD valign=bottom>
In threaded mode,
selects the message addressed with
<I>x</I>, where
<I>x</I> is any other message specification,
and all messages from the thread that begins at it.
Otherwise, it is identical to
<I>x</I>. If
<I>x</I> is omitted,
the thread beginning with the current message is selected.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>*</B> </TD><TD valign=bottom>
All messages.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>&#39;</B> </TD><TD valign=bottom>
All messages that were included in the message list
for the previous command.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>/</B><I>string</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that contain
<I>string</I> in the subject field (case ignored).
See also the
<I>searchheaders</I> variable.
If
<I>string</I> is empty,
the string from the previous specification of that type is used again.
</TD></TR>
<TR valign=top><TD colspan=2>
<I>address</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages from
<I>address</I>. </TD></TR>
<TR valign=top><TD colspan=2>
<B>(</B><I>criterion</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that satisfy the given IMAP-style SEARCH
<I>criterion</I>. This addressing mode is available with all types of folders;
for folders not located on IMAP servers,
or for servers unable to execute the SEARCH command,
<I>mailx</I> will perform the search locally.
Strings must be enclosed by double quotes &#39;"&#39; in their entirety
if they contain white space or parentheses;
within the quotes,
only backslash &#39;&#92;&#39; is recognized as an escape character.
All string searches are case-insensitive.
When the description indicates
that the &#39;envelope&#39; representation of an address field is used,
this means that the search string is checked against
both a list constructed as
<PRE>
<P>
<B>("</B><I>real name</I><B>" "</B><I>source-route</I><B>" "</B><I>local-part</I><B>" "</B><I>domain-part</I><B>")</B>
<P>
</PRE>
for each address,
and the addresses without real names
from the respective header field.
Criteria can be nested using parentheses.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(</B><I>criterion1 criterion2</I> ... <I>criterionN</I><B>)</B>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that satisfy all of the given criteria.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(or</B><I> criterion1 criterion2</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that satisfy either
<I>criterion1</I> or
<I>criterion2</I>, or both.
To connect more than two criteria using &#39;or&#39;,
(or) specifications have to be nested using additional parentheses,
as with &#39;(or&nbsp;a&nbsp;(or&nbsp;b&nbsp;c))&#39;;
&#39;(or&nbsp;a&nbsp;b&nbsp;c)&#39; means ((a or b) and c).
For a simple &#39;or&#39; operation of independent criteria
on the lowest nesting level,
it is possible to achieve similar effects by using
three separate criteria, as with
&#39;(a)&nbsp;(b)&nbsp;(c)&#39;.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(not</B><I> criterion</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that do not satisfy
<I>criterion</I>. </TD></TR>
<TR valign=top><TD colspan=2>
<B>(bcc</B><I> string</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that contain
<I>string</I> in the &#39;envelope&#39; representation of the
<I>Bcc:</I> field.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(cc</B><I> string</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that contain
<I>string</I> in the &#39;envelope&#39; representation of the
<I>Cc:</I> field.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(from</B><I> string</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that contain
<I>string</I> in the &#39;envelope&#39; representation of the
<I>From:</I> field.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(subject</B><I> string</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that contain
<I>string</I> in the
<I>Subject:</I> field.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(to</B><I> string</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that contain
<I>string</I> in the &#39;envelope&#39; representation of the
<I>To:</I> field.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(header</B><I> name string</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that contain
<I>string</I> in the specified
<I>Name:</I> field.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(body</B><I> string</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that contain
<I>string</I> in their body.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(text</B><I> string</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that contain
<I>string</I> in their header or body.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(larger</B><I> size</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that are larger than
<I>size</I> (in bytes).
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(smaller</B><I> size</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that are smaller than
<I>size</I> (in bytes).
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(before</B><I> date</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that were received before
<I>date</I>; <I>date</I> must be in the form
<I>d</I>[<I>d</I>]<B>-</B><I>mon</I><B>-</B><I>yyyy</I>,
where <I>d</I>[<I>d</I>] is the day of the month
as one or two digits,
<I>mon</I> is the name of the month&#151;one of
&#39;Jan&#39;, &#39;Feb&#39;, &#39;Mar&#39;,
&#39;Apr&#39;, &#39;May&#39;, &#39;Jun&#39;,
&#39;Jul&#39;, &#39;Aug&#39;, &#39;Sep&#39;,
&#39;Oct&#39;, &#39;Nov&#39;, or &#39;Dec&#39;,
and
<I>yyyy</I> is the year as four digits;
e.g. "30-Aug-2004".
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(on</B><I> date</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that were received on the specified date.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(since</B><I> date</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that were received since the specified date.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(sentbefore</B><I> date</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that were sent on the specified date.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(senton</B><I> date</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that were sent on the specified date.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>(sentsince</B><I> date</I><B>)</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
All messages that were sent since the specified date.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>()</B> </TD><TD valign=bottom>
The same criterion as for the previous search.
This specification cannot be used as part of another criterion.
If the previous command line contained more than one independent criterion,
the last of those criteria is used.
</TD></TR>
<!-- PP ends table -->
<TR></TR></TABLE><P>A practical method to read a set of messages
is to issue a
<I>from</I> command with the search criteria first
to check for appropriate messages,
and to read each single message then by typing &#39;<B>&#39;</B>&#39; repeatedly.
</BLOCKQUOTE>
<A name=7>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Replying to or originating mail</H4>
</A>
<BLOCKQUOTE>
The
<I>reply</I> command can be used
to set up a response to a message,
sending it back to the person who it was from.
Text the user types in then,
up to an end-of-file,
defines the contents of the message.
While the user is composing a message,
<I>mailx</I> treats lines beginning with the character &#39;~&#39; specially.
For instance, typing &#39;~m&#39; (alone on a line)
will place a copy of the current message into the response
right shifting it by a tabstop
(see
<I>indentprefix</I> variable, below).
Other escapes will set up subject fields,
add and delete recipients to the message,
attach files to it
and allow the user to escape to an editor
to revise the message
or to a shell to run some commands.
(These options are given in the summary below.)
</BLOCKQUOTE>
<A name=8>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Ending a mail processing session</H4>
</A>
<BLOCKQUOTE>
The user can end a <I>mailx</I> session
with the quit (&#39;q&#39;) command.
Messages which have been examined
go to the user&#39;s mbox file
unless they have been deleted
in which case they are discarded.
Unexamined messages go back
to the post office.
(See the -f option above).
</BLOCKQUOTE>
<A name=9>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Personal and systemwide distribution lists</H4>
</A>
<BLOCKQUOTE>
It is also possible to create
a personal distribution lists so that,
for instance, the user can send mail
to &#39;<I>cohorts</I>&#39; and have it go
to a group of people.
Such lists can be defined by placing a line like
<PRE>
<P>
&nbsp;       <B>alias</B><I> cohorts bill ozalp jkf mark kridle@ucbcory</I>
<P>
</PRE>
in the file .mailrc in the user&#39;s home directory.
The current list of such aliases
can be displayed with the alias command in <I>mailx</I>.
System wide distribution lists can be created
by editing /etc/aliases, see
<I>aliases</I>(5)
and
<I>sendmail</I>(8);
these are kept in a different syntax.
In mail the user sends,
personal aliases will be expanded
in mail sent to others so that
they will be able to reply to the recipients.
System wide aliases are not expanded when the mail is sent,
but any reply returned to the machine
will have the system wide alias expanded
as all mail goes through sendmail.
</BLOCKQUOTE>
<A name=10>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Recipient address specifications</H4>
</A>
<BLOCKQUOTE>
When an address is used to name a recipient
(in any of To, Cc, or Bcc),
names of local mail folders
and pipes to external commands
can also be specified;
the message text is then written to them.
The rules are: Any name which starts with a
&#39;<B>|</B>&#39; character specifies a pipe,
the command string following the &#39;|&#39;
is executed and the message is sent to its standard input;
any other name which contains a
&#39;<B>@</B>&#39; character is treated as a mail address;
any other name which starts with a
&#39;<B>+</B>&#39; character specifies a folder name;
any other name which contains a
&#39;<B>/</B>&#39; character
but no
&#39;<B>!</B>&#39; or
&#39;<B>%</B>&#39; character before also specifies a folder name;
what remains is treated as a mail address.
Compressed folders are handled as described for the
<I>folder</I> command below.
</BLOCKQUOTE>
<A name=11>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Network mail (Internet / ARPA, UUCP, Berknet)</H4>
</A>
<BLOCKQUOTE>
See
<I>mailaddr</I>(7)
for a description of network addresses.
<I>Mailx</I> has a number of options
which can be set in the .mailrc file
to alter its behavior;
thus &#39;<I>set askcc</I>&#39; enables the askcc feature.
(These options are summarized below).
</BLOCKQUOTE>
<A name=12>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; MIME types</H4>
</A>
<BLOCKQUOTE>
For any outgoing attachment,
<I>mailx</I> tries to determine the content type.
It does this by reading MIME type files
whose lines have the following syntax:
<PRE>
<P>
&nbsp;       <I>type</I><B>/</B><I>subtype      extension </I>[<I>extension </I>.&nbsp;.&nbsp;.]
<P>
</PRE>
where type/subtype are strings describing the file contents,
and extension is the part of a filename starting after the last dot.
Any line not immediately beginning with an ASCII alphabetical character is
ignored by <I>mailx</I>.
If there is a match with the extension of the file to attach,
the given type/subtype pair is used.
Otherwise, or if the filename has no extension,
the content types text/plain or application/octet-stream are used,
the first for text or international text files,
the second for any file that contains formatting characters
other than newlines and horizontal tabulators.
</BLOCKQUOTE>
<A name=13>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Character sets</H4>
</A>
<BLOCKQUOTE>
<I>Mailx</I> normally detects the character set of the terminal
using the LC_CTYPE locale setting.
If the locale cannot be used appropriately,
the <I>ttycharset</I> variable should be set
to provide an explicit value.
When reading messages,
their text is converted to the terminal character set if possible.
Unprintable characters and illegal byte sequences are detected
and replaced by Unicode substitute characters or question marks
unless the
<I>print-all-chars</I> is set at initialization time.
<P>
The character set for outgoing messages
is not necessarily the same
as the one used on the terminal.
If an outgoing text message
contains characters not representable in US-ASCII,
the character set being used
must be declared within its header.
Permissible values can be declared
using the <I>sendcharsets</I> variable,
separated by commas;
<I>mailx</I> tries each of the values in order
and uses the first appropriate one.
If the message contains characters that cannot be represented
in any of the given character sets,
the message will not be sent,
and its text will be saved to the &#39;dead.letter&#39; file.
Messages that contain NUL bytes are not converted.
<P>
Outgoing attachments are converted if they are plain text.
If the
<I>sendcharsets</I> variable contains more than one character set name,
the
<I>~@</I> tilde escape will ask for the character sets for individual attachments
if it is invoked without arguments.
<P>
Best results are usually achieved
when
<I>mailx</I> is run in a UTF-8 locale
on a UTF-8 capable terminal.
In this setup,
characters from various countries can be displayed,
while it is still possible to use more simple
character sets for sending
to retain maximum compatibility with older mail clients.
</BLOCKQUOTE>
<A name=14>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Commands</H4>
</A>
<BLOCKQUOTE>
Each command is typed on a line by itself,
and may take arguments following the command word.
The command need not be typed in its entirety -
the first command which matches the typed prefix is used.
For commands which take message lists as arguments,
if no message list is given,
then the next message forward which satisfies
the command&#39;s requirements is used.
If there are no messages forward of the current message,
the search proceeds backwards,
and if there are no good messages at all,
<I>mailx</I> types &#39;<I>applicable messages</I>&#39; and aborts the command.
If the command begins with a <I>#</I> sign,
the line is ignored.
<P>
The arguments to commands can be quoted, using the following methods:
<TABLE cellpadding=3><!-- tsb: The arguments to commands can be quoted, using the following methods:
 -->
<TR></TR><TR></TR>
<TR valign=top><TD width=6%>
o
</TD><TD>
An argument can be enclosed between paired double-quotes
"" or single-quotes &#39;&#39;; any white space, shell
word expansion, or backslash characters within the quotes
are treated literally as part of the argument.
A double-quote will be treated literally within
single-quotes and vice versa. These special properties of
the quote marks occur only when they are paired at the
beginning and end of the argument.
</TD></TR>
<TR valign=top><TD width=6%>
o
</TD><TD>
A backslash outside of the enclosing quotes is discarded
and the following character is treated literally as part of
the argument.
</TD></TR>
<TR valign=top><TD width=6%>
o
</TD><TD>
An unquoted backslash at the end of a command line is
discarded and the next line continues the command.
</TD></TR>
<TR><TD colspan=2>
Filenames, where expected, are subjected to the following
transformations, in sequence:
</TD></TR>
<TR valign=top><TD width=6%>
o
</TD><TD>
If the filename begins with an unquoted plus sign, and
the
<I>folder</I> variable is defined,
the plus sign will be replaced by the value of the
<I>folder</I> variable followed by a slash. If the
<I>folder</I> variable is
unset or is set to null, the filename will be unchanged.
</TD></TR>
<TR valign=top><TD width=6%>
o
</TD><TD>
Shell word expansions are applied to the filename.
If more than a single pathname results
from this expansion and the command is expecting one
file, an error results.
</TD></TR>
<TR><TD colspan=2>
The following commands are provided:
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>-</B> </TD><TD valign=bottom>
Print out the preceding message.
If given a numeric argument n,
goes to the n&#39;th previous message and prints it.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>?</B> </TD><TD valign=bottom>
Prints a brief summary of commands.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>!</B> </TD><TD valign=bottom>
Executes the shell (see
<I>sh</I>(1)
and
<I>csh</I>(1))
command which follows.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>|</B> </TD><TD valign=bottom>
A synonym for the <I>pipe</I> command.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>account</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(ac) Creates, selects or lists
an email account.
An account is formed by a group of commands,
primarily of those to set variables.
With two arguments,
of which the second is a &#39;{&#39;,
the first argument gives an account name,
and the following lines create a group of commands for that account
until a line containing a single &#39;}&#39; appears.
With one argument,
the previously created group of commands
for the account name is executed,
and a
<I>folder</I> command is executed for the system mailbox or inbox
of that account.
Without arguments,
the list of accounts and their contents are printed.
As an example,
<P>
<PRE>
&nbsp;   <B>account</B><I> myisp</I> <B>{</B>
&nbsp;       set folder=imaps://mylogin@imap.myisp.example
&nbsp;       set record=+Sent
&nbsp;       set from="myname@myisp.example (My Name)"
&nbsp;       set smtp=smtp.myisp.example
&nbsp;   <B>}</B>
</PRE>
<P>
creates an account named &#39;myisp&#39;
which can later be selected by specifying &#39;account myisp&#39;.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>alias</B> </TD><TD valign=bottom>
(a) With no arguments,
prints out all currently-defined aliases.
With one argument, prints out that alias.
With more than one argument,
creates a new alias or changes an old one.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>alternates</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(alt) The alternates command is useful
if the user has accounts on several machines.
It can be used to inform <I>mailx</I>
that the listed addresses all belong to the invoking user.
When he replies to messages,
<I>mailx</I> will not send a copy of the message
to any of the addresses
listed on the alternates list.
If the alternates command is given
with no argument,
the current set of alternate names is displayed.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>answered</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(ans) Takes a message list and marks each message
as a having been answered.
This mark has no technical meaning in the mail system;
it just causes messages to be marked in the header summary,
and makes them specially addressable.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>cache</B> </TD><TD valign=bottom>
Only applicable to cached IMAP mailboxes;
takes a message list and reads the specified messages
into the IMAP cache.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>call</B> </TD><TD valign=bottom>
Calls a macro (see the
<I>define</I> command).
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>cd</B> </TD><TD valign=bottom>
Same as chdir.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>certsave</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Only applicable to S/MIME signed messages.
Takes a message list and a file name
and saves the certificates contained within the message signatures
to the named file in both human-readable and PEM format.
The certificates can later be used to send encrypted messages
to the messages&#39; originators by setting the
<I>smime-encrypt-user@host</I> variable.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>chdir</B> </TD><TD valign=bottom>
(ch) Changes the user&#39;s working directory to that specified,
if given.
If no directory is given,
then changes to the user&#39;s login directory.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>classify</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(cl) Takes a list of messages and
examines their contents for characteristics of junk mail
using Bayesian filtering.
Messages considered to be junk are then marked as such.
The junk mail database is not changed.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>collapse</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(coll)
Only applicable to threaded mode.
Takes a message list
and makes all replies to these messages invisible
in header summaries,
unless they are in state &#39;new&#39;.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>connect</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(conn) If operating in disconnected mode on an IMAP mailbox,
switch to online mode and connect to the mail server
while retaining the mailbox status.
See the description of the
<I>disconnected</I> variable for more information.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>copy</B> </TD><TD valign=bottom>
(c) The copy command does the same thing that
<I>save</I> does,
except that it does not mark the messages
it is used on for deletion when the user quits.
Compressed files and IMAP mailboxes are handled as described for the
<I>folder</I> command.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>Copy</B> </TD><TD valign=bottom>
(C) Similar to
<I>copy</I>, but saves the messages in a file named after the local part
of the sender address of the first message.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>decrypt</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(dec) For unencrypted messages,
this command is identical to
<I>copy</I>. Encrypted messages are first decrypted, if possible,
and then copied.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>Decrypt</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(Dec) Similar to
<I>decrypt</I>, but saves the messages in a file named after the local part
of the sender address of the first message.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>define</B> </TD><TD valign=bottom>
(def) Defines a macro.
A macro definition is a sequence of commands in the following form:
<P>
<PRE>
&nbsp;   <B>define</B> <I>name</I><B> {</B>
&nbsp;       <I>command1</I>
&nbsp;       <I>command2</I>
&nbsp;       ...
&nbsp;       <I>commandN</I>
&nbsp;   <B>}</B>
</PRE>
<P>
Once defined, a macro can be explicitly invoked using the
<I>call</I> command,
or can be implicitly invoked by setting the
<I>folder-hook</I> or
<I>folder-hook-fullname</I> variables.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>defines</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Prints the currently defined macros including their contents.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>delete</B> </TD><TD valign=bottom>
(d) Takes a list of messages as argument
and marks them all as deleted.
Deleted messages will not be saved in mbox,
nor will they be available for most other commands.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>discard</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Same as ignore.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>disconnect</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(disco) If operating in online mode on an IMAP mailbox,
switch to disconnected mode while retaining the mailbox status.
See the description of the
<I>disconnected</I> variable for more information.
A list of messages may optionally be given as argument;
the respective messages are then read into the cache
before the connection is closed.
Thus &#39;disco *&#39; makes the entire current mailbox
available for disconnected use.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>dp</B>&nbsp;or<B>&nbsp;dt</B> </TD><TD valign=bottom>
Deletes the current message
and prints the next message.
If there is no next message,
<I>mailx</I> says &#39;<I>at EOF</I>&#39;.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>draft</B> </TD><TD valign=bottom>
Takes a message list and marks each message
as a draft.
This mark has no technical meaning in the mail system;
it just causes messages to be marked in the header summary,
and makes them specially addressable.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>echo</B> </TD><TD valign=bottom>
Echoes its arguments,
resolving special names
as documented for the folder command.
The escape sequences
&#39;<B>&#92;a</B>&#39;,
&#39;<B>&#92;b</B>&#39;,
&#39;<B>&#92;c</B>&#39;,
&#39;<B>&#92;f</B>&#39;,
&#39;<B>&#92;n</B>&#39;,
&#39;<B>&#92;r</B>&#39;,
&#39;<B>&#92;t</B>&#39;,
&#39;<B>&#92;v</B>&#39;,
&#39;<B>&#92;&#92;</B>&#39;, and
&#39;<B>&#92;0</B><I>num</I>&#39;
are interpreted
as with the
<I>echo</I>(1)
command.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>edit</B> </TD><TD valign=bottom>
(e) Takes a list of messages
and points the text editor
at each one in turn.
Modified contents are discarded
unless the
<I>writebackedited</I> variable is set.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>else</B> </TD><TD valign=bottom>
Marks the end of the then-part
of an if statement
and the beginning of the part
to take effect if the condition
of the if statement is false.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>endif</B> </TD><TD valign=bottom>
Marks the end of an if statement.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>exit</B> </TD><TD valign=bottom>
(ex or x) Effects an immediate return to the Shell
without modifying the user&#39;s system mailbox,
his mbox file,
or his edit file in -f.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>file</B> </TD><TD valign=bottom>
(fi) The same as folder.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>flag</B> </TD><TD valign=bottom>
(fl) Takes a message list
and marks the messages as &#39;flagged&#39; for urgent/special attention.
This mark has no technical meaning in the mail system;
it just causes messages to be highlighted in the header summary,
and makes them specially addressable.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>folders</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
With no arguments,
list the names of the folders in the folder directory.
With an existing folder as an argument,
lists then names of folders below the named folder;
e.g. the command &#39;folders @&#39;
lists the folders on the base level of the current IMAP server.
See also the
<I>imap-list-depth</I> variable.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>folder</B> </TD><TD valign=bottom>
(fold) The folder command switches
to a new mail file or folder.
With no arguments, it tells the user
which file he is currently reading.
If an argument is given,
it will write out changes
(such as deletions) the user has made
in the current file and read in
the new file.
Some special conventions are recognized for the name.
<B>#</B> means the previous file,
<B>%</B> means the invoking user&#39;s system mailbox,
<B>%</B><I>user</I> means <I>user&#39;s</I> system mailbox,
<B>&amp;</B> means the invoking user&#39;s mbox file,
and <B>+</B><I>file</I><I> means a </I><I>file</I> in the folder directory.
<B>%:</B><I>filespec</I> expands to the same value as <I>filespec</I>,
but the file is handled as a system mailbox
e.&nbsp;g. by the mbox and save commands.
If the name matches one of the strings defined with the
<I>shortcut</I> command,
it is replaced by its long form and expanded.
If the name ends with <B>.gz</B> or <B>.bz2</B>,
it is treated as compressed with
<I>gzip</I>(1)
or
<I>bzip2</I>(1),
respectively.
Likewise, if <I>name</I> does not exist,
but either <I>name</I><B>.gz</B> or <I>name</I><B>.bz2</B> exists,
the compressed file is used.
If <I>name</I> refers to a directory
with the subdirectories &#39;tmp&#39;, &#39;new&#39;, and &#39;cur&#39;,
it is treated as a folder in
<I>maildir</I> format.
A name of the form
<PRE>
<P>
&nbsp;      <I>protocol</I><B>://</B>[<I>user</I><B>@</B>]<I>host</I>[<B>:</B><I>port</I>][<B>/</B><I>file</I>]
<P>
</PRE>
is taken as an Internet mailbox specification.
The supported protocols are currently
<B>imap</B> (IMAP v4r1),
<B>imaps</B> (IMAP with SSL/TLS encryption),
<B>pop3</B> (POP3),
and
<B>pop3s</B> (POP3 with SSL/TLS encryption).
If
<I>user</I> contains special characters, in particular &#39;/&#39; or &#39;%&#39;,
they must be escaped in URL notation,
as &#39;%2F&#39; or &#39;%25&#39;.
The optional
<I>file</I> part applies to IMAP only;
if it is omitted,
the default &#39;INBOX&#39; is used.
If <I>mailx</I> is connected to an IMAP server,
a name of the form <B>@</B><I>mailbox</I>
refers to the <I>mailbox</I> on that server.
If the &#39;folder&#39; variable refers to an IMAP account,
the special name &#39;%&#39; selects the &#39;INBOX&#39; on that account.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>Followup</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(F) Similar to
<I>Respond</I>, but saves the message in a file
named after the local part of the first recipient&#39;s address.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>followup</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(fo) Similar to
<I>respond</I>, but saves the message in a file
named after the local part of the first recipient&#39;s address.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>followupall</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Similar to
<I>followup</I>, but responds to all recipients regardless of the
<I>flipr</I> and
<I>Replyall</I> variables.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>followupsender</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Similar to
<I>Followup</I>, but responds to the sender only regardless of the
<I>flipr</I> and
<I>Replyall</I> variables.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>forward</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(fwd)
Takes a message and the address of a recipient
and forwards the message to him.
The text of the original message is included in the new one,
with the value of the
<I>fwdheading</I> variable printed before.
The
<I>fwdignore</I> and
<I>fwdretain</I> commands specify which header fields are included in the new message.
Only the first part of a multipart message is included unless the
<I>forward-as-attachment</I> option is set.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>Forward</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(Fwd)
Similar to
<I>forward</I>, but saves the message in a file named after
the local part of the recipient&#39;s address.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>from</B> </TD><TD valign=bottom>
(f) Takes a list of messages
and prints their message headers,
piped through the pager if the output does not fit on the screen.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>fwdignore</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Specifies which header fields are to be ignored with the
<I>forward</I> command.
This command has no effect when the
<I>forward-as-attachment</I> option is set.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>fwdretain</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Specifies which header fields are to be retained with the
<I>forward</I> command.
<I>fwdretain</I> overrides
<I>fwdignore</I>. This command has no effect when the
<I>forward-as-attachment</I> option is set.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>good</B> </TD><TD valign=bottom>
(go) Takes a list of messages
and marks all of them as not being junk mail.
Data from these messages is then inserted
into the junk mail database for future classification.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>headers</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(h) Lists the current range of headers,
which is an 18-message group.
If a &#39;+&#39; argument is given,
then the next 18-message group is printed,
and if a &#39;-&#39; argument is given,
the previous 18-message group is printed.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>help</B> </TD><TD valign=bottom>
A synonym for ?.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>hold</B> </TD><TD valign=bottom>
(ho, also preserve) Takes a message list
and marks each message therein to be saved
in the user&#39;s system mailbox
instead of in mbox.
Does not override the delete command.
<I>mailx</I> deviates from the POSIX standard with this command,
as a &#39;next&#39; command issued after &#39;hold&#39;
will display the following message,
not the current one.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>if</B> </TD><TD valign=bottom>
Commands in <I>mailx</I>&#39;s startup files
can be executed conditionally
depending on whether the user is sending
or receiving mail with the if command.
For example:
<PRE>
<P>
&nbsp;       <B>if </B><I>receive</I>
&nbsp;               <I>commands .&nbsp;.&nbsp;.</I>
&nbsp;       <B>endif</B>
<P>
</PRE>
An else form is also available:
<PRE>
<P>
&nbsp;       <B>if </B><I>receive</I>
&nbsp;               <I>commands .&nbsp;.&nbsp;.</I>
&nbsp;       <B>else</B>
&nbsp;               <I>commands .&nbsp;.&nbsp;.</I>
&nbsp;       <B>endif</B>
<P>
</PRE>
Note that the only allowed conditions are
<B>receive</B>, <B>send</B>, and
<B>term</B> (execute command if standard input is a tty).
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>ignore</B> </TD><TD valign=bottom>
Add the list of header fields named to the ignored list.
Header fields in the ignore list are not printed
on the terminal when a message is printed.
This command is very handy for suppression
of certain machine-generated header fields.
The Type and Print commands can be used
to print a message in its entirety,
including ignored fields.
If ignore is executed with no arguments,
it lists the current set of ignored fields.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>imap</B> </TD><TD valign=bottom>
Sends command strings directly to the current IMAP server.
<I>Mailx</I> operates always in IMAP <I>selected state</I>
on the current mailbox;
commands that change this
will produce undesirable results
and should be avoided.
Useful IMAP commands are:
<TABLE width=100% cellpadding=3><!-- tsb: Sends command strings directly to the current IMAP server.
 -->
<TR></TR><TR></TR>
<TR valign=top><TD width=6% nowrap>
<B>create</B> </TD><TD valign=bottom>
Takes the name of an IMAP mailbox as an argument
and creates it.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>getquotaroot</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
<!--  RFC 2087 -->
Takes the name of an IMAP mailbox as an argument
and prints the quotas that apply to the mailbox.
Not all IMAP servers support this command.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>namespace</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
<!--  RFC 2342 -->
Takes no arguments and prints the Personal Namespaces,
the Other User&#39;s Namespaces,
and the Shared Namespaces.
Each namespace type is printed in parentheses;
if there are multiple namespaces of the same type,
inner parentheses separate them.
For each namespace,
a namespace prefix and a hierarchy separator is listed.
Not all IMAP servers support this command.
</TD></TR>
<TR></TR></TABLE><P></TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>inc</B> </TD><TD valign=bottom>
Same as
<I>newmail</I>. </TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>junk</B> </TD><TD valign=bottom>
(j) Takes a list of messages
and marks all of them as junk mail.
Data from these messages is then inserted
into the junk mail database for future classification.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>kill</B> </TD><TD valign=bottom>
(k) Takes a list of messages and &#39;kills&#39; them.
Killed messages are not printed in header summaries,
and are ignored by the
<I>next</I> command.
The
<I>kill</I> command also sets the score of the messages to negative infinity,
so that subsequent
<I>score</I> commands will not unkill them again.
Killing is only effective for the current session on a folder;
when it is quit, all messages are automatically unkilled.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>list</B> </TD><TD valign=bottom>
Prints the names of all available commands.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>Mail</B> </TD><TD valign=bottom>
(M) Similar to
<I>mail</I>, but saves the message in a file
named after the local part of the first recipient&#39;s address.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>mail</B> </TD><TD valign=bottom>
(m) Takes as argument login names
and distribution group names
and sends mail to those people.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>mbox</B> </TD><TD valign=bottom>
Indicate that a list of messages be sent
to mbox in the user&#39;s home directory when
<I>mailx</I> is quit.
This is the default action for messages
if unless the
<I>hold</I> option is set.
<I>mailx</I> deviates from the POSIX standard with this command,
as a &#39;next&#39; command issued after &#39;mbox&#39;
will display the following message,
not the current one.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>move</B> </TD><TD valign=bottom>
(mv) Acts like
<I>copy</I>, but marks the messages for deletion
if they were transferred successfully.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>Move</B> </TD><TD valign=bottom>
(Mv) Similar to
<I>move</I>, but moves the messages to a file named after the local part
of the sender address of the first message.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>newmail</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Checks for new mail in the current folder
without committing any changes before.
If new mail is present, a message is printed.
If the
<I>header</I> variable is set,
the headers of each new message are also printed.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>next</B> </TD><TD valign=bottom>
(n) like + or CR) Goes to the next message
in sequence and types it.
With an argument list, types the next matching message.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>New</B> </TD><TD valign=bottom>
Same as
<I>unread</I>. </TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>new</B> </TD><TD valign=bottom>
Same as
<I>unread</I>. </TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>online</B> </TD><TD valign=bottom>
Same as
<I>connect</I>. </TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>noop</B> </TD><TD valign=bottom>
If the current folder is located on an IMAP or POP3 server,
a NOOP command is sent.
Otherwise, no operation is performed.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>Pipe</B> </TD><TD valign=bottom>
(Pi) Like
<I>pipe</I> but also
pipes ignored header fields
and all parts of MIME
<I>multipart/alternative</I> messages.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>pipe</B> </TD><TD valign=bottom>
(pi) Takes a message list and a shell command
and pipes the messages through the command.
Without an argument,
the current message is piped
through the command given by the <I>cmd</I> variable.
If the <I> page</I> variable is set,
every message is followed by a formfeed character.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>preserve</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(pre) A synonym for
<I>hold</I>. </TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>Print</B> </TD><TD valign=bottom>
(P) Like
<I>print</I> but also
prints out ignored header fields
and all parts of MIME
<I>multipart/alternative</I> messages.
See also
<I>print</I>, <I>ignore</I>, and
<I>retain</I>. </TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>print</B> </TD><TD valign=bottom>
(p) Takes a message list and types out each message
on the user&#39;s terminal.
If the message is a MIME multipart message,
all parts with a content type of &#39;text&#39; or &#39;message&#39; are shown,
the other are hidden except for their headers.
Messages are decrypted and converted to the terminal character set
if necessary.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>probability</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(prob) For each word given as argument,
the contents of its junk mail database entry are printed.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>quit</B> </TD><TD valign=bottom>
(q) Terminates the session, saving all undeleted,
unsaved messages in the user&#39;s mbox file in his login directory,
preserving all messages marked with hold or preserve
or never referenced in his system mailbox,
and removing all other messages from his system mailbox.
If new mail has arrived during the session,
the message &#39;<I>You have new mail</I>&#39; is given.
If given while editing a mailbox file with the -f flag,
then the edit file is rewritten.
A return to the Shell is effected,
unless the rewrite of edit file fails,
in which case the user can escape
with the exit command.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>redirect</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(red) Same as
<I>resend</I>. </TD></TR>
<TR valign=top><TD colspan=2>
<B>Redirect</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(Red) Same as
<I>Resend</I>. </TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>remove</B> </TD><TD valign=bottom>
(rem) Removes the named folders.
The user is asked for confirmation
in interactive mode.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>rename</B> </TD><TD valign=bottom>
(ren) Takes the name of an existing folder
and the name for the new folder
and renames the first to the second one.
Both folders must be of the same type
and must be located on the current server for IMAP.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>Reply</B> </TD><TD valign=bottom>
(R) Reply to originator.
Does not reply to other recipients
of the original message.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>reply</B> </TD><TD valign=bottom>
(r) Takes a message list and sends mail
to the sender and all recipients of the specified message.
The default message must not be deleted.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>replyall</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Similar to
<I>reply</I>, but responds to all recipients regardless of the
<I>flipr</I> and
<I>Replyall</I> variables.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>replysender</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Similar to
<I>Reply</I>, but responds to the sender only regardless of the
<I>flipr</I> and
<I>Replyall</I> variables.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>Resend</B> </TD><TD valign=bottom>
Like
<I>resend</I>, but does not add any header lines.
This is not a way to hide the sender&#39;s identity,
but useful for sending a message again
to the same recipients.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>resend</B> </TD><TD valign=bottom>
Takes a list of messages and a user name
and sends each message to the named user.
&#39;Resent-From:&#39; and related header fields are prepended
to the new copy of the message.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>Respond</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Same as
<I>Reply</I>. </TD></TR>
<TR valign=top><TD colspan=2>
<B>respond</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Same as
<I>reply</I>. </TD></TR>
<TR valign=top><TD colspan=2>
<B>respondall</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Same as
<I>replyall</I>. </TD></TR>
<TR valign=top><TD colspan=2>
<B>respondsender</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Same as
<I>replysender</I>. </TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>retain</B> </TD><TD valign=bottom>
Add the list of header fields named to the retained list.
Only the header fields in the retain list are shown
on the terminal when a message is printed.
All other header fields are suppressed.
The Type and Print commands can be used
to print a message in its entirety.
If retain is executed with no arguments,
it lists the current set of retained fields.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>Save</B> </TD><TD valign=bottom>
(S)
Similar to
<I>save</I>, but saves the messages
in a file named after the local part
of the sender of the first message
instead of taking a filename argument.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>save</B> </TD><TD valign=bottom>
(s) Takes a message list and a filename
and appends each message
in turn to the end of the file.
If no filename is given,
the mbox file is used.
The filename in quotes,
followed by the line count and character count
is echoed on the user&#39;s terminal.
If editing a system mailbox,
the messages are marked for deletion.
Compressed files and IMAP mailboxes are handled as described for the
<I>-f</I> command line option above.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>savediscard</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Same as saveignore.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>saveignore</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Saveignore is to save what ignore is to print and type.
Header fields thus marked are filtered out
when saving a message by save
or when automatically saving to mbox.
This command should only be applied to header fields
that do not contain information needed to decode the message,
as MIME content fields do.
If saving messages on an IMAP account,
ignoring fields makes it impossible
to copy the data directly on the server,
thus operation usually becomes much slower.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>saveretain</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Saveretain is to save what retain is to print and type.
Header fields thus marked are the only ones
saved with a message when saving by save
or when automatically saving to mbox.
Saveretain overrides saveignore.
The use of this command is strongly discouraged
since it may strip header fields
that are needed to decode the message correctly.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>score</B> </TD><TD valign=bottom>
(sc) Takes a message list and a floating point number
and adds the number to the score of each given message.
All messages start at score 0 when a folder is opened.
When the score of a message becomes negative, it is &#39;killed&#39;
with the effects described for the
<I>kill</I> command;
otherwise if it was negative before and becomes positive,
it is &#39;unkilled&#39;.
Scores only refer to the currently opened instance of a folder.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>set</B> </TD><TD valign=bottom>
(se) With no arguments, prints all variable values,
piped through the pager if the output does not fit on the screen.
Otherwise, sets option.
Arguments are of the form option=value
(no space before or after =)
or option.
Quotation marks may be placed around any part of the
assignment statement to quote blanks
or tabs, i.e. &#39;<I>set indentprefix="-&gt;"</I>&#39;.
If an argument begins with
<B>no</B>, as in &#39;<B>set no</B><I>save</I>&#39;,
the effect is the same as invoking the
<I>unset</I> command with the remaining part of the variable
(&#39;<I>unset </I><I>save</I>&#39;).
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>seen</B> </TD><TD valign=bottom>
Takes a message list and marks all messages as having been read.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>shell</B> </TD><TD valign=bottom>
(sh) Invokes an interactive version of the shell.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>shortcut</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Defines a shortcut name and its string for expansion,
as described for the
<I>folder</I> command.
With no arguments,
a list of defined shortcuts is printed.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>show</B> </TD><TD valign=bottom>
(Sh) Like
<I>print</I>, but performs neither MIME decoding nor decryption
so that the raw message text is shown.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>size</B> </TD><TD valign=bottom>
Takes a message list and prints out
the size in characters of each message.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>sort</B> </TD><TD valign=bottom>
Create a sorted representation of the current folder,
and change the
<I>next</I> command and the addressing modes
such that they refer to messages in the sorted order.
Message numbers are the same as in regular mode.
If the
<I>header</I> variable is set,
a header summary in the new order is also printed.
Possible sorting criteria are:
<TABLE width=100% cellpadding=3><!-- tsb: Create a sorted representation of the current folder,
 -->
<TR></TR><TR></TR>
<TR valign=top><TD width=6% nowrap>
<B>date</B> </TD><TD valign=bottom>
Sort the messages by their &#39;Date:&#39; field,
that is by the time they were sent.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>from</B> </TD><TD valign=bottom>
Sort messages by the value of their &#39;From:&#39; field,
that is by the address of the sender.
If the
<I>showname</I> variable is set,
the sender&#39;s real name (if any) is used.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>size</B> </TD><TD valign=bottom>
Sort the messages by their size.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>score</B> </TD><TD valign=bottom>
Sort the messages by their score.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>status</B> </TD><TD valign=bottom>
Sort the messages by their message status
(new, read, old, etc.).
</TD></TR>
<TR valign=top><TD colspan=2>
<B>subject</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Sort the messages by their subject.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>thread</B> </TD><TD valign=bottom>
Create a threaded order,
as with the
<I>thread</I> command.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>to</B> </TD><TD valign=bottom>
Sort messages by the value of their &#39;To:&#39; field,
that is by the address of the recipient.
If the
<I>showname</I> variable is set,
the recipient&#39;s real name (if any) is used.
</TD></TR>
<TR></TR></TABLE><P></TD></TR>
<TR valign=top><TD width=6%>

</TD><TD>
If no argument is given,
the current sorting criterion is printed.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>source</B> </TD><TD valign=bottom>
The source command reads commands from a file.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>thread</B> </TD><TD valign=bottom>
(th) Create a threaded representation of the current folder,
i.e. indent messages that are replies to other messages
in the header display,
and change the
<I>next</I> command and the addressing modes
such that they refer to messages in the threaded order.
Message numbers are the same as in unthreaded mode.
If the
<I>header</I> variable is set,
a header summary in threaded order is also printed.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>top</B> </TD><TD valign=bottom>
Takes a message list and prints the top few lines of each.
The number of lines printed is controlled
by the variable toplines
and defaults to five.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>touch</B> </TD><TD valign=bottom>
Takes a message list
and marks the messages for saving in the
<I>mbox</I> file.
<I>mailx</I> deviates from the POSIX standard with this command,
as a &#39;next&#39; command issued after &#39;mbox&#39;
will display the following message,
not the current one.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>Type</B> </TD><TD valign=bottom>
(T) Identical to the Print command.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>type</B> </TD><TD valign=bottom>
(t) A synonym for print.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>unalias</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Takes a list of names defined by alias commands
and discards the remembered groups of users.
The group names no longer have any significance.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>unanswered</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Takes a message list and marks each message
as not having been answered.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>uncollapse</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(unc)
Only applicable to threaded mode.
Takes a message list
and makes the message and all replies to it visible
in header summaries again.
When a message becomes the current message,
it is automatically made visible.
Also when a message with collapsed replies is printed,
all of these are automatically uncollapsed.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>undef</B> </TD><TD valign=bottom>
Undefines each of the named macros.
It is not an error to use a name that does not belong to
one of the currently defined macros.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>undelete</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(u) Takes a message list and marks each message as not being deleted.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>undraft</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Takes a message list and marks each message
as a draft.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>unflag</B> </TD><TD valign=bottom>
Takes a message list and marks each message as not being &#39;flagged&#39;.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>unfwdignore</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Removes the header field names
from the list of ignored fields for the
<I>forward</I> command.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>unfwdretain</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Removes the header field names
from the list of retained fields for the
<I>forward</I> command.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>ungood</B> </TD><TD valign=bottom>
Takes a message list and undoes the effect of a
<I>good</I> command that was previously applied on exactly these messages.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>unignore</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Removes the header field names
from the list of ignored fields.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>unjunk</B> </TD><TD valign=bottom>
Takes a message list and undoes the effect of a
<I>junk</I> command that was previously applied on exactly these messages.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>unkill</B> </TD><TD valign=bottom>
Takes a message list and &#39;unkills&#39; each message.
Also sets the score of the messages to 0.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>Unread</B> </TD><TD valign=bottom>
Same as
<I>unread</I>. </TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>unread</B> </TD><TD valign=bottom>
(U) Takes a message list and marks each message
as not having been read.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>unretain</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Removes the header field names
from the list of retained fields.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>unsaveignore</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Removes the header field names
from the list of ignored fields for saving.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>unsaveretain</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Removes the header field names
from the list of retained fields for saving.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>unset</B> </TD><TD valign=bottom>
Takes a list of option names and discards their remembered
values;
the inverse of set.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>unshortcut</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Deletes the shortcut names given as arguments.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>unsort</B> </TD><TD valign=bottom>
Disable sorted or threaded mode (see the
<I>sort</I> and
<I>thread</I> commands), return to normal message order
and,
if the
<I>header</I> variable is set,
print a header summary.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>unthread</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
(unth) Same as
<I>unsort</I>. </TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>verify</B> </TD><TD valign=bottom>
(verif)
Takes a message list and verifies each message.
If a message is not an S/MIME signed message,
verification will fail for it.
The verification process checks
if the message was signed using a valid certificate,
if the message sender&#39;s email address matches
one of those contained within the certificate,
and if the message content has been altered.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>visual</B> </TD><TD valign=bottom>
(v) Takes a message list and invokes the display editor
on each message.
Modified contents are discarded
unless the
<I>writebackedited</I> variable is set.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>write</B> </TD><TD valign=bottom>
(w) For conventional messages,
the body without all headers is written.
The output is decrypted and converted
to its native format, if necessary.
If the output file exists,
the text is appended.&#151;If a message is in MIME multipart format,
its first part is written to the specified file
as for conventional messages,
and the user is asked for a filename
to save each other part;
if the contents of the first part are not to be saved,
&#39;write /dev/null&#39; can be used.
For the second and subsequent parts,
if the filename given starts with a &#39;|&#39; character,
the part is piped through the remainder of the filename
interpreted as a shell command.
In non-interactive mode, only the parts of the multipart message
that have a filename given in the part header are written,
the other are discarded.
The original message is never marked for deletion
in the originating mail folder.
For attachments,
the contents of the destination file are overwritten
if the file previously existed.
No special handling of compressed files is performed.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>xit</B> </TD><TD valign=bottom>
(x) A synonym for exit.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>z</B> </TD><TD valign=bottom>
<I>Mailx</I> presents message headers in windowfuls
as described under the headers command.
The z command scrolls to the next window of messages.
If an argument is given,
it specifies the window to use.
A number prefixed by &#39;+&#39; or &#39;-&#39; indicates
that the window is calculated in relation
to the current position.
A number without a prefix specifies an
absolute window number,
and a &#39;$&#39; lets <I>mailx</I> scroll
to the last window of messages.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>Z</B> </TD><TD valign=bottom>
Similar to
<I>z</I>, but scrolls to the next or previous window
that contains at least one new or &#39;flagged&#39; message.
</TD></TR>
<TR></TR></TABLE><P></BLOCKQUOTE>
<A name=15>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Tilde escapes</H4>
</A>
<BLOCKQUOTE>
Here is a summary of the tilde escapes,
which are used when composing
messages to perform special functions.
Tilde escapes are only recognized
at the beginning of lines.
The name &#39;<I>tilde escape</I>&#39; is somewhat of a misnomer
since the actual escape character can be set
by the option escape.
<TABLE cellpadding=3><!-- tsb: Here is a summary of the tilde escapes,
 -->
<TR></TR><TR></TR>
<TR valign=top><TD colspan=2>
<B>~!</B><I>command</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Execute the indicated shell command,
then return to the message.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>~.</B> </TD><TD valign=bottom>
Same effect as typing the end-of-file character.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~&lt;</B><I>filename</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Identical to ~r.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~&lt;!</B><I>command</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Command is executed using the shell.
Its standard output is inserted into the message.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~@</B> [<I>filename</I> .&nbsp;.&nbsp;. ]
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
With no arguments, edit the attachment list.
First, the user can edit all existing attachment data.
If an attachment&#39;s file name is left empty,
that attachment is deleted from the list.
When the end of the attachment list is reached,
<I>mailx</I> will ask for further attachments,
until an empty file name is given.
If <I>filename</I> arguments are specified,
all of them are appended to the end of the attachment list.
Filenames which contain white space
can only be specified
with the first method (no <I>filename</I> arguments).
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>~A</B> </TD><TD valign=bottom>
Inserts the string contained in the
<I>Sign</I> variable
(same as &#39;~i Sign&#39;).
The escape sequences &#39;<B>&#92;t</B>&#39; (tabulator) and &#39;<B>&#92;n</B>&#39; (newline)
are understood.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>~a</B> </TD><TD valign=bottom>
Inserts the string contained in the
<B>sign</B> variable
(same as &#39;~i sign&#39;).
The escape sequences &#39;<B>&#92;t</B>&#39; (tabulator) and &#39;<B>&#92;n</B>&#39; (newline)
are understood.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~b</B><I>name .&nbsp;.&nbsp;.</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Add the given names to the list of carbon copy recipients
but do not make the names visible in the Cc: line
(&#39;blind&#39; carbon copy).
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~c</B><I>name .&nbsp;.&nbsp;.</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Add the given names to the list of carbon copy recipients.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>~d</B> </TD><TD valign=bottom>
Read the file &#39;dead.letter&#39; from the user&#39;s home directory
into the message.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>~e</B> </TD><TD valign=bottom>
Invoke the text editor on the message collected so far.
After the editing session is finished,
the user may continue appending text
to the message.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~f</B><I>messages</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Read the named messages into the message being sent.
If no messages are specified,
read in the current message.
Message headers currently being ignored
(by the ignore or retain command)
are not included.
For MIME multipart messages,
only the first printable part is included.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~F</B><I>messages</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Identical to ~f, except all message headers and
all MIME parts are included.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>~h</B> </TD><TD valign=bottom>
Edit the message header fields
&#39;To:&#39;, &#39;Cc:&#39;, &#39;Bcc:&#39;, and &#39;Subject:&#39;
by typing each one in turn
and allowing the user to append text
to the end or modify the field
by using the current terminal erase and kill characters.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>~H</B> </TD><TD valign=bottom>
Edit the message header fields
&#39;From:&#39;, &#39;Reply-To:&#39;, &#39;Sender:&#39;, and &#39;Organization:&#39;
in the same manner as described for
<I>~h</I>. The default values for these fields originate from the
<I>from</I>, <I>replyto</I>, and
<I>ORGANIZATION</I> variables.
If this tilde command has been used,
changing the variables has no effect on the current message anymore.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~i</B><I>variable</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Insert the value of the specified variable
into the message adding a newline character at the end.
If the variable is unset or empty,
the message remains unaltered.
The escape sequences &#39;<B>&#92;t</B>&#39; (tabulator) and &#39;<B>&#92;n</B>&#39; (newline)
are understood.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~m</B><I>messages</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Read the named messages into the message being sent,
indented by a tab or by the value of indentprefix.
If no messages are specified,
read the current message.
Message headers currently being ignored
(by the ignore or retain command)
are not included.
For MIME multipart messages,
only the first printable part is included.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~M</B><I>messages</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Identical to ~m, except all message headers and
all MIME parts are included.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>~p</B> </TD><TD valign=bottom>
Print out the message collected so far,
prefaced by the message header fields
and followed by the attachment list, if any.
If the message text is longer than the screen size,
it is piped through the pager.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>~q</B> </TD><TD valign=bottom>
Abort the message being sent,
copying the message to
&#39;dead.letter&#39; in the user&#39;s home directory
if save is set.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~r</B><I>filename</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Read the named file into the message.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~s</B><I>string</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Cause the named string to become the current subject field.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~t</B><I>name .&nbsp;.&nbsp;.</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Add the given names to the direct recipient list.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>~v</B> </TD><TD valign=bottom>
Invoke an alternate editor
(defined by the VISUAL option)
on the message collected so far.
Usually, the alternate editor
will be a screen editor.
After the editor is quit,
the user may resume appending text
to the end of the message.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~w</B><I>filename</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Write the message onto the named file.
If the file exists,
the message is appended to it.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>~x</B> </TD><TD valign=bottom>
Same as ~q,
except that the message is not saved to the &#39;dead.letter&#39; file.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~|</B><I>command</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Pipe the message through the command as a filter.
If the command gives no output or terminates abnormally,
retain the original text of the message.
The command
<I>fmt</I>(1)
is often used
as command to rejustify the message.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~:</B><I>mailx-command</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Execute the given <I>mailx</I> command.
Not all commands, however, are allowed.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~_</B><I>mailx-command</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Identical to ~:.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>~~</B><I>string</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Insert the string of text in the message
prefaced by a single ~.
If the escape character has been changed,
that character must be doubled
in order to send it at the beginning of a line.
</TD></TR>
<TR></TR></TABLE><P></BLOCKQUOTE>
<A name=16>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Variable options</H4>
</A>
<BLOCKQUOTE>
Options are controlled via set and unset commands,
see their entries for a syntax description.
An option is also set
if it is passed to <I>mailx</I>
as part of the environment
(this is not restricted to specific variables as in the POSIX standard).
A value given in a startup file overrides
a value imported from the environment.
Options may be either binary,
in which case it is only significant
to see whether they are set or not;
or string, in which case the actual value is of interest.
</BLOCKQUOTE>
<A name=17>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Binary options</H4>
</A>
<BLOCKQUOTE>
The binary options include the following:
<TABLE cellpadding=3><!-- tsb: The binary options include the following:
 -->
<TR></TR><TR></TR>
<TR valign=top><TD width=6% nowrap>
<B>allnet</B> </TD><TD valign=bottom>
Causes only the local part to be evaluated
when comparing addresses.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>append</B> </TD><TD valign=bottom>
Causes messages saved in mbox to be appended to the end
rather than prepended.
This should always be set.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ask</B>&nbsp;or<B>&nbsp;asksub</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Causes <I>mailx</I> to prompt for the subject
of each message sent.
If the user responds with simply a newline,
no subject field will be sent.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>askatend</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Causes the prompts for &#39;Cc:&#39; and &#39;Bcc:&#39; lists
to appear after the message has been edited.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>askattach</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
If set, <I>mailx</I> asks for files to attach at the end of each message.
Responding with a newline indicates not to include an attachment.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>askcc</B> </TD><TD valign=bottom>
Causes the user to be prompted
for additional carbon copy recipients
(at the end of each message if
<I>askatend</I> or
<I>bsdcompat</I> is set).
Responding with a newline
indicates the user&#39;s satisfaction with the current list.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>askbcc</B> </TD><TD valign=bottom>
Causes the user to be prompted
for additional blind carbon copy recipients
(at the end of each message if
<I>askatend</I> or
<I>bsdcompat</I> is set).
Responding with a newline
indicates the user&#39;s satisfaction with the current list.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>asksign</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Causes the user to be prompted
if the message is to be signed
at the end of each message.
The
<I>smime-sign</I> variable is ignored when this variable is set.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>autocollapse</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Causes threads to be collapsed automatically when
threaded mode is entered
(see the
<I>collapse</I> command).
</TD></TR>
<TR valign=top><TD colspan=2>
<B>autoinc</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Same as
<I>newmail</I>. </TD></TR>
<TR valign=top><TD colspan=2>
<B>autoprint</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Causes the delete command to behave like dp -
thus, after deleting a message,
the next one will be typed automatically.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>autothread</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Causes threaded mode (see the
<I>thread</I> command) to be entered automatically
when a folder is opened.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>bang</B> </TD><TD valign=bottom>
Enables the substitution of &#39;<B>!</B>&#39;
by the contents of the last command line
in shell escapes.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>bsdannounce</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Causes automatic display of a header summary after executing a
<I>folder</I> command.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>bsdcompat</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Sets some cosmetical features to traditional BSD style;
has the same affect as setting &#39;askatend&#39; and
all other variables prefixed with &#39;bsd&#39;,
setting prompt to &#39;&amp;&nbsp;&#39;, and changing the default pager to
<I>more</I>. </TD></TR>
<TR valign=top><TD colspan=2>
<B>bsdflags</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Changes the letters printed in the first column of a header summary
to traditional BSD style.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>bsdheadline</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Changes the display of columns in a header summary
to traditional BSD style.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>bsdmsgs</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Changes some informational messages
to traditional BSD style.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>bsdorder</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Causes the &#39;Subject:&#39; field to appear
immediately after the &#39;To:&#39; field
in message headers and with the
<I>~h</I> tilde command.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>bsdset</B> </TD><TD valign=bottom>
Changes the output format of the
<I>set</I> command to traditional BSD style.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>chained-junk-tokens</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Normally, the Bayesian junk mail filter bases its classifications
on single word tokens extracted from messages.
If this option is set,
adjacent words are combined to pairs,
which are then used as additional tokens.
This usually improves the accuracy of the filter,
but also increases the junk mail database
five- to tenfold.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>datefield</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
The date in a header summary
is normally the date of the mailbox &#39;From&nbsp;&#39; line of the message.
If this variable is set,
the date as given in the &#39;Date:&#39; header field is used,
converted to local time.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>debug</B> </TD><TD valign=bottom>
Prints debugging messages and disables the actual delivery of messages.
Unlike
<I>verbose</I>, this option is intended for
<I>mailx</I> development only.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>disconnected</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
When an IMAP mailbox is selected and this variable is set,
no connection to the server is initiated.
Instead, data is obtained from the local cache (see
<I>imap-cache</I>). Mailboxes that are not present in the cache
and messages that have not yet entirely been fetched from the server
are not available;
to fetch all messages in a mailbox at once,
the command &#39;copy * /dev/null&#39; can be used
while still in
<I>online</I> mode.
Changes that are made to IMAP mailboxes in disconnected mode
are queued and committed later
when a connection to that server is opened in online mode.
This procedure is not completely reliable
since it cannot be guaranteed that the IMAP unique identifiers (UIDs)
on the server still match the ones in the cache at that time.
Data is saved to &#39;dead.letter&#39; when this problem occurs.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>disconnected-</B><I>user</I><B>@</B><I>host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
The specified account is handled as described for the
<I>disconnected</I> variable above,
but other accounts are not affected.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>dot</B> </TD><TD valign=bottom>
The binary option dot causes <I>mailx</I> to interpret
a period alone on a line
as the terminator of a message the user is sending.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>editheaders</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
When a message is edited while being composed,
its header is included in the editable text.
&#39;To:&#39;, &#39;Cc:&#39;, &#39;Bcc:&#39;, &#39;Subject:&#39;, &#39;From:&#39;, &#39;Reply-To:&#39;, &#39;Sender:&#39;,
and &#39;Organization:&#39;
fields are accepted within the header,
other fields are ignored.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>emptybox</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
If set, an empty mailbox file is not removed.
This may improve the interoperability with other mail user agents
when using a common folder directory.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>emptystart</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
If the mailbox is empty,
<I>mailx</I> normally prints <I>&#39;No mail for user&#39;</I>
and exits immediately.
If this option is set,
<I>mailx</I> starts even with an empty mailbox.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>flipr</B> </TD><TD valign=bottom>
Exchanges the
<I>Respond</I> with the
<I>respond</I> commands and vice-versa.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>forward-as-attachment</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Original messages are normally sent as inline text with the
<I>forward</I> command,
and only the first part of a multipart message is included.
With this option,
messages are sent as MIME
<I>message/rfc822</I> attachments,
and all of their parts are included.
The
<I>fwdignore</I> and
<I>fwdretain</I> options are ignored when the
<I>forward-as-attachment</I> option is set.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>fullnames</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
When replying to a message,
<I>mailx</I> normally removes the comment parts of email addresses,
which by convention contain the full names of the recipients.
If this variable is set,
such stripping is not performed,
and comments are retained.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>header</B> </TD><TD valign=bottom>
Causes the header summary to be written at startup
and after commands that affect the number of messages
or the order of messages in the current folder;
enabled by default.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>hold</B> </TD><TD valign=bottom>
This option is used to hold messages
in the system mailbox by default.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>ignore</B> </TD><TD valign=bottom>
Causes interrupt signals from the terminal
to be ignored and echoed as @&#39;s.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ignoreeof</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
An option related to dot is ignoreeof
which makes <I>mailx</I> refuse to
accept a control-d as the end of a message.
Ignoreeof also applies to <I>mailx</I> command mode.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>imap-use-starttls</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Causes
<I>mailx</I> to issue a STARTTLS command
to make an unencrypted IMAP session SSL/TLS encrypted.
This functionality is not supported by all servers,
and is not used if the session is already encrypted by the IMAPS method.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>imap-use-starttls-</B><I>user</I><B>@</B><I>host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Activates
<I>imap-use-starttls</I> for a specific account.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>keep</B> </TD><TD valign=bottom>
This option causes <I>mailx</I> to truncate the user&#39;s system mailbox
instead of deleting it when it is empty.
This should always be set,
since it prevents malicious users
from creating fake mail folders
in a world-writable spool directory.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>keepsave</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
When a message is saved,
it is usually discarded
from the originating folder
when
<I>mailx</I> is quit.
Setting this option
causes all saved message to be retained.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>markanswered</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
When a message is replied to
and this variable is set,
it is marked as having been answered.
This mark has no technical meaning in the mail system;
it just causes messages to be marked in the header summary,
and makes them specially addressable.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>metoo</B> </TD><TD valign=bottom>
Usually, when a group is expanded
that contains the sender,
the sender is removed from the expansion.
Setting this option causes
the sender to be included in the group.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>newmail</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Checks for new mail in the current folder
each time the prompt is printed.
For IMAP mailboxes,
the server is then polled for new mail,
which may result in delayed operation
if the connection to the server is slow.
A
<I>maildir</I> folder must be re-scanned to determine
if new mail has arrived.
</TD></TR>
<TR valign=top><TD width=6%>

</TD><TD>
If this variable is set to the special value
<B>nopoll</B>, an IMAP server is not actively asked for new mail,
but new mail may still be detected and announced
with any other IMAP command that is sent to the server.
A
<I>maildir</I> folder is not scanned then.
</TD></TR>
<TR valign=top><TD width=6%>

</TD><TD>
In any case,
the IMAP server may send notifications about messages
that have been deleted on the server
by another process or client.
In this case, &#39;Expunged <I>n</I> messages&#39; is printed
regardless of this variable,
and message numbers may have changed.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>noheader</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Setting the option noheader is the same
as giving the -N flag on the command line.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>outfolder</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Causes the filename given in the
<I>record</I> variable
and the sender-based filenames for the
<I>Copy</I> and
<I>Save</I> commands
to be interpreted relative to the directory given in the
<I>folder</I> variable rather than to the current directory
unless it is an absolute pathname.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>page</B> </TD><TD valign=bottom>
If set, each message the <I>pipe</I> command prints out
is followed by a formfeed character.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>piperaw</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Send messages to the
<I>pipe</I> command without performing MIME and character set conversions.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>pop3-use-apop</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
If this variable is set,
the APOP authentication method is used
when a connection to a POP3 server is initiated.
The advantage of this method over the usual USER/PASS authentication is
that the password is not sent over the network in clear text.
The connection fails
if the server does not support the APOP command.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>pop3-use-apop-</B><I>user</I><B>@</B><I>host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Enables
<I>pop3-use-apop</I> for a specific account.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>pop3-use-starttls</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Causes
<I>mailx</I> to issue a STLS command
to make an unencrypted POP3 session SSL/TLS encrypted.
This functionality is not supported by all servers,
and is not used if the session is already encrypted by the POP3S method.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>pop3-use-starttls-</B><I>user</I><B>@</B><I>host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Activates
<I>pop3-use-starttls</I> for a specific account.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>print-all-chars</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
This option causes all characters to be considered printable.
It is only effective if given in a startup file.
With this option set,
some character sequences in messages
may put the user&#39;s terminal in an undefined state
when printed;
it should only be used as a last resort
if no working system locale can be found.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>print-alternatives</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
When a MIME message part of type
<I>multipart/alternative</I> is displayed and it contains a subpart of type
<I>text/plain</I>, other parts are normally discarded.
Setting this variable causes all subparts to be displayed,
just as if the surrounding part was of type
<I>multipart/mixed</I>. </TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>quiet</B> </TD><TD valign=bottom>
Suppresses the printing of the version when first invoked.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>record-resent</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
If both this variable and the
<I>record</I> variable are set,
the
<I>resend</I> and
<I>Resend</I> commands save messages to the
<I>record</I> folder as it is normally only done for newly composed messages.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>reply-in-same-charset</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
If this variable is set,
<I>mailx</I> first tries to use the same character set
of the original message for replies.
If this fails,
the
<I>sendcharsets</I> variable is evaluated as usual.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>Replyall</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Reverses the sense of reply and Reply commands.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>save</B> </TD><TD valign=bottom>
When the user aborts a message
with two RUBOUT (interrupt characters)
<I>mailx</I> copies the partial letter
to the file &#39;dead.letter&#39; in the home directory.
This option is set by default.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>searchheaders</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
If this option is set, then
a message-list specifier in the form &#39;<I>/x:y</I>&#39;
will expand to all messages containing
the substring &#39;<I>y</I>&#39; in the header field &#39;<I>x</I>&#39;.
The string search is case insensitive.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>sendwait</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
When sending a message,
wait until the mail transfer agent exits
before accepting further commands.
If the mail transfer agent returns a non-zero exit status,
the exit status of mailx will also be non-zero.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>showlast</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Setting this option causes <I>mailx</I> to start at the
last message instead of the first one when opening a mail folder.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>showname</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Causes
<I>mailx</I> to use the sender&#39;s real name instead of the plain address
in the header field summary and in message specifications.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>showto</B> </TD><TD valign=bottom>
Causes the recipient of the message to be shown in the header summary
if the message was sent by the user.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>skipemptybody</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
If an outgoing message does not contain any text
in its first or only message part,
do not send it but discard it silently
(see also the
<I>-E</I> option).
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smime-force-encryption</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Causes
<I>mailx</I> to refuse sending unencrypted messages.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smime-sign</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
If this variable is set,
outgoing messages are S/MIME signed with the user&#39;s private key.
Signing a message enables a recipient to verify
that the sender used a valid certificate,
that the email addresses in the certificate
match those in the message header,
and that the message content has not been altered.
It does not change the message text,
and people will be able to read the message as usual.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smime-no-default-ca</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Do not load the default CA locations
when verifying S/MIME signed messages.
Only applicable if S/MIME support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smtp-use-starttls</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Causes <I>mailx</I> to issue a STARTTLS command
to make an SMTP session SSL/TLS encrypted.
Not all servers support this command;
because of common implementation defects,
it cannot be automatically determined
whether a server supports it or not.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-no-default-ca</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Do not load the default CA locations
to verify SSL/TLS server certificates.
Only applicable if SSL/TLS support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-v2-allow</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Accept SSLv2 connections.
These are normally not allowed
because this protocol version is insecure.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>stealthmua</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Inhibits the generation of
the <I>&#39;Message-Id:&#39;</I> and <I>&#39;User-Agent:&#39;</I>
header fields that include obvious references to <I>mailx</I>.
There are two pitfalls associated with this:
First, the message id of outgoing messages is not known anymore.
Second, an expert may still use the remaining information in the header
to track down the originating mail user agent.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>verbose</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Setting the option verbose is the same
as using the -v flag on the command line.
When <I>mailx</I> runs in verbose mode,
details of the actual message delivery
and protocol conversations for IMAP, POP3, and SMTP,
as well as of other internal processes,
are displayed on the user&#39;s terminal,
This is sometimes useful to debug problems.
<I>Mailx</I> prints all data that is sent to remote servers in clear texts,
including passwords,
so care should be taken that no unauthorized option
can view the screen if this option is enabled.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>writebackedited</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
If this variable is set,
messages modified using the
<I>edit</I> or
<I>visual</I> commands are written back to the current folder when it is quit.
This is only possible for writable folders in
<I>mbox</I> format.
Setting this variable also disables
MIME decoding and decryption for the editing commands.
</TD></TR>
<TR></TR></TABLE><P></BLOCKQUOTE>
<A name=18>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; String Options</H4>
</A>
<BLOCKQUOTE>
The string options include the following:
<TABLE cellpadding=3><!-- tsb: The string options include the following:
 -->
<TR></TR><TR></TR>
<TR valign=top><TD colspan=2>
<B>attrlist</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
A sequence of characters to print in the &#39;attribute&#39;
column of a header summary,
each for one type of messages in the following order:
new,
unread but old,
new but read,
read and old,
saved,
preserved,
mboxed,
flagged,
answered,
draft,
killed,
start of a collapsed thread,
collapsed,
classified as junk.
The default is &#39;NUROSPMFATK+-J&#39;,
or &#39;NU&nbsp;&nbsp;*HMFATK+-J&#39; if
<I>bsdflags</I> or the
<I>SYSV3</I> environment variable
are set.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>autobcc</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Specifies a list of recipients to which
a blind carbon copy of each outgoing message
will be sent automatically.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>autocc</B> </TD><TD valign=bottom>
Specifies a list of recipients to which
a carbon copy of each outgoing message
will be sent automatically.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>autosort</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Causes sorted mode (see the
<I>sort</I> command) to be entered automatically
with the value of this option as sorting method
when a folder is opened.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>cmd</B> </TD><TD valign=bottom>
The default value for the <I>pipe</I> command.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>crt</B> </TD><TD valign=bottom>
The valued option crt is used as a threshold
to determine how long a message must be
before PAGER is used to read it.
If crt is set without a value,
then the height of the terminal screen stored in the system
is used to compute the threshold (see
<I>stty</I>(1)).
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>DEAD</B> </TD><TD valign=bottom>
The name of the file to use
for saving aborted messages.
This defaults to &#39;dead.letter&#39;
in the user&#39;s home directory.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>EDITOR</B> </TD><TD valign=bottom>
Pathname of the text editor to use
in the edit command and ~e escape.
If not defined,
then a default editor is used.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>encoding</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
The default MIME encoding to use
in outgoing text messages and message parts.
Valid values are <I>8bit</I> or <I>quoted-printable</I>.
The default is <I>8bit</I>.
In case the mail transfer system
is not ESMTP compliant,
<I>quoted-printable</I> should be used instead.
If there is no need to encode a message,
<I>7bit</I> transfer mode is used,
without regard to the value of this variable.
Binary data is always encoded in <I>base64</I> mode.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>escape</B> </TD><TD valign=bottom>
If defined, the first character of this option
gives the character to use in the place of ~ to denote escapes.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>folder</B> </TD><TD valign=bottom>
The name of the directory to use
for storing folders of messages.
All folder names that begin with &#39;+&#39;
refer to files below that directory.
If the directory name begins with a &#39;/&#39;,
<I>mailx</I> considers it to be an absolute pathname;
otherwise, the folder directory is found
relative to the user&#39;s home directory.
</TD></TR>
<TR valign=top><TD width=6%>

</TD><TD>
The directory name may also refer to an IMAP account;
any names that begin with &#39;+&#39;
then refer to IMAP mailboxes on that account.
An IMAP folder is normally given in the form
<P>
<PRE>
&nbsp;   imaps://mylogin@imap.myisp.example
</PRE>
<P>
In this case,
the &#39;+&#39; and &#39;@&#39; prefixes for folder names
have the same effect
(see the
<I>folder</I> command).
</TD></TR>
<TR valign=top><TD width=6%>

</TD><TD>
Some IMAP servers do not accept the creation of mailboxes
in the hierarchy base;
they require that they are created as subfolders of &#39;INBOX&#39;.
With such servers,
a folder name of the form
<P>
<PRE>
&nbsp;   imaps://mylogin@imap.myisp.example/INBOX.
</PRE>
<P>
should be used
(the last character is the server&#39;s hierarchy delimiter).
Folder names prefixed by &#39;+&#39; will then refer to folders below &#39;INBOX&#39;,
while folder names prefixed by &#39;@&#39;
refer to folders below the hierarchy base.
See the
<I>imap namespace</I> command for a method to detect the appropriate prefix and delimiter.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>folder-hook</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
When a folder is opened and this variable is set,
the macro corresponding to the value of this variable is executed.
The macro is also invoked when new mail arrives,
but message lists for commands executed from the macro
only include newly arrived messages then.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>folder-hook-</B><I>fullname</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
When a folder named
<I>fullname</I> is opened,
the macro corresponding to the value of this variable is executed.
Unlike other folder specifications,
the fully expanded name of a folder, without metacharacters,
is used to avoid ambiguities.
The macro specified with
<I>folder-hook</I> is not executed if this variable is effective for a folder
(unless it is explicitly invoked within the called macro).
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>from</B> </TD><TD valign=bottom>
The address (or a list of addresses)
to put into the <I>&#39;From:&#39;</I> field of the message header.
If replying to a message,
these addresses are handled as if they were in the alternates list.
<!--  If this variable is set, -->
<!--  a \fI`Sender:'\fR field containing the user's name -->
<!--  is also generated, -->
<!--  unless the variable \fIsmtp\fR is set -->
<!--  and its value differs from \fIlocalhost\fR. -->
If the machine&#39;s hostname is not valid at the Internet
(for example at a dialup machine),
either this variable or
<I>hostname</I> have to be set
to get correct Message-ID header fields.
If
<I>from</I> contains more than one address,
the
<I>sender</I> variable must also be set.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>fwdheading</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
The string to print before the text of a message
with the
<I>forward</I> command
(unless the
<I>forward-as-attachment</I> variable is set).
Defaults to &#39;&#39;-------- Original Message --------&#39;&#39; if unset.
If it is set to the empty string,
no heading is printed.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>headline</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
A format string to use for the header summary,
similar to
<I>printf</I> formats.
A &#39;%&#39; character introduces a format specifier.
It may be followed by a number indicating the field width.
If the field is a number,
the width may be negative,
which indicates that it is to be left-aligned.
Valid format specifiers are:
<P>
<!-- ignored unsupported tag .in -->
<P><BLOCKQUOTE><TABLE bgcolor=#E0E0E0 border=1 cellspacing=0 cellpadding=3>
<TR valign=top>
<TD><B>%a</B></TD><TD>Message attributes.</TD></TR>
<TR valign=top>
<TD><B>%c</B></TD><TD>The score of the message.</TD></TR>
<TR valign=top>
<TD><B>%d</B></TD><TD>The date when the message was received.</TD></TR>
<TR valign=top>
<TD><B>%e</B></TD><TD>The indenting level in threaded mode.</TD></TR>
<TR valign=top>
<TD><B>%f</B></TD><TD>The address of the message sender.</TD></TR>
<TR valign=top>
<TD><B>%i</B></TD><TD>The message thread structure.</TD></TR>
<TR valign=top>
<TD><B>%l</B></TD><TD>The number of lines of the message.</TD></TR>
<TR valign=top>
<TD><B>%m</B></TD><TD>Message number.</TD></TR>
<TR valign=top>
<TD><B>%o</B></TD><TD>The number of octets (bytes) in the message.</TD></TR>
<TR valign=top>
<TD><B>%s</B></TD><TD>Message subject (if any).</TD></TR>
<TR valign=top>
<TD><B>%S</B></TD><TD>Message subject (if any) in double quotes.</TD></TR>
<TR valign=top>
<TD><B>%t</B></TD><TD>The position in threaded/sorted order.</TD></TR>
<TR valign=top>
<TD><B>%&gt;</B></TD><TD>A &#39;&gt;&#39; for the current message, otherwise &#39; &#39;.</TD></TR>
<TR valign=top>
<TD><B>%&lt;</B></TD><TD>A &#39;&lt;&#39; for the current message, otherwise &#39; &#39;.</TD></TR>
<TR valign=top>
<TD><B>%%</B></TD><TD>A &#39;%&#39; character.</TD></TR>
</TABLE></BLOCKQUOTE>
<!-- ignored unsupported tag .in -->
</TD></TR>
<TR valign=top><TD width=6%>

</TD><TD>
The default is &#39;%&gt;%a%m&nbsp;%18f&nbsp;%16d&nbsp;%4l/%-5o&nbsp;%i%s&#39;,
or &#39;%&gt;%a%m&nbsp;%20f&nbsp;&nbsp;%16d&nbsp;%3l/%-5o&nbsp;%i%S&#39; if
<I>bsdcompat</I> is set.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>hostname</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Use this string as hostname
when expanding local addresses
instead of the value obtained from
<I>uname</I>(2)
and
<I>getaddrinfo</I>(3).
</TD></TR>
<TR valign=top><TD colspan=2>
<B>imap-auth</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Sets the IMAP authentication method.
Valid values are &#39;login&#39; for the usual password-based authentication
(the default),
&#39;cram-md5&#39;, which is a password-based authentication
that does not send the password over the network in clear text,
and &#39;gssapi&#39; for GSSAPI-based authentication.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>imap-auth-</B><I>user</I><B>@</B><I>host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Sets the IMAP authentication method for a specific account.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>imap-cache</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Enables caching of IMAP mailboxes.
The value of this variable must point to a directory
that is either existent or can be created by
<I>mailx</I>. All contents of the cache can be deleted by
<I>mailx</I> at any time;
it is not safe to make assumptions about them.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>imap-keepalive</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
IMAP servers may close the connection
after a period of inactivity;
the standard requires this to be at least 30 minutes,
but practical experience may vary.
Setting this variable to a numeric
<I>value</I> greater than 0
causes a NOOP command to be sent each
<I>value</I> seconds if no other operation is performed.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>imap-list-depth</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
When retrieving the list of folders on an IMAP server, the
<I>folders</I> command stops after it has reached a certain depth
to avoid possible infinite loops.
The value of this variable sets the maximum depth allowed.
The default is 2.
If the folder separator on the current IMAP server is a slash &#39;/&#39;,
this variable has no effect,
and the
<I>folders</I> command does not descend to subfolders.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>indentprefix</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
String used by the &#39;<I>~m</I>&#39; and &#39;<I>~M</I>&#39; tilde escapes
and by the <I>quote</I> option
for indenting messages,
in place of the normal tab character (^I).
Be sure to quote the value
if it contains spaces or tabs.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>junkdb</B> </TD><TD valign=bottom>
The location of the junk mail database.
The string is treated like a folder name,
as described for the
<I>folder</I> command.
</TD></TR>
<TR valign=top><TD width=6%>

</TD><TD>
The files in the junk mail database are normally stored in
<I>compress</I>(1)
format for saving space.
If processing time is considered more important,
<I>uncompress</I>(1)
can be used to store them in plain form.
<I>Mailx</I> will then work using the uncompressed files.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>LISTER</B> </TD><TD valign=bottom>
Pathname of the directory lister
to use in the
<I>folders</I> command
when operating on local mailboxes.
Default is /bin/ls.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>MAIL</B> </TD><TD valign=bottom>
Is used as the user&#39;s mailbox, if set.
Otherwise, a system-dependent default is used.
Can be a
<I>protocol</I><B>://</B>
string (see the
<I>folder</I> command for more information).
</TD></TR>
<TR valign=top><TD colspan=2>
<B>MAILX_HEAD</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
A string to put at the beginning of each new message.
The escape sequences &#39;<B>&#92;t</B>&#39; (tabulator) and &#39;<B>&#92;n</B>&#39; (newline)
are understood.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>MAILX_TAIL</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
A string to put at the end of each new message.
The escape sequences &#39;<B>&#92;t</B>&#39; (tabulator) and &#39;<B>&#92;n</B>&#39; (newline)
are understood.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>maximum-unencoded-line-length</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Messages that contain lines longer than the value of this variable
are encoded in quoted-printable
even if they contain only ASCII characters.
The maximum effective value is 950.
If set to 0,
all ASCII text messages are encoded in quoted-printable.
S/MIME signed messages are always encoded
in quoted-printable regardless of the value of this variable.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>MBOX</B> </TD><TD valign=bottom>
The name of the mbox file.
It can be the name of a folder.
The default is &#39;<I>mbox</I>&#39;
in the user&#39;s home directory.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>NAIL_EXTRA_RC</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
The name of an optional startup file
to be read after ~/.mailrc.
This variable is ignored if it is imported from the environment;
it has an effect only if it is set in /etc/nail.rc or ~/.mailrc
to allow bypassing the configuration with e. g. &#39;MAILRC=/dev/null&#39;.
Use this file for commands
that are not understood by other mailx implementations.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>newfolders</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
If this variable has the value
<B>maildir</B>, newly created local folders will be in
<I>maildir</I> format.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>nss-config-dir</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
A directory that contains the files
cert<I>N</I>.db to retrieve certificates,
key<I>N</I>.db to retrieve private keys,
and secmod.db,
where
<I>N</I> is a digit.
These are usually taken from Mozilla installations,
so an appropriate value might be
&#39;~/.mozilla/firefox/default.clm&#39;.
<I>Mailx</I> opens these files read-only
and does not modify them.
However, if the files are modified by Mozilla
while
<I>mailx</I> is running,
it will print a &#39;Bad database&#39; message.
It may be necessary to create copies of these files
that are exclusively used by
<I>mailx</I> then.
Only applicable if S/MIME and SSL/TLS support is built using
Network Security Services (NSS).
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ORGANIZATION</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
The value to put into the <I>&#39;Organization:&#39;</I> field of the message header.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>PAGER</B> </TD><TD valign=bottom>
Pathname of the program to use
in the more command
or when crt variable is set.
The default paginator
<I>pg</I>(1)
or, in BSD compatibility mode,
<I>more</I>(1)
is used
if this option is not defined.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>password-</B><I>user</I><B>@</B><I>host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Set the password for
<I>user</I> when connecting to
<I>host</I>. If no such variable is defined for a host,
the user will be asked for a password on standard input.
Specifying passwords in a startup file
is generally a security risk,
the file should be readable
by the invoking user only.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>pipe-</B><I>content/subcontent</I> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
When a MIME message part of
<I>content/subcontent</I> type is displayed or it is replied to,
its text is filtered through the value of this variable
interpreted as a shell command.
Special care must be taken when using such commands
as mail viruses may be distributed by this method;
if messages of type
<I>application/x-sh</I> were filtered through the shell, for example,
a message sender could easily execute arbitrary code
on the system
<I>mailx</I> is running on.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>pop3-keepalive</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
POP3 servers may close the connection
after a period of inactivity;
the standard requires this to be at least 10 minutes,
but practical experience may vary.
Setting this variable to a numeric
<I>value</I> greater than 0
causes a NOOP command to be sent each
<I>value</I> seconds if no other operation is performed.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>prompt</B> </TD><TD valign=bottom>
The string printed when a command is accepted.
Defaults to &#39;<B>?&nbsp;</B>&#39;,
or to &#39;<B>&amp;&nbsp;</B>&#39; if the
<I>bsdcompat</I> variable is set.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>quote</B> </TD><TD valign=bottom>
If set, <I>mailx</I> starts a replying message with the original message prefixed
by the value of the variable <I>indentprefix</I>.
Normally, a heading consisting of &#39;Fromheaderfield wrote:&#39; is printed
before the quotation.
If the string <I>noheading</I> is assigned to the <I>quote</I> variable,
this heading is omitted.
If the string <I>headers</I> is assigned,
the headers selected by the ignore/retain commands
are printed above the message body,
thus <I>quote</I> acts like an automatic ~m command then.
If the string <I>allheaders</I> is assigned,
all headers are printed above the message body,
and all MIME parts are included,
thus <I>quote</I> acts like an automatic ~M command then.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>record</B> </TD><TD valign=bottom>
If defined, gives the pathname of the folder
used to record all outgoing mail.
If not defined,
then outgoing mail is not so saved.
When saving to this folder fails,
the message is not sent
but saved to the &#39;dead.letter&#39; file instead.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>replyto</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
A list of addresses to put into the <I>&#39;Reply-To:&#39;</I> field
of the message header.
If replying to a message, such addresses are handled
as if they were in the alternates list.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>screen</B> </TD><TD valign=bottom>
When <I>mailx</I> initially prints the message headers,
it determines the number to print
by looking at the speed of the terminal.
The faster the terminal, the more it prints.
This option overrides this calculation
and specifies how many message headers
are printed.
This number is also used
for scrolling with the z command.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>sendcharsets</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
A comma-separated list of character set names
that can be used in Internet mail.
When a message that contains characters not representable in US-ASCII
is prepared for sending,
<I>mailx</I> tries to convert its text
to each of the given character sets in order
and uses the first appropriate one.
The default is &#39;utf-8&#39;.
</TD></TR>
<TR valign=top><TD width=6%>

</TD><TD>
Character sets assigned to this variable should be ordered
in ascending complexity.
That is, the list should start with e.g.
&#39;iso-8859-1&#39; for compatibility with older mail clients,
might contain some other language-specific character sets,
and should end with &#39;utf-8&#39;
to handle messages that combine texts in multiple languages.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>sender</B> </TD><TD valign=bottom>
An address that is put into the &#39;Sender:&#39; field
of outgoing messages.
This field needs not normally be present.
It is, however, required
if the &#39;From:&#39; field contains more than one address.
It can also be used to indicate that a message
was sent on behalf of somebody other;
in this case, &#39;From:&#39; should contain the address
of the person that took responsibility for the message,
and &#39;Sender:&#39; should contain the address
of the person that actually sent the message.
The
<I>sender</I> address is handled as if it were in the
<I>alternates</I> list.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>sendmail</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
To use an alternate mail delivery system,
set this option to the full pathname
of the program to use.
This should be used with care.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>SHELL</B> </TD><TD valign=bottom>
Pathname of the shell to use
in the ! command and the ~! escape.
A default shell is used
if this option is not defined.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>Sign</B> </TD><TD valign=bottom>
A string for use with the
<I>~A</I> command.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>sign</B> </TD><TD valign=bottom>
A string for use with the
<I>~a</I> command.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>signature</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Must correspond to the name of a readable file if set.
The file&#39;s content is then appended to each singlepart message
and to the first part of each multipart message.
Be warned that there is no possibility
to edit the signature for an individual message.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smime-ca-dir</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Specifies a directory with CA certificates for verification
of S/MIME signed messages.
The format is the same as described in
<I>SSL_CTX_load_verify_locations</I>(3).
Only applicable if S/MIME support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smime-ca-file</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Specifies a file with CA certificates for verification
of S/MIME signed messages.
The format is the same as described in
<I>SSL_CTX_load_verify_locations</I>(3).
Only applicable if S/MIME support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smime-cipher-</B><I>user@host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Specifies a cipher to use when generating S/MIME encrypted messages
for
<I>user@host</I>. Valid ciphers are
<B>rc2-40</B> (RC2 with 40 bits),
<B>rc2-64</B> (RC2 with 64 bits),
<B>des</B> (DES, 56 bits)
and
<B>des-ede3</B> (3DES, 112/168 bits).
The default is 3DES.
It is not recommended to use the other ciphers
unless a recipient&#39;s client is actually unable to handle 3DES
since they are comparatively weak;
but even so, the recipient should upgrade his software in preference.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smime-crl-file</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Specifies a file that contains a CRL in PEM format
to use when verifying S/MIME messages.
Only applicable if S/MIME support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smime-crl-dir</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Specifies a directory that contains files with CRLs in PEM format
to use when verifying S/MIME messages.
Only applicable if S/MIME support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smime-encrypt-</B><I>user@host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
If this variable is set,
messages to
<I>user@host</I> are encrypted before sending.
If S/MIME support is built using OpenSSL,
the value of the variable must be set to the name of a file
that contains a certificate in PEM format.
If S/MIME support is built using NSS,
the value of this variable is ignored,
but if multiple certificates for
<I>user@host</I> are available, the
<I>smime-nickname-user@host</I> variable should be set.
Otherwise a certificate for the recipient
is automatically retrieved from the certificate database,
if possible.
</TD></TR>
<TR valign=top><TD width=6%>

</TD><TD>
If a message is sent to multiple recipients,
each of them for whom a corresponding variable is set
will receive an individually encrypted message;
other recipients will continue to receive the message in plain text
unless the
<I>smime-force-encryption</I> variable is set.
It is recommended to sign encrypted messages,
i.e. to also set the
<I>smime-sign</I> variable.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smime-nickname-</B><I>user@host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Specifies the nickname of a certificate
to be used when encrypting messages for
<I>user@host .</I> Only applicable if S/MIME support is built using NSS.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smime-sign-cert</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Points to a file in PEM format
that contains the user&#39;s private key
as well as his certificate.
Both are used with S/MIME
for signing and decrypting messages.
Only applicable if S/MIME support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smime-sign-cert-</B><I>user@host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Overrides
<I>smime-sign-cert</I> for the specific addresses.
When signing messages and the value of the
<I>from</I> variable is set
to
<I>user@host</I>, the specific file is used.
When decrypting messages,
their recipient fields (To: and Cc:) are searched for addresses
for which such a variable is set.
<I>Mailx</I> always uses the first address that matches,
so if the same message is sent to more than one
of the user&#39;s addresses using different encryption keys,
decryption might fail.
Only applicable if S/MIME support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smime-sign-nickname</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Specifies that the named certificate be used for signing mail.
If this variable is not set,
but a single certificate matching the current
<I>from</I> address is found in the database,
that one is used automatically.
Only applicable if S/MIME support is built using NSS.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smime-sign-nickname-</B><I>user@host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Overrides
<I>smime-sign-nickname</I> for a specific address.
Only applicable if S/MIME support is built using NSS.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>smtp</B> </TD><TD valign=bottom>
Normally, <I>mailx</I> invokes
<I>sendmail</I>(8)
directly to transfer messages.
If the <I>smtp</I> variable is set, a SMTP connection to
the server specified by the value of this variable
is used instead.
If the SMTP server does not use the standard port,
a value of <I>server:port</I> can be given,
with <I>port</I> as a name or as a number.
</TD></TR>
<TR valign=top><TD width=6%>

</TD><TD>
There are two possible methods to get SSL/TLS encrypted SMTP sessions:
First, the STARTTLS command can be used to encrypt a session
after it has been initiated,
but before any user-related data has been sent; see
<I>smtp-use-starttls</I> above.
Second, some servers accept sessions that are encrypted
from their beginning on. This mode is configured by assigning
<B>smtps://</B><I>server</I>[<B>:</B><I>port</I>]
to the
<I>smtp</I> variable.
</TD></TR>
<TR valign=top><TD width=6%>

</TD><TD>
The SMTP transfer is executed in a child process;
unless either the
<I>sendwait</I> or the
<I>verbose</I> variable is set,
this process runs asynchronously.
If it receives a TERM signal,
it will abort and save the message to the &#39;dead.letter&#39; file.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smtp-auth</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Sets the SMTP authentication method.
If set to &#39;login&#39;,
or if unset and smtp-auth-user is set,
AUTH LOGIN is used.
If set to &#39;cram-md5&#39;,
AUTH CRAM-MD5 is used;
if set to &#39;plain&#39;,
AUTH PLAIN is used.
Otherwise,
no SMTP authentication is performed.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smtp-auth-</B><I>user</I><B>@</B><I>host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Overrides
<I>smtp-auth</I> for specific values of sender addresses,
depending on the
<I>from</I> variable.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smtp-auth-password</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Sets the global password for SMTP AUTH.
Both user and password have to be given
for AUTH LOGIN and AUTH CRAM-MD5.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smtp-auth-password-</B><I>user</I><B>@</B><I>host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Overrides
<I>smtp-auth-password</I> for specific values of sender addresses,
depending on the
<I>from</I> variable.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smtp-auth-user</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Sets the global user name for SMTP AUTH.
Both user and password have to be given
for AUTH LOGIN and AUTH CRAM-MD5.
</TD></TR>
<TR valign=top><TD width=6%>

</TD><TD>
If this variable is set but neither
<I>smtp-auth-password</I> or a matching
<I>smtp-auth-password-user@host</I> can be found,
<I>mailx</I> will as for a password on the user&#39;s terminal.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>smtp-auth-user-</B><I>user</I><B>@</B><I>host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Overrides
<I>smtp-auth-user</I> for specific values of sender addresses,
depending on the
<I>from</I> variable.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-ca-dir</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Specifies a directory with CA certificates for verification
of SSL/TLS server certificates.
See
<I>SSL_CTX_load_verify_locations</I>(3)
for more information.
Only applicable if SSL/TLS support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-ca-file</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Specifies a file with CA certificates for verification
of SSL/TLS server certificates.
See
<I>SSL_CTX_load_verify_locations</I>(3)
for more information.
Only applicable if SSL/TLS support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-cert</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Sets the file name
for a SSL/TLS client certificate
required by some servers.
Only applicable if SSL/TLS support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-cert-</B><I>user</I><B>@</B><I>host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Sets an account-specific file name
for a SSL/TLS client certificate
required by some servers.
Overrides
<I>ssl-cert</I> for the specified account.
Only applicable if SSL/TLS support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-cipher-list</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Specifies a list of ciphers for SSL/TLS connections.
See ciphers(1) for more information.
Only applicable if SSL/TLS support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-crl-file</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Specifies a file that contains a CRL in PEM format
to use when verifying SSL/TLS server certificates.
Only applicable if SSL/TLS support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-crl-dir</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Specifies a directory that contains files with CRLs in PEM format
to use when verifying SSL/TLS server certificates.
Only applicable if SSL/TLS support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-key</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Sets the file name
for the private key of a SSL/TLS client certificate.
If unset, the name of the certificate file is used.
The file is expected to be in PEM format.
Only applicable if SSL/TLS support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-key-</B><I>user</I><B>@</B><I>host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Sets an account-specific file name
for the private key of a SSL/TLS client certificate.
Overrides
<I>ssl-key</I> for the specified account.
Only applicable if SSL/TLS support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-method</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Selects a SSL/TLS protocol version;
valid values are &#39;ssl2&#39;, &#39;ssl3&#39;, and &#39;tls1&#39;.
If unset, the method is selected automatically,
if possible.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-method-</B><I>user</I><B>@</B><I>host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Overrides
<I>ssl-method</I> for a specific account.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-rand-egd</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Gives the pathname to an entropy daemon socket,
see
<I>RAND_egd</I>(3).
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-rand-file</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Gives the pathname to a file with entropy data,
see
<I>RAND_load_file</I>(3).
If the file is a regular file writable by the invoking user,
new data is written to it after it has been loaded.
Only applicable if SSL/TLS support is built using OpenSSL.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-verify</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Sets the action to be performed if an error occurs
during SSL/TLS server certificate validation.
Valid values are
&#39;strict&#39; (fail and close connection immediately),
&#39;ask&#39; (ask whether to continue on standard input),
&#39;warn&#39; (print a warning and continue),
&#39;ignore&#39; (do not perform validation).
The default is &#39;ask&#39;.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ssl-verify-</B><I>user</I><B>@</B><I>host</I>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Overrides
<I>ssl-verify</I> for a specific account.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>toplines</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
If defined, gives the number of lines
of a message to be printed out
with the top command;
normally, the first five
lines are printed.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>ttycharset</B> </TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
The character set of the terminal <I>mailx</I> operates on.
There is normally no need to set this variable
since <I>mailx</I> can determine this automatically
by looking at the LC_CTYPE locale setting;
if this succeeds, the value is assigned at startup
and will be displayed by the <I>set</I> command.
Note that this is not necessarily a character set name
that can be used in Internet messages.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>VISUAL</B> </TD><TD valign=bottom>
Pathname of the text editor to use
in the visual command and ~v escape.
</TD></TR>
<TR></TR></TABLE><P></BLOCKQUOTE>
<A name=19>

     <H3>ENVIRONMENT VARIABLES</H3>

</A>
<BLOCKQUOTE>
Besides the variables described above, <I>mailx</I> uses
the following environment strings:
<TABLE cellpadding=3><!-- tsb: Besides the variables described above, <I>mailx</I> uses
 -->
<TR></TR><TR></TR>
<TR valign=top><TD width=6% nowrap>
<B>HOME</B> </TD><TD valign=bottom>
The user&#39;s home directory.
</TD></TR>
<TR valign=top><TD colspan=2>
<B>LANG</B>, <B>LC_ALL</B>, <B>LC_COLLATE</B>, <B>LC_CTYPE</B>, <B>LC_MESSAGES</B>
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
See
<I>locale</I>(7).
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>MAILRC</B> </TD><TD valign=bottom>
Is used as startup file instead of ~/.mailrc if set.
When
<I>mailx</I> scripts are invoked on behalf of other users,
this variable should be set to &#39;/dev/null&#39;
to avoid side-effects from reading their configuration files.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>NAILRC</B> </TD><TD valign=bottom>
If this variable is set and
<I>MAILRC</I> is not set,
it is read as startup file.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>SYSV3</B> </TD><TD valign=bottom>
Changes the letters printed in the first column of a header summary.
</TD></TR>
<TR valign=top><TD width=6% nowrap>
<B>TMPDIR</B> </TD><TD valign=bottom>
Used as directory for temporary files instead of /tmp, if set.
</TD></TR>
<TR></TR></TABLE><P></BLOCKQUOTE>
<A name=20>

     <H3>FILES</H3>

</A>
<BLOCKQUOTE>
<TABLE cellpadding=3>
<TR valign=top><TD colspan=2>
~/.mailrc
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
File giving initial commands.
</TD></TR>
<TR valign=top><TD colspan=2>
/etc/nail.rc
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
System wide initialization file.
</TD></TR>
<TR valign=top><TD colspan=2>
~/.mime.types
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
Personal MIME types.
</TD></TR>
<TR valign=top><TD colspan=2>
/etc/mime.types
</TD></TR><TR valign=top><TD width=6%>&nbsp;</TD><TD>
System wide MIME types.
</TD></TR>
<TR></TR></TABLE><P></BLOCKQUOTE>
<A name=21>

     <H3>EXAMPLES</H3>

</A>
<BLOCKQUOTE>
</BLOCKQUOTE>
<A name=22>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Getting started</H4>
</A>
<BLOCKQUOTE>
The
<I>mailx</I> command has two distinct usages, according to whether one
wants to send or receive mail.
Sending mail is simple: to send a
message to a user whose email address is, say,
&lt;bill@host.example&gt;,
use the shell
command:
<PRE>
<P>
&nbsp;   $ <B>mailx</B><I> bill@host.example</I>
<P>
</PRE>
then type your message.
<I>Mailx</I> will prompt you for a message
<I>subject</I> first;
after that, lines typed by you form the body of the message.
When you reach the end of the message, type
an EOT (control-d) at the beginning of a line, which will cause
<I>mailx</I> to echo &#39;EOT&#39; and return you to the shell.
<P>
If, while you are composing the message
you decide that you do not wish to send it after all, you can
abort the letter with a <FONT size=-2>RUBOUT</FONT>.  Typing a single <FONT size=-2>RUBOUT</FONT>
causes
<I>mailx</I> to print &#39;(Interrupt -- one more to kill letter)&#39;.
Typing a second
<FONT size=-2>RUBOUT</FONT> causes
<I>mailx</I> to save your partial letter on the file &#39;dead.letter&#39;
in your home directory and abort the letter.
Once you have
sent mail to someone, there is no way to undo the act, so be
careful.
<P>
If you want to send the same message to several other people,
you can list their email addresses on the command line.
Thus,
<PRE>
<P>
&nbsp;   $ <B>mailx</B><I> sam@workstation.example bob@server.example</I>
&nbsp;   Subject: Fees
&nbsp;   Tuition fees are due next Friday.  Don&#39;t forget!
&nbsp;   &lt;Control-d&gt;
&nbsp;   EOT
&nbsp;   $
<P>
</PRE>
will send the reminder to <I>&lt;sam@workstation.example&gt;</I>.
and
<I>&lt;bob@server.example&gt;</I>.
<P>
To read your mail, simply type
<PRE>
<P>
&nbsp;   $ <B>mailx</B>
<P>
</PRE>
<I>Mailx</I> will respond by typing its version number and date and then listing
the messages you have waiting.
Then it will type a prompt and await your command.
The messages are assigned numbers starting with 1&#151;you
refer to the messages with these numbers.
<I>Mailx</I> keeps track of which messages are
<I>new</I> (have been sent since you last read your mail) and
<I>read</I> (have been read by you).  New messages have an
<B>N</B> next to them in the header listing and old, but unread messages have
a
<B>U</B> next to them.
<I>Mailx</I> keeps track of new/old and read/unread messages by putting a
header field called
<I>Status</I> into your messages.
<P>
To look at a specific message, use the
<I>type</I> command, which may be abbreviated to simply
<I>t .</I> For example, if you had the following messages:
<PRE>
<P>
&nbsp;   O 1 drfoo@myhost.example Wed Sep  1 19:52  18/631 "Fees"
&nbsp;   O 2 sam@friends.example  Thu Sep  2 00:08  30/895
<P>
</PRE>
you could examine the first message by giving the command:
<PRE>
<P>
&nbsp;   <B>type</B> 1
<P>
</PRE>
which might cause
<!-- ignored unsupported tag .N -->
to respond with, for example:
<PRE>
<P>
&nbsp;   Message  1:
&nbsp;   From drfoo@myhost.example Wed Sep  1 19:52:25 2004
&nbsp;   Subject: Fees
&nbsp;   Status: R
<P>
&nbsp;   Tuition fees are due next Wednesday.  Don&#39;t forget!
<P>
</PRE>
<P>
Many
<I>mailx</I> commands that operate on messages take a message number as an
argument like the
<I>type</I> command.
For these commands, there is a notion of a current message.
When you enter the
<I>mailx</I> program, the current message is initially the first
(or the first recent) one.
Thus, you can often omit the message number and use, for example,
<PRE>
<P>
&nbsp;   <B>t</B>
<P>
</PRE>
to type the current message.
As a further shorthand, you can type a message
by simply giving its message number.
Hence,
<PRE>
<P>
&nbsp;   1
<P>
</PRE>
would type the first message.
<P>
Frequently, it is useful to read the messages in your mailbox in order,
one after another.
You can read the next message in
<I>mailx</I> by simply typing a newline.
As a special case, you can type a newline as your first command to
<I>mailx</I> to type the first message.
<P>
If, after typing a message, you wish to immediately send a reply,
you can do so with the
<I>reply</I> command.
This command,
like
<I>type</I>, takes a message number as an argument.
<I>mailx</I> then begins a message addressed to the user who sent you the message.
You may then type in your letter in reply, followed by a &lt;control-d&gt;
at the beginning of a line, as before.
<P>
Note that
<I>mailx</I> copies the subject header from the original message.
This is useful in that correspondence
about a particular matter will tend to retain the same subject heading,
making it easy to recognize.
If there are other header fields in the message,
like &#39;Cc:&#39;,
the information found will also be used.
<P>
Sometimes you will receive a message that has been sent to
several people and wish to reply only
to the person who sent it.
<I>Reply</I> with a capital
<I>R</I> replies to a message, but sends a copy to the sender only.
<P>
If you wish, while reading your mail, to send a message to someone,
but not as a reply to one of your messages, you can send the message
directly with the
<I>mail</I> command, which takes as arguments the names of the recipients you wish
to send to.
For example, to send a message to &lt;frank@machine.example&gt;,
you would do:
<PRE>
<P>
&nbsp;   <B>mail</B><I> frank@machine.example</I>
</PRE>
<P>
To delete a message from the mail folder,
you can use the
<I>delete</I> command.
In addition to not saving deleted messages,
<I>mailx</I> will not let you type them, either.
The effect is to make the message disappear
altogether, along with its number.
<P>
Many features of
<I>mailx</I> can be tailored to your liking with the
<I>set</I> command.
The
<I>set</I> command has two forms, depending on whether you are setting a
<I>binary</I> option or a
<I>valued</I> option.
Binary options are either on or off.  For example, the
<I>askcc</I> option informs
<I>mailx</I> that each time you send a message, you want it to prompt you for
a &#39;Cc:&#39; header,
to be included in the message.
To set the
<I>askcc</I> option, you would type
<PRE>
<P>
&nbsp;   <B>set</B> askcc
</PRE>
<P>
Valued options are values which
<I>mailx</I> uses to adapt to your tastes.
For example, the
<I>record</I> option tells
<I>mailx</I> where to save messages sent by you,
and is specified by
<PRE>
<P>
&nbsp;   <B>set</B> record=Sent
<P>
</PRE>
for example.
Note that no spaces are allowed in
<I>set record=Sent .</I> <P>
<I>Mailx</I> includes a simple facility for maintaining groups of messages together
in folders.
To use the folder facility, you must tell
<I>mailx</I> where you wish to keep your folders.
Each folder of messages will be a single file.
For convenience, all of your folders are kept in
a single directory of your choosing.
To tell
<I>mailx</I> where your folder directory is, put a line of the form
<PRE>
<P>
&nbsp;   <B>set folder=</B><I>letters</I>
<P>
</PRE>
in your
<I>.mailrc</I> file.
If, as in the example above,
your folder directory does not begin with a &#39;/&#39;,
<I>mailx</I> will assume that your folder directory is to be found starting from
your home directory.
<P>
Anywhere a file name is expected, you can use a folder name, preceded
with &#39;+&#39;.
For example, to put a message into a folder with the
<I>save</I> command, you can use:
<PRE>
<P>
&nbsp;   <B>save +</B><I>classwork</I>
<P>
</PRE>
to save the current message in the
<I>classwork</I> folder.
If the
<I>classwork</I> folder does not yet exist, it will be created.
Note that messages which are saved with the
<I>save</I> command are automatically removed from your system mailbox.
<P>
In order to make a copy of a message in a folder without causing
that message to be removed from your system mailbox, use the
<I>copy</I> command, which is identical in all other respects to the
<I>save</I> command.
<P>
The
<I>folder</I> command
can be used to direct
<I>mailx</I> to the contents of a different folder.
For example,
<PRE>
<P>
&nbsp;   <B>folder +</B><I>classwork</I>
<P>
</PRE>
directs
<I>mailx</I> to read the contents of the
<I>classwork</I> folder.
All of the commands that you can use on your system
mailbox are also applicable to folders, including
<I>type</I>, <I>delete</I>, and
<I>reply</I>. To inquire which folder you are currently editing, use simply:
<PRE>
<P>
&nbsp;   <B>folder</B>
</PRE>
<P>
To list your current set of folders, use the
<I>folders</I> command.
<P>
Finally, the
<I>help</I> command is available to print out a brief summary of the most important
<I>mailx</I> commands.
<P>
While typing in a message to be sent to others, it is often
useful to be able to invoke the text editor on the partial message,
print the message, execute a shell command, or do some other
auxiliary function.
<I>Mailx</I> provides these capabilities through
<I>tilde escapes ,</I> which consist of a tilde (~) at the beginning of a line, followed by
a single character which indicates the function to be performed.
For example, to print the text of the message so far, use:
<PRE>
<P>
&nbsp;   <B>~p</B>
<P>
</PRE>
which will print a line of dashes, the recipients of your message, and
the text of the message so far.
A list of the most important tilde escapes is available with &#39;~?&#39;.
</BLOCKQUOTE>
<A name=23>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; IMAP or POP3 client setup</H4>
</A>
<BLOCKQUOTE>
First you need the following data from your ISP:
the host name of the IMAP or POP3 server,
user name and password for this server,
and a notice whether the server uses SSL/TLS encryption.
Assuming the host name is &#39;server.myisp.example&#39;
and your user name for that server is &#39;mylogin&#39;,
you can refer to this account using the
<I>folder</I> command or
<I>-f</I> command line option with
<PRE>
<P>
&nbsp;   <B>imaps://</B><I>mylogin</I><B>@</B><I>server.myisp.example</I>
<P>
</PRE>
(This string is not necessarily the same as your Internet mail address.)
You can replace &#39;imaps://&#39; with &#39;imap://&#39;
if the server does not support SSL/TLS.
(If SSL/TLS support is built using NSS, the
<I>nss-config-dir</I> variable must be set before a connection can be initiated,
see above).
Use &#39;pop3s://&#39; or &#39;pop3://&#39; if the server does not offer IMAP.
You should use IMAP if you can, though;
first because it requires fewer network operations than POP3
to get the contents of the mailbox
and is thus faster;
and second because message attributes
are maintained by the IMAP server,
so you can easily distinguish new and old messages
each time you connect.
Even if the server does not accept IMAPS or POP3S connections,
it is possible that it supports the STARTTLS method
to make a session SSL/TLS encrypted
after the initial connection has been performed,
but before authentication begins.
The only reliable method to see if this works is to try it; enter one of
<PRE>
<P>
&nbsp;   <B>set imap-use-starttls</B>
&nbsp;   <B>set pop3-use-starttls</B>
<P>
</PRE>
before you initiate the connection.
<P>
As you probably want messages to be deleted from this account
after saving them,
prefix it with &#39;<I>%:</I>&#39;.
The
<I>shortcut</I> command can be used to avoid typing that many characters
every time you want to connect:
<PRE>
<P>
&nbsp;   <B>shortcut </B><I>myisp</I><B> </B><B>%:imaps://</B><I>mylogin</I><B>@</B><I>server.myisp.example</I>
<P>
</PRE>
You might want to put this string into a startup file.
As the
<I>shortcut</I> command is specific to this implementation of
<I>mailx</I> and will confuse other implementations,
it should not be used in
<I>~/.mailrc</I>, instead, put
<PRE>
<P>
&nbsp;   <B>set NAIL_EXTRA_RC=</B><I>~/.nailrc</I>
<P>
</PRE>
in
<I>~/.mailrc</I> and create a file
<I>~/.nailrc</I> containing the
<I>shortcut</I> command above.
You can then access your remote mailbox by invoking
&#39;mailx -f <I>myisp</I>&#39; on the command line,
or by executing &#39;fi <I>myisp</I>&#39; within mailx.
<P>
If you want to use more than one IMAP mailbox on a server,
or if you want to use the IMAP server for mail storage too,
the
<I>account</I> command
(which is also <I>mailx-</I>specific)
is more appropriate than the
<I>shortcut</I> command.
You can put the following in
<I>~/.nailrc</I>: <P>
<PRE>
&nbsp;   <B>account </B><I>myisp </I><B>{</B>
&nbsp;       <B>set folder=imaps://</B><I>mylogin</I><B>@</B><I>server.myisp.example</I>
&nbsp;       <B>set record=+</B><I>Sent </I><B>MBOX=+</B><I>mbox </I><B>outfolder</B>
&nbsp;   <B>}</B>
</PRE>
<P>
and can then access incoming mail for this account by invoking
&#39;mailx -A <I>myisp</I>&#39; on the command line,
or by executing &#39;ac <I>myisp</I>&#39; within mailx.
After that,
a command like &#39;copy <I>1</I> +<I>otherfolder</I>&#39;
will refer to <I>otherfolder</I> on the IMAP server.
In particular,
&#39;fi &amp;&#39; will change to the
<I>mbox</I> folder,
and
&#39;fi +Sent&#39; will show your recorded sent mail,
with both folders located on the IMAP server.
<P>
<I>Mailx</I> will ask you for a password string
each time you connect to a remote account.
If you can reasonably trust the security
of your workstation,
you can give this password in the startup file as
<PRE>
<P>
&nbsp;   <B>set password-</B><I>mylogin</I><B>@</B><I>server.myisp.example</I><B>="</B><I>SECRET</I><B>"</B>
<P>
</PRE>
You should change the permissions of this file to 0600, see
<I>chmod</I>(1).
<P>
<I>Mailx</I> supports different authentication methods for both IMAP and POP3.
If Kerberos is used at your location,
you can try to activate GSSAPI-based authentication by
<PRE>
<P>
&nbsp;   <B>set imap-auth=gssapi</B>
<P>
</PRE>
The advantage of this method is that
<I>mailx</I> does not need to know your password at all,
nor needs to send sensitive data over the network.
Otherwise, the options
<PRE>
<P>
&nbsp;   <B>set imap-auth=cram-md5</B>
&nbsp;   <B>set pop3-use-apop</B>
<P>
</PRE>
for IMAP and POP3, respectively,
offer authentication methods
that avoid to send the password in clear text over the network,
which is especially important if SSL/TLS cannot be used.
If the server does not offer any of these authentication methods,
conventional user/password based authentication must be used.
It is sometimes helpful to set the
<I>verbose</I> option when authentication problems occur.
<I>Mailx</I> will display all data sent to the server in clear text on the screen
with this option,
including passwords.
You should thus take care that no unauthorized person
can look at your terminal when this option is set.
<P>
If you regularly use the same workstation
to access IMAP accounts,
you can greatly enhance performance
by enabling local caching of IMAP messages.
For any message that has been fully or partially fetched from the server,
a local copy is made and is used when the message is accessed again,
so most data is transferred over the network once only.
To enable the IMAP cache,
select a local directory name and put
<PRE>
<P>
&nbsp;   <B>set imap-cache=</B><I>~/localdirectory</I>
<P>
</PRE>
in the startup file.
All files within that directory
can be overwritten or deleted by <I>mailx</I> at any time,
so you should not use the directory to store other information.
<P>
Once the cache contains some messages,
it is not strictly necessary anymore
to open a connection to the IMAP server
to access them.
When <I>mailx</I> is invoked with the <I>-D</I> option,
or when the
<I>disconnected</I> variable is set,
only cached data is used
for any folder you open.
Messages that have not yet been completely cached
are not available then,
but all other messages can be handled
as usual.
Changes made to IMAP mailboxes in
<I>disconnected</I> mode are committed to the IMAP server
next time it is used in
<I>online</I> mode.
Synchronizing the local status
with the status on the server
is thus partially within your responsibility;
if you forget to initiate a connection to the server again
before you leave your location,
changes made on one workstation
are not available on others.
Also if you alter IMAP mailboxes from a workstation
while uncommitted changes are still pending on another,
the latter data may become invalid.
The same might also happen because of internal server status changes.
You should thus carefully evaluate this feature in your environment
before you rely on it.
<P>
Many servers will close the connection
after a short period of inactivity. Use one of
<PRE>
<P>
&nbsp;   <B>set pop3-keepalive=</B><I>30</I>
&nbsp;   <B>set imap-keepalive=</B><I>240</I>
<P>
</PRE>
to send a keepalive message each 30 seconds for POP3,
or each 4 minutes for IMAP.
<P>
If you encounter problems connecting to a SSL/TLS server,
try the
<I>ssl-rand-egd</I> and
<I>ssl-rand-file</I> variables (see the OpenSSL FAQ for more information)
or specify the protocol version with
<I>ssl-method</I>. Contact your ISP
if you need a client certificate
or if verification of the server certificate fails.
If the failed certificate is indeed valid,
fetch its CA certificate by executing the shell command
<PRE>
<P>
&nbsp;   $ <B>openssl s_client &lt;/dev/null -showcerts -connect &#92;
&nbsp;          </B><I>server.myisp.example</I><B>:</B><I>imaps</I><B> 2&gt;&amp;1 | tee </B><I>log</I>
<P>
</PRE>
(see
<I>s_client</I>(1))
and put it into the file specified with
<I>ssl-ca-file</I>. The data you need is located at the end of the certificate chain
within (and including) the &#39;BEGIN CERTIFICATE&#39;
and &#39;END CERTIFICATE&#39; lines.
(Note that it is possible to fetch
a forged certificate by this method.
You can only completely rely
on the authenticity of the CA certificate
if you fetch it in a way that is trusted by other means,
such as by personally receiving the certificate on storage media.)
</BLOCKQUOTE>
<A name=24>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Creating a score file or message filter</H4>
</A>
<BLOCKQUOTE>
The scoring commands are best separated
from other configuration for clarity,
and are mostly
<I>mailx</I> specific.
It is thus recommended to put them in a separate file
that is sourced from your NAIL_EXTRA_RC as follows:
<PRE>
<P>
&nbsp;   <B>source</B><I> ~/.scores</I>
<P>
</PRE>
The <I>.scores</I> file could then look as follows:
<PRE>
<P>
&nbsp;   <B>define</B> <I>list</I> {
&nbsp;       <B>score</B> (subject "important discussion") +10
&nbsp;       <B>score</B> (subject "annoying discussion") -10
&nbsp;       <B>score</B> (from "nicefellow@goodnet") +15
&nbsp;       <B>score</B> (from "badguy@poornet") -5
&nbsp;       <B>move</B> (header x-spam-flag "+++++") <I>+junk</I>
&nbsp;   }
&nbsp;   <B>set folder-hook-</B>imap://user@host/public.list=<I>list</I>
<P>
</PRE>
In this scheme,
you would see any mail from &#39;nicefellow@goodnet&#39;,
even if the surrounding discussion is annoying;
but you normally would not see mail from &#39;badguy@poornet&#39;,
unless he participates in the important discussion.
Messages that are marked with five or more plus characters
in their &#39;X-Spam-Flag&#39; field
(inserted by some server-side filtering software)
are moved to the folder &#39;junk&#39; in the
<I>folder</I> directory.
<P>
Be aware that all criteria in () lead to substring matches,
so you would also score messages
from e.g. &#39;notsobadguy@poornetmakers&#39; negative here.
It is possible to select addresses exactly using <I>"address"</I>
message specifications,
but these cannot be executed remotely
and will thus cause all headers
to be downloaded from IMAP servers while looking for matches.
<P>
When searching messages on an IMAP server,
best performance is usually achieved
by sending as many criteria as possible
in one large () specification,
because each single such specification
will result in a separate network operation.
</BLOCKQUOTE>
<A name=25>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Activating the Bayesian filter</H4>
</A>
<BLOCKQUOTE>
The Bayesian junk mail filter works
by examining the words contained in messages.
You decide yourself what a good and what a bad message is.
Thus the resulting filter is your very personal one;
once it is correctly set up,
it will filter only messages similar to those
previously specified by you.
<P>
To use the Bayesian filter,
a location for the junk mail database must be defined first:
<PRE>
<P>
&nbsp;   <B>set junkdb=</B><I>~/.junkdb</I>
<P>
</PRE>
The junk mail database does not contain
actual words extracted from messages,
but hashed representations of them.
A foreign person who can read the database
could only examine the frequency of previously known words
in your mail.
<P>
If you have sufficient disk space (several 10&nbsp;MB) available,
it is recommended that you set the
<I>chained-junk-tokens</I> option.
The filter will then also consider two-word tokens,
improving its accuracy.
<P>
A set of good messages and junk messages must now be available;
it is also possible to use the incoming new messages for this purpose,
although it will of course take some time
until the filter becomes useful then.
Do not underestimate the amount of statistical data needed;
some hundred messages are typically necessary
to get satisfactory results,
and many thousand messages for best operation.
You have to pass the good messages to the
<I>good</I> command,
and the junk messages to the
<I>junk</I> command.
If you ever accidentally mark a good message as junk or vice-versa,
call the
<I>ungood</I> or
<I>unjunk</I> command to correct this.
<P>
Once a reasonable amount of statistics has been collected,
new messages can be classified automatically.
The
<I>classify</I> command marks all messages that the filter considers to be junk,
but it does not perform any action on them by default.
It is recommended that you move these messages into a separate
folder just for the case that false positives occur,
or to pass them to the
<I>junk</I> command later again to further improve the junk mail database.
To automatically move incoming junk messages
every time the inbox is opened,
put lines like the following into your
<I>.scores</I> file (or whatever name you gave to the file in the last example):
<PRE>
<P>
&nbsp;   <B>define</B> <I>junkfilter</I> {
&nbsp;       <B>classify (smaller </B><I>20000</I><B>) :n</B>
&nbsp;       <B>move :j</B> <I>+junk</I>
&nbsp;   }
&nbsp;   <B>set folder-hook-</B>imap://user@host/INBOX=<I>junkfilter</I>
<P>
</PRE>
If you set the
<I>verbose</I> option before running the
<I>classify</I> command,
<I>mailx</I> prints the words it uses for calculating the junk status
along with their statistical probabilities.
This can help you to find out
why some messages are not classified
as you would like them to be.
To see the statistical probability of a given word,
use the
<I>probability</I> command.
<P>
If a junk message was not recognized as such,
use the
<I>junk</I> command to correct this.
Also if you encounter a false positive
(a good message that was wrongly classified as junk),
pass it to the
<I>good</I> command.
<P>
Since the
<I>classify</I> command must examine the entire text
of all new messages in the respective folder,
this will also cause all of them to be downloaded from the IMAP server.
You should thus restrict the size of messages for automatic filtering.
If server-based filtering is also available,
you might try if that works for you first.
</BLOCKQUOTE>
<A name=26>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Reading HTML mail</H4>
</A>
<BLOCKQUOTE>
You need either the
<I>w3m</I> or
<I>lynx</I> utility
or another command-line web browser
that can write plain text to standard output.
<PRE>
<P>
&nbsp;   <B>set pipe-text/html=</B>"w3m -dump -T text/html"
<P>
</PRE>
or
<PRE>
<P>
&nbsp;   <B>set pipe-text/html=</B>"lynx -dump -force_html /dev/stdin"
<P>
</PRE>
will then cause HTML message parts to be converted into a more friendly form.
</BLOCKQUOTE>
<A name=27>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Viewing PDF attachments</H4>
</A>
<BLOCKQUOTE>
Most PDF viewers do not accept input directly from a pipe.
It is thus necessary to store the attachment in a temporary file, as with
<PRE>
<P>
&nbsp;   <B>set pipe-application/pdf=</B>"cat &gt;/tmp/mailx$$.pdf; &#92;
&nbsp;          acroread /tmp/mailx$$.pdf; rm /tmp/mailx$$.pdf"
<P>
</PRE>
Note that security defects are discovered in PDF viewers
from time to time.
Automatical command execution like this
can compromise your system security,
in particular if you stay not always informed
about such issues.
</BLOCKQUOTE>
<A name=28>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Signed and encrypted messages with S/MIME</H4>
</A>
<BLOCKQUOTE>
S/MIME provides two central mechanisms:
message signing and message encryption.
A signed message contains some data in addition
to the regular text.
The data can be used to verify
that the message was sent using a valid certificate,
that the sender&#39;s address in the message header
matches that in the certificate,
and that the message text has not been altered.
Signing a message does not change its regular text;
it can be read regardless of whether the recipient&#39;s software
is able to handle S/MIME.
It is thus usually possible to sign all outgoing messages
if so desired.&#151;Encryption, in contrast,
makes the message text invisible for all people
except those who have access to the secret decryption key.
To encrypt a message,
the specific recipient&#39;s public encryption key must be known.
It is thus not possible to send encrypted mail to people
unless their key has been retrieved
from either previous communication or public key directories.
A message should always be signed before it is encrypted.
Otherwise, it is still possible that the encrypted message text
is altered.
<P>
A central concept to S/MIME is that of the certification authority (CA).
A CA is a trusted institution that issues certificates.
For each of these certificates,
it can be verified that it really originates from the CA,
provided that the CA&#39;s own certificate is previously known.
A set of CA certificates is usually delivered with OpenSSL
and installed on your system.
If you trust the source of your OpenSSL software installation,
this offers reasonable security for S/MIME on the Internet.
In general, a certificate cannot be more secure
than the method its CA certificate has been retrieved with, though.
Thus if you download a CA certificate from the Internet,
you can only trust the messages you verify using that certificate
as much as you trust the download process.
<P>
The first thing you need for participating in S/MIME message exchange
is your personal certificate,
including a private key.
The certificate contains public information,
in particular your name and your email address,
and the public key that is used by others
to encrypt messages for you,
and to verify signed messages they supposedly received from you.
The certificate is included in each signed message you send.
The private key must be kept secret.
It is used to decrypt messages that were
previously encrypted with your public key,
and to sign messages.
<P>
For personal use,
it is recommended that you get a S/MIME certificate
from one of the major CAs on the Internet using your WWW browser.
(Many CAs offer such certificates for free.)
You will usually receive
a combined certificate and private key
in PKCS#12 format which
<I>mailx</I> does not directly accept
if S/MIME support is built using OpenSSL.
To convert it to PEM format,
use the following shell command:
<PRE>
<P>
&nbsp;   $ <B>openssl pkcs12 -in </B><I>cert.p12</I><B> -out </B><I>cert.pem</I><B> -clcerts &#92;
&nbsp;       -nodes</B>
<P>
</PRE>
If you omit the
<I>-nodes</I> parameter,
you can specifiy an additional
<I>PEM pass phrase</I> for protecting the private key.
<I>Mailx</I> will then ask you for that pass phrase
each time it signs or decrypts a message.
You can then use
<PRE>
<P>
&nbsp;   <B>set smime-sign-cert-</B><I>myname@myisp.example</I><B>=</B><I>cert.pem</I>
<P>
</PRE>
to make this private key and certificate known to
<I>mailx</I>. <P>
If S/MIME support is built using NSS,
the PKCS#12 file must be installed using Mozilla
(provided that
<I>nss-config-dir</I> is set appropriately,
see above),
and no further action is necessary
unless multiple user certificates
for the same email address are installed.
In this case,
the
<I>smime-sign-nickname</I> variable has to be set appropriately.
<P>
You can now sign outgoing messages.
Just use
<PRE>
<P>
&nbsp;   <B>set smime-sign</B>
<P>
</PRE>
to do so.
<P>
From each signed message you send,
the recipient can fetch your certificate
and use it to send encrypted mail back to you.
Accordingly if somebody sends you a signed message,
you can do the same.
First use the
<I>verify</I> command to check the validity of the certificate.
After that,
retrieve the certificate and tell
<I>mailx</I> that it should use it for encryption:
<PRE>
<P>
&nbsp;   <B>certsave</B><I> filename</I>
&nbsp;   <B>set smime-encrypt-</B><I>user@host</I><B>=</B><I>filename</I>
<P>
</PRE>
If S/MIME support is built using NSS,
the saved certificate must be installed using Mozilla.
The value of the
<I>smime-encrypt-user@host</I> is ignored then,
but if multiple certificates for the recipient are available,
the
<I>smime-nickname-user@host</I> variable must be set.
<P>
You should carefully consider
if you prefer to store encrypted messages in decrypted form.
If you do, anybody who has access to your mail folders can read them,
but if you do not,
you might be unable to read them yourself later
if you happen to lose your private key.
The
<I>decrypt</I> command saves messages in decrypted form,
while the
<I>save</I>, <I>copy</I>, and
<I>move</I> commands leave them encrypted.
<P>
Note that neither S/MIME signing nor encryption
applies to message subjects or other header fields.
Thus they may not contain sensitive information
for encrypted messages,
and cannot be trusted even if the message content
has been verified.
When sending signed messages,
it is recommended to repeat any important header information
in the message text.
</BLOCKQUOTE>
<A name=29>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Using CRLs with S/MIME or SSL/TLS</H4>
</A>
<BLOCKQUOTE>
Certification authorities (CAs) issue
certificate revocation lists (CRLs) on a regular basis.
These lists contain the serial numbers of certificates
that have been declared invalid after they have been issued.
Such usually happens
because the private key for the certificate has been compromised,
because the owner of the certificate has left
the organization that is mentioned in the certificate,
etc.
To seriously use S/MIME or SSL/TLS verification,
an up-to-date CRL is required for each trusted CA.
There is otherwise no method
to distinguish between valid and invalidated certificates.
<I>Mailx</I> currently offers no mechanism to fetch CRLs,
or to access them on the Internet,
so you have to retrieve them by some external mechanism.
<P>
If S/MIME and SSL/TLS support are built using OpenSSL,
<I>mailx</I> accepts CRLs in PEM format only;
CRLs in DER format must be converted,
e.g. with the shell command
<PRE>
<P>
&nbsp;   $ <B>openssl crl -inform DER -in </B><I>crl.der</I><B> -out </B><I>crl.pem</I>
<P>
</PRE>
To tell
<I>mailx</I> about the CRLs,
a directory
that contains all CRL files
(and no other files)
must be created.
The
<I>smime-crl-dir</I> or
<I>ssl-crl-dir</I> variables, respectively,
must then be set to point to that directory.
After that,
<I>mailx</I> requires a CRL to be present
for each CA that is used
to verify a certificate.
<P>
If S/MIME and SSL/TLS support are built using NSS,
CRLs can be imported in Mozilla applications
(provided that
<I>nss-config-dir</I> is set appropriately).
</BLOCKQUOTE>
<A name=30>

    <H4 STYLE="margin-top: 0px;">&nbsp; &nbsp; Sending mail from scripts</H4>
</A>
<BLOCKQUOTE>
If you want to send mail from scripts,
you must be aware that
<I>mailx</I> reads the user&#39;s configuration files by default.
So unless your script is only intended for your own personal use
(as e.g. a cron job),
you need to circumvent this by invoking
<I>mailx</I> like
<PRE>
<P>
&nbsp;   <B>MAILRC=/dev/null mailx -n</B>
<P>
</PRE>
You then need to create a configuration for
<I>mailx</I> for your script.
This can be done by either pointing the
<I>MAILRC</I> variable to a custom configuration file,
or by passing the configuration in environment variables.
Since many of the configuration options are not valid shell variables, the
<I>env</I> command is useful in this situation.
An invocation could thus look like
<PRE>
<P>
&nbsp;   <B>env MAILRC=/dev/null</B> from=<I>scriptreply@domain</I> smtp=<I>host</I> &#92;
&nbsp;         smtp-auth-user=<I>login</I> smtp-auth-password=<I>secret</I> &#92;
&nbsp;         smtp-auth=<I>login</I> <B>mailx -n</B> -s "<I>subject</I>" &#92;
&nbsp;         -a <I>attachment_file</I> <I>recipient@domain</I> &lt;<I>content_file</I>
</PRE>
</BLOCKQUOTE>
<A name=31>

     <H3>SEE ALSO</H3>

</A>
<BLOCKQUOTE>
<a href=http://heirloom.sourceforge.net/man/fmt.1.html>fmt</a>(1),
newaliases(1),
openssl(1),
<a href=http://heirloom.sourceforge.net/man/pg.1.html>pg</a>(1),
<a href=http://heirloom.sourceforge.net/man/more.1.html>more</a>(1),
vacation(1),
ssl(3),
aliases(5),
locale(7),
mailaddr(7),
sendmail(8)
</BLOCKQUOTE>
<A name=32>

     <H3>NOTES</H3>

</A>
<BLOCKQUOTE>
Variables in the environment passed to
<I>mailx</I> cannot be unset.
<P>
The character set conversion relies
on the
<I>iconv</I>(3)
function.
Its functionality differs widely
between the various system environments
<I>mailx</I> runs on.
If the message &#39;Cannot convert from <I>a</I> to <I>b</I>&#39; appears,
either some characters within the message header or text
are not appropriate for the currently selected terminal character set,
or the needed conversion is not supported by the system.
In the first case,
it is necessary to set
an appropriate LC_CTYPE locale (e.g. <I>en_US</I>)
or the
<I>ttycharset</I> variable.
In the second case, the
<I>sendcharsets</I> and
<I>ttycharset</I> variables must be set to the same value
to inhibit character set conversion.
If
<I>iconv()</I> is not available at all,
the value assigned to
<I>sendcharsets</I> must match the character set that is used on the terminal.
<P>
Mailx expects input text to be in Unix format,
with lines separated by
<I>newline</I> (^J, &#92;n) characters only.
Non-Unix text files that use
<I>carriage return</I> (^M, &#92;r)
characters in addition will be treated as binary data;
to send such files as text, strip these characters e.&nbsp;g. by
<BLOCKQUOTE>
<P>
tr -d &#39;&#92;015&#39; &lt;input | mailx .&nbsp;.&nbsp;.
<P>
</BLOCKQUOTE>
or fix the tools that generate them.
<P>
Limitations with IMAP mailboxes are:
It is not possible to edit messages,
but it is possible to append them.
Thus to edit a message,
create a local copy of it,
edit it, append it,
and delete the original.
The line count for the header display
is only appropriate if the entire message has been downloaded
from the server.
The marking of messages as &#39;new&#39; is performed by the IMAP server;
use of the
<I>exit</I> command instead of
<I>quit</I> will not cause it to be reset,
and if the
<I>autoinc</I>/<I>newmail</I> variables are unset,
messages that arrived during a session
will not be in state &#39;new&#39; anymore
when the folder is opened again.
Also if commands queued in disconnected mode are committed,
the IMAP server will delete the &#39;new&#39; flag
for all messages in the changed folder,
and new messages will appear as unread
when it is selected for viewing later.
The &#39;flagged&#39;, &#39;answered&#39;, and &#39;draft&#39; attributes are usually permanent,
but some IMAP servers are known to drop them without notification.
<!--  This is why mailx does not even check if storing them succeeds. -->
Message numbers may change with IMAP
every time before the prompt is printed
if <I>mailx</I> is notified by the server
that messages have been deleted
by some other client or process.
In this case, &#39;Expunged <I>n</I> messages&#39; is printed,
and message numbers may have changed.
<P>
Limitations with POP3 mailboxes are:
It is not possible to edit messages,
they can only be copied and deleted.
The line count for the header display
is only appropriate if the entire message has been downloaded
from the server.
The status field of a message is maintained by the server
between connections;
some servers do not update it at all,
and with a server that does,
the &#39;exit&#39; command will not cause the message status to be reset.
The &#39;newmail&#39; command and the &#39;newmail&#39; variable
have no effect.
It is not possible to rename or to remove POP3 mailboxes.
<P>
If a
<FONT size=-1>RUBOUT</FONT> (interrupt) is typed while an IMAP or POP3 operation is in progress,
<I>mailx</I> will wait until the operation can be safely aborted,
and will then return to the command loop
and print the prompt again.
When a second
<I>RUBOUT</I> is typed while
<I>mailx</I> is waiting for the operation to complete,
the operation itself will be canceled.
In this case,
data that has not been fetched yet
will have to be fetched
before the next command can be performed.
If the canceled operation
was using an SSL/TLS encrypted channel,
an error in the SSL transport will very likely result,
and the connection is no longer usable.
<P>
As <I>mailx</I> is a mail user agent,
it provides only basic SMTP services.
If it fails to contact its upstream SMTP server,
it will not make further attempts to transfer the message
at a later time,
and it does not leave other information about this condition
than an error message on the terminal
and a &#39;dead.letter&#39; file.
This is usually not a problem if the SMTP server
is located in the same local network
as the computer on which <I>mailx</I> is run.
However, care should be taken when using a remote server of an ISP;
it might be better to set up a local SMTP server then
which just acts as a proxy.
<P>
<I>Mailx</I> immediately contacts the SMTP server (or
<I>/usr/lib/sendmail</I>) even when operating in
<I>disconnected</I> mode.
It would not make much sense for <I>mailx</I> to defer outgoing mail
since SMTP servers usually provide
much more elaborated delay handling
than <I>mailx</I> could perform as a client.
Thus the recommended setup for sending mail in
<I>disconnected</I> mode is to configure a local SMTP server
such that it sends outgoing mail
as soon as an external network connection is available again,
i.e. to advise it to do that from a network startup script.
<P>
The junk mail filter follows the concepts developed by
Paul Graham in his articles,
&#39;&#39;A Plan for Spam&#39;&#39;, August 2002,
&lt;<A HREF="http://www.paulgraham.com/spam.html">http://www.paulgraham.com/spam.html</A>&gt;,
and &#39;&#39;Better Bayesian Filtering&#39;&#39;, January 2003,
&lt;<A HREF="http://www.paulgraham.com/better.html">http://www.paulgraham.com/better.html</A>&gt;.
Chained tokens are due to a paper by
Jonathan A. Zdziarski,
&#39;&#39;Advanced Language Classification using Chained Tokens&#39;&#39;,
February 2004,
&lt;<A HREF="http://www.nuclearelephant.com/papers/chained.html">http://www.nuclearelephant.com/papers/chained.html</A>&gt;.
<P>
A <I>mail</I> command appeared in Version 1 AT&amp;T Unix.
Berkeley Mail was written in 1978 by Kurt Shoens.
This man page is derived from
from The Mail Reference Manual
originally written by Kurt Shoens.
<I>Heirloom Mailx</I> enhancements are maintained and documented
by Gunnar Ritter.
<P>
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
&#151; Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright &#169; 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the
event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
<A HREF="http://www.opengroup.org/unix/online.html">http://www.opengroup.org/unix/online.html</A>&nbsp;.
Redistribution of this material is permitted so long as this notice remains
intact.
</BLOCKQUOTE>
<P><HR>
<TABLE width=100%><TR> <TD width=33%><I>Heirloom mailx 12.4</I></TD> <TD width=33% align=center>MAILX (1)</TD> <TD align=right width=33%><I>10/1/07</I></TD> </TR></TABLE><FONT SIZE=-1>Generated by a modified version of <A HREF="http://www.squarebox.co.uk/download/manServer.shtml">manServer 1.07</A> from mailx.1 using man macros with tbl support.</FONT>
</BODY></HTML>