9070 Remove wanboot from gate
[unleashed.git] / usr / src / man / man1 / mailx.1
blobcf0cf48337ee9d3c9d835370c445cf96b3d40eae
1 '\" te
2 .\" Copyright 1989 AT&T
3 .\" Copyright (c) 2001, Sun Microsystems, Inc.  All Rights Reserved
4 .\" Portions Copyright (c) 1992, X/Open Company Limited  All Rights Reserved
5 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
6 .\" http://www.opengroup.org/bookstore/.
7 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions 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 http://www.opengroup.org/unix/online.html.
8 .\"  This notice shall appear on any product containing this material.
9 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
10 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
11 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
12 .TH MAILX 1 "Dec 18, 2014"
13 .SH NAME
14 mailx \- interactive message processing system
15 .SH SYNOPSIS
16 .LP
17 .nf
18 \fBmailx\fR [\fB-BdeHiInNURvV~\fR] [\fB-f\fR [\fIfile\fR | \fI+folder\fR]] [\fB-T\fR \fIfile\fR]
19      [\fB-u\fR \fIuser\fR]
20 .fi
22 .LP
23 .nf
24 \fBmailx\fR [\fB-BdFintUv~\fR] [\fB-b\fR \fIbcc\fR] [\fB-c\fR \fIcc\fR] [\fB-h\fR \fInumber\fR]
25      [\fB-r\fR \fIaddress\fR] [\fB-s\fR \fIsubject\fR] \fIrecipient\fR...
26 .fi
28 .LP
29 .nf
30 \fB/usr/ucb/mail\fR ...
31 .fi
33 .LP
34 .nf
35 \fB/usr/ucb/Mail\fR ...
36 .fi
38 .SH DESCRIPTION
39 .LP
40 The mail utilities listed above provide a comfortable, flexible environment for
41 sending and receiving mail messages electronically.
42 .sp
43 .LP
44 When reading mail, the mail utilities provide commands to facilitate saving,
45 deleting, and responding to messages. When sending mail, the mail utilities
46 allow editing, reviewing and other modification of the message as it is
47 entered.
48 .sp
49 .LP
50 Incoming mail is stored in a standard file for each user, called the
51 \fBmailbox\fR for that user. When the mail utilities are called to read
52 messages, the \fBmailbox\fR is the default place to find them. As messages are
53 read, they are marked to be moved to a secondary file for storage, unless
54 specific action is taken, so that the messages need not be seen again.This
55 secondary file is called the \fBmbox\fR and is normally located in the user's
56 \fBHOME\fR directory (see \fBMBOX\fR in ENVIRONMENT VARIABLES for a description
57 of this file). Messages can be saved in other secondary files named by the
58 user. Messages remain in a secondary file until forcibly removed.
59 .sp
60 .LP
61 The user can access a secondary file by using the \fB-f\fR option. Messages in
62 the secondary file can then be read or otherwise processed using the same
63 \fBCommands\fR as in the primary \fBmailbox\fR. This gives rise within these
64 pages to the notion of a current \fBmailbox\fR.
65 .SH OPTIONS
66 .LP
67 On the command line options start with a dash (\(mi). Any other arguments are
68 taken to be destinations (recipients). If no recipients are specified,
69 \fBmailx\fR attempts to read messages from the \fBmailbox\fR.
70 .sp
71 .ne 2
72 .na
73 \fB\fB-B\fR\fR
74 .ad
75 .RS 17n
76 Do not buffer standard input or standard output.
77 .RE
79 .sp
80 .ne 2
81 .na
82 \fB\fB-b\fR \fIbcc\fR\fR
83 .ad
84 .RS 17n
85 Set the blind carbon copy list to \fIbcc\fR. \fIbcc\fR should be enclosed in
86 quotes if it contains more than one name.
87 .RE
89 .sp
90 .ne 2
91 .na
92 \fB\fB-c\fR \fIcc\fR\fR
93 .ad
94 .RS 17n
95 Set the carbon copy list to \fIcc\fR. \fIcc\fR should be enclosed in quotes if
96 it contains more than one name.
97 .RE
99 .sp
100 .ne 2
102 \fB\fB-d\fR\fR
104 .RS 17n
105 Turn on debugging output. (Neither particularly interesting nor recommended.)
109 .ne 2
111 \fB\fB-e\fR\fR
113 .RS 17n
114 Test for the presence of mail. \fBmailx\fR prints nothing and exits with a
115 successful return code if there is mail to read.
119 .ne 2
121 \fB\fB-F\fR\fR
123 .RS 17n
124 Record the message in a file named after the first recipient. Overrides the
125 \fBrecord\fR variable, if set (see \fBInternal Variables\fR).
129 .ne 2
131 \fB\fB\fR\fB-f\fR\fB [\fR\fIfile\fR\fB]\fR\fR
133 .RS 17n
134 Read messages from \fIfile\fR instead of \fBmailbox\fR. If no \fIfile\fR is
135 specified, the \fBmbox\fR is used.
139 .ne 2
141 \fB\fB\fR\fB-f\fR\fB [ \fR\fB+\fR\fIfolder\fR\fB]\fR\fR
143 .RS 17n
144 Use the file \fIfolder\fR in the folder directory (same as the \fBfold\fRer
145 command). The name of this directory is listed in the \fBfolder\fR variable.
149 .ne 2
151 \fB\fB-H\fR\fR
153 .RS 17n
154 Print header summary only.
158 .ne 2
160 \fB\fB-h\fR \fInumber\fR\fR
162 .RS 17n
163 The number of network "hops" made so far. This is provided for network software
164 to avoid infinite delivery loops. This option and its argument are passed to
165 the delivery program.
169 .ne 2
171 \fB\fB-I\fR\fR
173 .RS 17n
174 Include the newsgroup and article-id header lines when printing mail messages.
175 This option requires the \fB-f\fR option to be specified.
179 .ne 2
181 \fB\fB-i\fR\fR
183 .RS 17n
184 Ignore interrupts. See also \fBignore\fR in \fBInternal Variables\fR.
188 .ne 2
190 \fB\fB-N\fR\fR
192 .RS 17n
193 Do not print initial header summary.
197 .ne 2
199 \fB\fB-n\fR\fR
201 .RS 17n
202 Do not initialize from the system default \fBmailx.rc\fR or \fBMail.rc\fR file.
203 See USAGE.
207 .ne 2
209 \fB\fB-r\fR \fIaddress\fR\fR
211 .RS 17n
212 Use \fIaddress\fR as the return address when invoking the delivery program. All
213 tilde commands are disabled. This option and its argument is passed to the
214 delivery program.
218 .ne 2
220 \fB\fB-s\fR \fIsubject\fR\fR
222 .RS 17n
223 Set the Subject header field to \fIsubject\fR. \fIsubject\fR should be enclosed
224 in quotes if it contains embedded white space.
228 .ne 2
230 \fB\fB-T\fR \fIfile\fR\fR
232 .RS 17n
233 Message-id and article-id header lines are recorded in \fIfile\fR after the
234 message is read. This option also sets the \fB-I\fR option.
238 .ne 2
240 \fB\fB-t\fR\fR
242 .RS 17n
243 Scan the input for \fBTo:\fR, \fBCc:\fR, and \fBBcc:\fR fields. Any recipients
244 on the command line will be ignored.
248 .ne 2
250 \fB\fB-U\fR\fR
252 .RS 17n
253 Convert \fBUUCP-style\fR addresses to internet standards.  Overrides the
254 \fBconv\fR environment variable.
258 .ne 2
260 \fB\fB-u\fR \fIuser\fR\fR
262 .RS 17n
263 Read \fIuser\fR's \fBmailbox\fR. This is only effective if \fIuser\fR's
264 \fBmailbox\fR is not read protected.
268 .ne 2
270 \fB\fB-V\fR\fR
272 .RS 17n
273 Print the \fBmailx\fR version number and exit.
277 .ne 2
279 \fB\fB-v\fR\fR
281 .RS 17n
282 Pass the \fB-v\fR flag to \fBsendmail\fR(1M).
286 .ne 2
288 \fB\fB-~\fR\fR
290 .RS 17n
291 Interpret tilde escapes in the input even if not reading from a tty.
294 .SH OPERANDS
296 The following operands are supported:
298 .ne 2
300 \fB\fIrecipient\fR\fR
302 .RS 13n
303 Addressee of message.
306 .SH USAGE
307 .SS "Starting Mail"
309 At startup time, \fBmailx\fR executes the system startup file
310 \fB/etc/mail/mailx.rc\fR. If invoked as \fBmail\fR or \fBMail\fR, the system
311 startup file \fB/etc/mail/Mail.rc\fR is used instead.
314 The system startup file sets  up initial display options and alias lists and
315 assigns values to some internal variables. These variables are flags and valued
316 parameters which are set and cleared using the \fBse\fRt and \fBuns\fRet
317 commands. See \fBInternal Variables\fR.
320 With the following exceptions, regular commands are legal inside startup files:
321 \fB!\fR, \fBC\fRopy, \fBe\fRdit, \fBfo\fRllowup, \fBF\fRollowup, \fBho\fRld,
322 \fBm\fRail, \fBpre\fRserve, \fBr\fReply, \fBR\fReply, \fBsh\fRell, and
323 \fBv\fRisual. An error in the startup file causes the remaining lines in the
324 file to be ignored.
327 After executing the system startup file,  the mail utilities execute the
328 optional personal startup file \fB$HOME/.mailrc\fR, wherein the user can
329 override the values of the internal variables as set by the system startup
330 file.
333 If the \fB-n\fR option is specified, however, the mail utilities do not execute
334 the system startup file.
337 Many system administrators include the commands
339 .in +2
341 set appenddeadletter
342 unset replyall
343 unset pipeignore
345 .in -2
350 in the system startup files (to be compatible with past Solaris behavior), but
351 this does not meet standards requirements for \fBmailx\fR. To get standard
352 behavior for \fBmailx\fR, users should use the \fB-n\fR option or include the
353 following commands in a personal startup file:
355 .in +2
357 unset appenddeadletter
358 set replyall
359 set pipeignore
361 .in -2
366 When reading mail, the mail utilities are in \fIcommand mode\fR. A header
367 summary of the first several messages is displayed, followed by a prompt
368 indicating the mail utilities can accept regular commands (see \fBCommands\fR
369 below). When sending mail, the mail utilities are in \fIinput mode\fR. If no
370 subject is specified on the command line, and the \fBasksub\fR variable is set,
371 a prompt for the subject is printed.
374 As the message is typed, the mail utilities read the message and store it in a
375 temporary file. Commands may be entered by beginning a line with the tilde (~)
376 escape character followed by a single command letter and optional arguments.
377 See \fBTilde Escapes\fR for a summary of these commands.
378 .SS "Reading Mail"
380 Each message is assigned a sequential number, and there is at any time the
381 notion of a current message, marked by a right angle bracket (>) in the header
382 summary. Many commands take an optional list of messages (\fImessage-list\fR)
383 to operate on.  In most cases, the current message is set to the
384 highest-numbered message in the list after the command is finished executing.
387 The default for \fImessage-list\fR is the current message. A \fImessage-list\fR
388 is a list of message identifiers separated by spaces, which may include:
390 .ne 2
392 \fB\fIn\fR\fR
394 .RS 11n
395 Message number \fIn\fR.
399 .ne 2
401 \fB\fB\&.\fR\fR
403 .RS 11n
404 The current message.
408 .ne 2
410 \fB\fB^\fR\fR
412 .RS 11n
413 The first undeleted message.
417 .ne 2
419 \fB\fB$\fR\fR
421 .RS 11n
422 The last message.
426 .ne 2
428 \fB\fB*\fR\fR
430 .RS 11n
431 All messages.
435 .ne 2
437 \fB\fB+\fR\fR
439 .RS 11n
440 The next undeleted message.
444 .ne 2
446 \fB\fB\(mi\fR\fR
448 .RS 11n
449 The previous undeleted message.
453 .ne 2
455 \fB\fIn\fR\fB\(mi\fR\fIm\fR\fR
457 .RS 11n
458 An inclusive range of message numbers.
462 .ne 2
464 \fB\fIuser\fR\fR
466 .RS 11n
467 All messages from \fIuser\fR.
471 .ne 2
473 \fB\fI/string\fR\fR
475 .RS 11n
476 All messages with \fIstring\fR in the Subject line (case ignored).
480 .ne 2
482 \fB\fB:\fR\fIc\fR\fR
484 .RS 11n
485 All messages of type \fIc\fR, where \fIc\fR is one of:
487 .ne 2
489 \fB\fBd\fR\fR
491 .RS 5n
492 deleted messages
496 .ne 2
498 \fB\fBn\fR\fR
500 .RS 5n
501 new messages
505 .ne 2
507 \fB\fBo\fR\fR
509 .RS 5n
510 old messages
514 .ne 2
516 \fB\fBr\fR\fR
518 .RS 5n
519 read messages
523 .ne 2
525 \fB\fBu\fR\fR
527 .RS 5n
528 unread messages
531 Notice that the context of the command determines whether this type of message
532 specification makes sense.
537 Other arguments are usually arbitrary strings whose usage depends on the
538 command involved. Filenames, where expected, are expanded using the normal
539 shell conventions (see \fBsh\fR(1)). Special characters are recognized by
540 certain commands and are documented with the commands below.
541 .SS "Sending Mail"
543 Recipients listed on the command line may be of three types: login names, shell
544 commands, or alias groups. Login names may be any network address, including
545 mixed network addressing. If mail is found to be undeliverable, an attempt is
546 made to return it to the sender's \fBmailbox\fR. If the \fBexpandaddr\fR option
547 is not set (the default), then the following rules do not apply and the name of
548 the recipient must be a local mailbox or network address. If the recipient name
549 begins with a pipe symbol ( | ), the rest of the name is taken to be a shell
550 command to pipe the message through. This provides an automatic interface with
551 any program that reads the standard input, such as \fBlp\fR(1) for recording
552 outgoing mail on paper.
555 Alias groups are set by the \fBa\fRlias command (see \fBCommands\fR below) or in
556 a system startup file (for example, \fB$HOME/.mailrc\fR). Aliases are lists of
557 recipients of any type.
558 .SS "Forwarding Mail"
560 To forward a specific message, include it in a message to the desired
561 recipients with the \fB~f\fR or \fB~m\fR tilde escapes. See \fBTilde\fR
562 \fBEscapes\fR below. To forward mail automatically, add a comma-separated list
563 of addresses for additional recipients to the \fB\&.forward\fR file in your
564 home directory. This is different from the format of the \fBalias\fR command,
565 which takes a space-separated list instead. \fBNote:\fR Forwarding addresses
566 must be valid, or the messages will "bounce." You cannot, for instance, reroute
567 your mail to a new host by forwarding it to your new address if it is not yet
568 listed in the \fBNIS\fR aliases domain.
569 .SS "Commands"
571 Regular commands are of the form
573 .in +2
575 [ \fIcommand\fR ] [ \fImessage-list\fR ] [ \fIarguments\fR ]
577 .in -2
582 In \fIinput mode\fR, commands are recognized by the escape character,
583 \fBtilde(~)\fR, and lines not treated as commands are taken as input for the
584 message. If no command is specified in \fIcommand mode\fR, \fBn\fRext is
585 assumed. The following is a complete list of \fBmailx\fR commands:
587 .ne 2
589 \fB\fB!\fR\fIshell-command\fR\fR
591 .sp .6
592 .RS 4n
593 Escape to the shell. See \fBSHELL\fR in ENVIRONMENT VARIABLES.
597 .ne 2
599 \fB\fB#\fR \fIcomment\fR\fR
601 .sp .6
602 .RS 4n
603 \fINULL\fR command (comment). Useful in \fBmailrc\fR files.
607 .ne 2
609 \fB\fB=\fR\fR
611 .sp .6
612 .RS 4n
613 Print the current message number.
617 .ne 2
619 \fB\fB?\fR\fR
621 .sp .6
622 .RS 4n
623 Prints a summary of commands.
627 .ne 2
629 \fB\fBa\fRlias \fIalias name\fR .\|.\|.\fR
633 \fB\fBg\fRroup \fIalias name\fR .\|.\|.\fR
635 .sp .6
636 .RS 4n
637 Declare an alias for the given names. The names are substituted when
638 \fBalias\fR is used as a recipient. Useful in the \fBmailrc\fR file. With no
639 arguments, the command displays the list of defined aliases.
643 .ne 2
645 \fB\fBalt\fRernates \fIname .\|.\|.\fR\fR
647 .sp .6
648 .RS 4n
649 Declare a list of alternate names for your login. When responding to a message,
650 these names are removed from the list of recipients for the response. With no
651 arguments, print the current list of alternate names. See also \fBallnet\fR in
652 \fBInternal Variables\fR.
656 .ne 2
658 \fB\fBcd\fR [\fIdirectory\fR]\fR
662 \fB\fBch\fRdir [\fIdirectory\fR]\fR
664 .sp .6
665 .RS 4n
666 Change directory. If \fIdirectory\fR is not specified, \fB$HOME\fR is used.
670 .ne 2
672 \fB\fBc\fRopy [\fIfile\fR]\fR
676 \fB\fBc\fRopy [\fImessage-list\fR] \fIfile\fR\fR
678 .sp .6
679 .RS 4n
680 Copy messages to the file without marking the messages as saved. Otherwise
681 equivalent to the \fBs\fRave command.
685 .ne 2
687 \fB\fBC\fRopy [\fImessage-list\fR]\fR
689 .sp .6
690 .RS 4n
691 Save the specified messages in a file whose name is derived from the author of
692 the message to be saved, without marking the messages as saved. Otherwise
693 equivalent to the \fBS\fRave command.
697 .ne 2
699 \fB\fBd\fRelete [\fImessage-list\fR]\fR
701 .sp .6
702 .RS 4n
703 Delete messages from the \fBmailbox\fR. If \fBautoprint\fR is set, the next
704 message after the last one deleted is printed (see \fBInternal Variables\fR).
708 .ne 2
710 \fB\fBdi\fRscard [\fIheader-field\fR.\|.\|.\|]\fR
714 \fB\fBig\fRnore [\fIheader-field\fR.\|.\|.\|]\fR
716 .sp .6
717 .RS 4n
718 Suppress printing of the specified header fields when displaying messages on
719 the screen. Examples of header fields to ignore are \fBStatus\fR and
720 \fBReceived\fR. The fields are included when the message is saved, unless the
721 \fBalwaysignore\fR variable is set. The \fBMo\fRre, \fBPa\fRge, \fBP\fRrint,
722 and \fBT\fRype commands override this command. If no header is specified, the
723 current list of header fields being ignored is printed. See also the
724 \fBundi\fRscard and \fBunig\fRnore commands.
728 .ne 2
730 \fB\fBdp\fR [\fImessage-list\fR]\fR
734 \fB\fBdt \fR[\fImessage-list\fR]\fR
736 .sp .6
737 .RS 4n
738 Delete the specified messages from the \fBmailbox\fR and print the next message
739 after the last one deleted. Roughly equivalent to a \fBd\fRelete command
740 followed by a \fBp\fRrint command.
744 .ne 2
746 \fB\fBec\fRho \fIstring \fR.\|.\|.\fR
748 .sp .6
749 .RS 4n
750 Echo the given strings (like \fBecho\fR(1)).
754 .ne 2
756 \fB\fBe\fRdit [\fImessage-list\fR]\fR
758 .sp .6
759 .RS 4n
760 Edit the given messages. Each message is placed in a temporary file and the
761 program named by the \fBEDITOR\fR variable is invoked to edit it (see
762 ENVIRONMENT VARIABLES). Default editor is \fBed\fR(1).
766 .ne 2
768 \fB\fBexpandaddr\fR\fR
770 .sp .6
771 .RS 4n
772 Causes recipient addresses to be expanded based on the discussion in the section
773 \fBSending Mail\fR. Note that enabling this option allows for addresses that can
774 cause arbitrary command execution by starting with the \fB|\fR character.
778 .ne 2
780 \fB\fBex\fRit\fR
784 \fB\fBx\fRit\fR
786 .sp .6
787 .RS 4n
788 Exit from \fBmailx\fR, without changing the \fBmailbox\fR. No messages are
789 saved in the \fBmbox\fR (see also \fBq\fRuit).
793 .ne 2
795 \fB\fBfie\fRld [\fImessage-list\fR] header-file\fR
797 .sp .6
798 .RS 4n
799 Display the value of the header field in the specified message.
803 .ne 2
805 \fB\fBfi\fRle [\fIfile\fR]\fR
809 \fB\fBfold\fRer [\fIfile\fR]\fR
811 .sp .6
812 .RS 4n
813 Quit from the current file of messages and read in the specified file. Several
814 special characters are recognized when used as file names:
816 .ne 2
818 \fB\fB%\fR\fR
820 .RS 9n
821 the current \fBmailbox\fR.
825 .ne 2
827 \fB\fB%\fR\fIuser\fR\fR
829 .RS 9n
830 the \fBmailbox\fR for \fIuser\fR.
834 .ne 2
836 \fB\fB#\fR\fR
838 .RS 9n
839 the previous mail file.
843 .ne 2
845 \fB\fB&\fR\fR
847 .RS 9n
848 the current \fBmbox\fR.
852 .ne 2
854 \fB\fB+\fR\fIfile\fR\fR
856 .RS 9n
857 The named file in the \fIfolder\fR directory (listed in the \fBfolder\fR
858 variable).
861 With no arguments, print the name of the current mail file, and the number of
862 messages and characters it contains.
866 .ne 2
868 \fB\fBfolders\fR\fR
870 .sp .6
871 .RS 4n
872 Print the names of the files in the directory set by the \fBfolder\fR variable
873 (see \fBInternal Variables\fR).
877 .ne 2
879 \fB\fBFo\fRllowup [\fImessage\fR]\fR
881 .sp .6
882 .RS 4n
883 Respond to a message, recording the response in a file whose name is derived
884 from the author of the message. Overrides the \fBrecord\fR variable, if set. If
885 the \fBreplyall\fR variable is set, the actions of \fBFo\fRllowup and
886 \fBfo\fRllowup are reversed. See also the \fBf\fRollowup, \fBS\fRave, and
887 \fBC\fRopy commands and \fBoutfolder\fR in \fBInternal Variables\fR, and the
888 \fBStarting Mail\fR section in USAGE above.
892 .ne 2
894 \fB\fBf\fRollowup [\fImessage-list\fR]\fR
896 .sp .6
897 .RS 4n
898 Respond to the first message in the \fImessage-list\fR, sending the message to
899 the author of each message in the \fImessage-list\fR. The subject line is taken
900 from the first message and the response is recorded in a file whose name is
901 derived from the author of the first message. If the \fBreplyall\fR variable is
902 set, the actions of \fBfo\fRllowup and \fBFo\fRllowup are reversed. See also
903 the \fBFo\fRllowup, \fBS\fRave, and \fBC\fRopy commands and \fBoutfolder\fR in
904 \fBInternal Variables\fR, and the \fBStarting Mail\fR section in USAGE above.
908 .ne 2
910 \fB\fBf\fRrom [\fImessage-list\fR]\fR
912 .sp .6
913 .RS 4n
914 Print the header summary for the specified messages. If no messages are
915 specified, print the header summary for the current message.
919 .ne 2
921 \fB\fBg\fRroup \fIalias name \fR.\|.\|.\fR
925 \fB\fBa\fRlias \fIalias name \fR.\|.\|.\fR
927 .sp .6
928 .RS 4n
929 Declare an alias for the given names. The names are substituted when
930 \fBalias\fR is used as a recipient. Useful in the \fBmailrc\fR file.
934 .ne 2
936 \fB\fBh\fReaders [\fImessage\fR]\fR
938 .sp .6
939 .RS 4n
940 Print the page of headers which includes the message specified. The
941 \fBscreen\fR variable sets the number of headers per page (see \fBInternal
942 Variables\fR). See also the \fBz\fR command.
946 .ne 2
948 \fB\fBhel\fRp\fR
950 .sp .6
951 .RS 4n
952 Print a summary of commands.
956 .ne 2
958 \fB\fBho\fRld [\fImessage-list\fR]\fR
962 \fB\fBpre\fRserve [\fImessage-list\fR]\fR
964 .sp .6
965 .RS 4n
966 Hold the specified messages in the \fBmailbox\fR.
970 .ne 2
972 \fB\fBi\fRf \fBs\fR | \fBr\fR | \fBt\fR\fR
976 \fB\fImail-commands\fR\fR
980 \fB\fR
984 \fB\fBel\fRse\fR
988 \fB\fImail-commands\fR\fR
992 \fB\fR
996 \fB\fBen\fRdif\fR
998 .sp .6
999 .RS 4n
1000 Conditional execution, where \fIs\fR executes following \fImail-commands\fR, up
1001 to an \fBel\fRse or \fBen\fRdif, if the program is in \fIsend\fR mode, \fIr\fR
1002 causes the \fImail-commands\fR to be executed only in \fIreceive\fR mode, and
1003 \fBt\fR causes the \fImail-commands\fR to be executed only if \fBmailx\fR is
1004 being run from a terminal. Useful in the \fBmailrc\fR file.
1008 .ne 2
1010 \fB\fBinc\fR\fR
1012 .sp .6
1013 .RS 4n
1014 Incorporate messages that arrive while you are reading the system mailbox. The
1015 new messages are added to the message list in the current \fBmail\fR session.
1016 This command does not commit changes made during the session, and prior
1017 messages are not renumbered.
1021 .ne 2
1023 \fB\fBig\fRnore [\fIheader-field \fR.\|.\|.\|]\fR
1027 \fB\fBdi\fRscard [\fIheader-field \fR.\|.\|.\|]\fR
1029 .sp .6
1030 .RS 4n
1031 Suppress printing of the specified header fields when displaying messages on
1032 the screen. Examples of header fields to ignore are \fBStatus\fR and \fBCc\fR.
1033 All fields are included when the message is saved. The \fBMo\fRre, \fBPa\fRge,
1034 \fBP\fRrint and \fBT\fRype commands override this command. If no header is
1035 specified, the current list of header fields being ignored is printed. See also
1036 the \fBundi\fRscard and \fBunig\fRnore commands.
1040 .ne 2
1042 \fB\fBl\fRist\fR
1044 .sp .6
1045 .RS 4n
1046 Print all commands available. No explanation is given.
1050 .ne 2
1052 \fB\fBlo\fRad\fR
1054 .sp .6
1055 .RS 4n
1056 [\fImessage\fR] \fBfile\fR The specified message is replaced by the message in
1057 the named file. \fBfile\fR should contain a single mail message including mail
1058 headers (as saved by the \fBs\fRave command).
1062 .ne 2
1064 \fB\fBm\fRail \fIrecipient \fR.\|.\|.\fR
1066 .sp .6
1067 .RS 4n
1068 Mail a message to the specified recipients.
1072 .ne 2
1074 \fB\fBM\fRail \fIrecipient\fR\fR
1076 .sp .6
1077 .RS 4n
1078 Mail a message to the specified recipients, and record it in a file whose name
1079 is derived from the author of the message. Overrides the \fBrecord\fR variable,
1080 if set. See also the \fBSave\fR and \fBCopy\fR commands and \fBoutfolder\fR in
1081 \fBInternal Variables\fR.
1085 .ne 2
1087 \fB\fBmb\fRox [\fImessage-list\fR]\fR
1089 .sp .6
1090 .RS 4n
1091 Arrange for the given messages to end up in the standard \fBmbox\fR save file
1092 when \fBmailx\fR terminates normally. See \fBMBOX\fR in ENVIRONMENT VARIABLES
1093 for a description of this file. See also the \fBex\fRit and \fBq\fRuit
1094 commands.
1098 .ne 2
1100 \fB\fBmo\fRre [\fImessage-list\fR]\fR
1104 \fB\fBpa\fRge [\fImessage-list\fR]\fR
1106 .sp .6
1107 .RS 4n
1108 Print the specified messages. If \fBcrt\fR is set, the messages longer than the
1109 number of lines specified by the \fBcrt\fR variable are paged through the
1110 command specified by the \fBPAGER\fR variable. The default command is
1111 \fBpg\fR(1) or if the \fBbsdcompat\fR variable is set, the default is
1112 \fBmore\fR(1). See ENVIRONMENT VARIABLES. Same as the \fBp\fRrint and
1113 \fBt\fRype commands.
1117 .ne 2
1119 \fB\fBMo\fRre [\fImessage-list\fR]\fR
1123 \fB\fBPa\fRge [\fImessage-list\fR]\fR
1125 .sp .6
1126 .RS 4n
1127 Print the specified messages on the screen, including all header fields.
1128 Overrides suppression of fields by the \fBig\fRnore command. Same as the
1129 \fBP\fRrint and \fBT\fRype commands.
1133 .ne 2
1135 \fB\fBne\fRw [\fImessage-list\fR]\fR
1139 \fB\fBN\fRew [\fImessage-list\fR]\fR
1143 \fB\fBunr\fRead [\fImessage-list\fR]\fR
1147 \fB\fBU\fRnread\fR
1149 .sp .6
1150 .RS 4n
1151 [\fImessage-list\fR] Take a message list and mark each message as \fInot\fR
1152 having been read.
1156 .ne 2
1158 \fB\fBn\fRext [\fImessage\fR]\fR
1160 .sp .6
1161 .RS 4n
1162 Go to the next message matching \fImessage\fR. If message is not supplied, this
1163 command finds the next message that was not deleted or saved. A
1164 \fImessage-list\fR may be specified, but in this case the first valid message
1165 in the list is the only one used. This is useful for jumping to the next
1166 message from a specific user, since the name would be taken as a command in the
1167 absence of a real command. See the discussion of \fImessage-list\fR above for a
1168 description of possible message specifications.
1172 .ne 2
1174 \fB\fBpi\fRpe [\fImessage-list\fR] [\fIshell-command\fR]\fR
1178 \fB\fB|\fR [\fImessage-list\fR] [\fIshell-command\fR]\fR
1180 .sp .6
1181 .RS 4n
1182 Pipe the message through the given \fIshell-command\fR. The message is treated
1183 as if it were read. If no arguments are given, the current message is piped
1184 through the command specified by the value of the \fBcmd\fR variable. If the
1185 \fBpage\fR variable is set, a form feed character is inserted after each
1186 message (see \fBInternal Variables\fR).
1190 .ne 2
1192 \fB\fBpre\fRserve [\fImessage-list\fR]\fR
1196 \fB\fBho\fRld [\fImessage-list\fR]\fR
1198 .sp .6
1199 .RS 4n
1200 Preserve the specified messages in the \fBmailbox\fR.
1204 .ne 2
1206 \fB\fBp\fRrint [\fImessage-list\fR]\fR
1210 \fB\fBt\fRype [\fImessage-list\fR]\fR
1212 .sp .6
1213 .RS 4n
1214 Print the specified messages. If \fBcrt\fR is set, the messages longer than the
1215 number of lines specified by the \fBcrt\fR variable are paged through the
1216 command specified by the \fBPAGER\fR variable. The default command is
1217 \fBpg\fR(1) or if the \fBbsdcompat\fR variable is set, the default is
1218 \fBmore\fR(1). See ENVIRONMENT VARIABLES. Same as the \fBmo\fRre and \fBpa\fRge
1219 commands.
1223 .ne 2
1225 \fB\fBP\fRrint [\fImessage-list\fR]\fR
1229 \fB\fBT\fRype [\fImessage-list\fR]\fR
1231 .sp .6
1232 .RS 4n
1233 Print the specified messages on the screen, including all header fields.
1234 Overrides suppression of fields by the \fBig\fRnore command.  Same as the
1235 \fBMo\fRre and \fBPa\fRge commands.
1239 .ne 2
1241 \fB\fBpu\fRt [\fIfile\fR]\fR
1245 \fB\fBpu\fRt [\fImessage-list\fR] \fIfile\fR\fR
1247 .sp .6
1248 .RS 4n
1249 Save the specified message in the given file. Use the same conventions as the
1250 \fBp\fRrint command for which header fields are ignored.
1254 .ne 2
1256 \fB\fBPu\fRt [\fIfile\fR]\fR
1260 \fB\fBPu\fRt [\fImessage-list\fR] \fIfile\fR\fR
1262 .sp .6
1263 .RS 4n
1264 Save the specified message in the given file. Overrides suppression of fields
1265 by the \fBig\fRnore command.
1269 .ne 2
1271 \fB\fBq\fRuit\fR
1273 .sp .6
1274 .RS 4n
1275 Exit from \fBmailx\fR, storing messages that were read in \fBmbox\fR and unread
1276 messages in the \fBmailbox\fR. Messages that have been explicitly saved in a
1277 file are deleted unless the \fBkeepsave\fR variable is set.
1281 .ne 2
1283 \fB\fBr\fReply [\fImessage-list\fR]\fR
1287 \fB\fBr\fRespond [\fImessage-list\fR]\fR
1291 \fB\fBreplys\fRender [\fImessage-list\fR]\fR
1293 .sp .6
1294 .RS 4n
1295 Send a response to the author of each message in the \fImessage-list\fR. The
1296 subject line is taken from the first message.  If \fBrecord\fR is set to a
1297 file, a copy of the reply is added to that file. If the \fBreplyall\fR variable
1298 is set, the actions of \fBR\fReply/\fBR\fRespond and \fBr\fReply/\fBr\fRespond
1299 are reversed. The \fBreplys\fRender command is not affected by the
1300 \fBreplyall\fR variable, but sends each reply only to the sender of each
1301 message. See the \fBStarting Mail\fR section in USAGE above.
1305 .ne 2
1307 \fB\fBR\fReply [\fImessage\fR]\fR
1311 \fB\fBR\fRespond [\fImessage\fR]\fR
1315 \fB\fBreplya\fRll [\fImessage\fR]\fR
1317 .sp .6
1318 .RS 4n
1319 Reply to the specified message, including all other recipients of that message.
1320 If the variable \fBrecord\fR is set to a file, a copy of the reply added to
1321 that file. If the \fBreplyall\fR variable is set, the actions of
1322 \fBR\fReply/\fBR\fRespond and \fBr\fReply/\fBr\fRespond are reversed. The
1323 \fBreplya\fRll command is not affected by the \fBreplyall\fR variable, but
1324 always sends the reply to all recipients of the message. See the \fBStarting
1325 Mail\fR section in USAGE above.
1329 .ne 2
1331 \fB\fBret\fRain\fR
1333 .sp .6
1334 .RS 4n
1335 Add the list of header fields named to the \fIretained list\fR. Only the header
1336 fields in the retain list are shown on your terminal when you print a message.
1337 All other header fields are suppressed.  The set of retained fields specified
1338 by the \fBret\fRain command overrides any list of ignored fields specified by
1339 the \fBig\fRnore command. The \fBT\fRype and \fBP\fRrint commands can be used
1340 to print a message in its entirety. If \fBret\fRain is executed with no
1341 arguments, it lists the current set of retained fields.
1345 .ne 2
1347 \fB\fBS\fRave [\fImessage-list\fR]\fR
1349 .sp .6
1350 .RS 4n
1351 Save the specified messages in a file whose name is derived from the author of
1352 the first message. The name of the file is taken to be the author's name with
1353 all network addressing stripped off. See also the \fBC\fRopy, \fBfo\fRllowup,
1354 and \fBF\fRollowup commands and \fBoutfolder\fR in \fBInternal Variables\fR.
1358 .ne 2
1360 \fB\fBs\fRave [\fIfile\fR]\fR
1364 \fB\fBs\fRave [\fImessage-list\fR] \fIfile\fR\fR
1366 .sp .6
1367 .RS 4n
1368 Save the specified messages in the given file. The file is created if it does
1369 not exist. The file defaults to \fBmbox\fR. The message is deleted from the
1370 \fBmailbox\fR when \fBmailx\fR terminates unless \fBkeepsave\fR is set (see
1371 also \fBInternal Variables\fR and the \fBex\fRit and \fBq\fRuit commands).
1375 .ne 2
1377 \fB\fBse\fRt\fR
1381 \fB\fBse\fRt \fIvariable\fR\fR
1385 \fB\fBse\fRt \fIvariable\fR\fB=\fR\fIstring\fR\fR
1389 \fB\fBse\fRt \fIvariable\fR\fB=\fR\fInumber\fR\fR
1391 .sp .6
1392 .RS 4n
1393 Define a \fIvariable\fR. To assign a \fIvalue\fR to \fIvariable\fR, separate
1394 the variable name from the value by an `\fB=\fR' (there must be no space before
1395 or after the `\fB=\fR'). A variable may be given a null, string, or numeric
1396 \fIvalue\fR. To embed SPACE characters within a \fIvalue\fR, enclose it in
1397 quotes.
1399 With no arguments, \fBse\fRt displays all defined variables and any values they
1400 might have. See \fBInternal Variables\fR for a description of all predefined
1401 \fBmail\fR variables.
1405 .ne 2
1407 \fB\fBsh\fRell\fR
1409 .sp .6
1410 .RS 4n
1411 Invoke an interactive shell. See also \fBSHELL\fR in ENVIRONMENT VARIABLES.
1415 .ne 2
1417 \fB\fBsi\fRze [\fImessage-list\fR]\fR
1419 .sp .6
1420 .RS 4n
1421 Print the size in characters of the specified messages.
1425 .ne 2
1427 \fB\fBso\fRurce \fIfile\fR\fR
1429 .sp .6
1430 .RS 4n
1431 Read commands from the given file and return to command mode.
1435 .ne 2
1437 \fB\fBto\fRp [\fImessage-list\fR]\fR
1439 .sp .6
1440 .RS 4n
1441 Print the top few lines of the specified messages. If the \fBtoplines\fR
1442 variable is set, it is taken as the number of lines to print (see \fBInternal
1443 Variables\fR). The default is 5.
1447 .ne 2
1449 \fB\fBtou\fRch [\fImessage-list\fR]\fR
1451 .sp .6
1452 .RS 4n
1453 Touch the specified messages. If any message in \fImessage-list\fR is not
1454 specifically saved in a file, it is placed in the \fBmbox\fR, or the file
1455 specified in the \fBMBOX\fR environment variable, upon normal termination. See
1456 \fBex\fRit and \fBq\fRuit.
1460 .ne 2
1462 \fB\fBT\fRype [\fImessage-list\fR]\fR
1466 \fB\fBP\fRrint [\fImessage-list\fR]\fR
1468 .sp .6
1469 .RS 4n
1470 Print the specified messages on the screen, including all header fields.
1471 Overrides suppression of fields by the \fBig\fRnore command.
1475 .ne 2
1477 \fB\fBt\fRype [\fImessage-list\fR]\fR
1481 \fB\fBp\fRrint [\fImessage-list\fR]\fR
1483 .sp .6
1484 .RS 4n
1485 Print the specified messages. If \fBcrt\fR is set, the messages longer than the
1486 number of lines specified by the \fBcrt\fR variable are paged through the
1487 command specified by the \fBPAGER\fR variable. The default command is
1488 \fBpg\fR(1). See ENVIRONMENT VARIABLES.
1492 .ne 2
1494 \fB\fBuna\fRlias [\fBalias\fR] .\|.\|.\fR
1498 \fB\fBung\fRroup [\fBalias\fR] .\|.\|.\fR
1500 .sp .6
1501 .RS 4n
1502 Remove the definitions of the specified aliases.
1506 .ne 2
1508 \fB\fBu\fRndelete [\fImessage-list\fR]\fR
1510 .sp .6
1511 .RS 4n
1512 Restore the specified deleted messages. Will only restore messages deleted in
1513 the current mail session. If \fBautoprint\fR is set, the last message of those
1514 restored is printed (see \fBInternal Variables\fR).
1518 .ne 2
1520 \fB\fBundi\fRscard [\fIheader-field\fR\|.\|.\|.]\fR
1524 \fB\fBunig\fRnore [\fIheader-field\fR\|.\|.\|.]\fR
1526 .sp .6
1527 .RS 4n
1528 Remove the specified header fields from the list being ignored. If no header
1529 fields are specified, all header fields are removed from the list being
1530 ignored.
1534 .ne 2
1536 \fB\fBunret\fRain [\fIheader-field\fR\|.\|.\|.]\fR
1538 .sp .6
1539 .RS 4n
1540 Remove the specified header fields from the list being retained. If no header
1541 fields are specified, all header fields are removed from the list being
1542 retained.
1546 .ne 2
1548 \fB\fBunr\fRead [\fImessage-list\fR]\fR
1552 \fB\fBU\fRnread [\fImessage-list\fR] Same as the \fBne\fRw command.\fR
1554 .sp .6
1555 .RS 4n
1560 .ne 2
1562 \fB\fBuns\fRet \fIvariable\fR\|.\|.\|.\fR
1564 .sp .6
1565 .RS 4n
1566 Erase the specified variables. If the variable was imported from the
1567 environment (that is, an environment variable or exported shell variable), it
1568 cannot be unset from within \fBmailx\fR.
1572 .ne 2
1574 \fB\fBve\fRrsion\fR
1576 .sp .6
1577 .RS 4n
1578 Print the current version and release date of the \fBmailx\fR utility.
1582 .ne 2
1584 \fB\fBv\fRisual [\fImessage-list\fR]\fR
1586 .sp .6
1587 .RS 4n
1588 Edit the given messages with a screen editor. Each messages is placed in a
1589 temporary file and the program named by the \fBVISUAL\fR variable is invoked to
1590 edit it (see ENVIRONMENT VARIABLES). Notice that the default visual editor is
1591 \fBvi\fR.
1595 .ne 2
1597 \fB\fBw\fRrite [\fImessage-list\fR] \fBfile\fR\fR
1599 .sp .6
1600 .RS 4n
1601 Write the given messages on the specified file, minus the header and trailing
1602 blank line. Otherwise equivalent to the \fBs\fRave command.
1606 .ne 2
1608 \fB\fBx\fRit\fR
1612 \fB\fBex\fRit\fR
1614 .sp .6
1615 .RS 4n
1616 Exit from \fBmailx\fR, without changing the \fBmailbox\fR. No messages are
1617 saved in the \fBmbox\fR (see also \fBq\fRuit).
1621 .ne 2
1623 \fB\fBz\fR[\fB+\fR\||\|\fB\(mi\fR]\fR
1625 .sp .6
1626 .RS 4n
1627 Scroll the header display forward or backward one screen\(mifull. The number of
1628 headers displayed is set by the \fBscreen\fR variable (see \fBInternal
1629 Variables\fR).
1632 .SS "Tilde Escapes"
1634 The following tilde escape commands can be used when composing mail to send.
1635 These may be entered only from \fIinput mode\fR, by beginning a line with the
1636 tilde escape character (~). See \fBescape\fR in \fBInternal Variables\fR for
1637 changing this special character. The escape character can be entered as text by
1638 typing it twice.
1640 .ne 2
1642 \fB\fB~\|!\fR\fIshell-command\fR\fR
1644 .RS 23n
1645 Escape to the shell. If present, run \fIshell-command\fR.
1649 .ne 2
1651 \fB\fB~.\fR\fR
1653 .RS 23n
1654 Simulate end of file (terminate message input).
1658 .ne 2
1660 \fB\fB~\|:\fR\fImail-command\fR\fR
1664 \fB\fB~_\|\fR\fImail-command\fR\fR
1666 .RS 23n
1667 Perform the command-level request. Valid only when sending a message while
1668 reading mail.
1672 .ne 2
1674 \fB\fB~?\fR\fR
1676 .RS 23n
1677 Print a summary of tilde escapes.
1681 .ne 2
1683 \fB\fB~A\fR\fR
1685 .RS 23n
1686 Insert the autograph string \fBSign\fR into the message (see \fBInternal
1687 Variables\fR).
1691 .ne 2
1693 \fB\fB~a\fR\fR
1695 .RS 23n
1696 Insert the autograph string \fBsign\fR into the message (see \fBInternal
1697 Variables\fR).
1701 .ne 2
1703 \fB\fB~b\fR\fI name \|.\|.\|.\fR\fR
1705 .RS 23n
1706 Add the \fIname\fRs to the blind carbon copy (\fBBcc\fR) list. This is like the
1707 carbon copy (\fBCc\fR) list, except that the names in the \fBBcc\fR list are
1708 not shown in the header of the mail message.
1712 .ne 2
1714 \fB\fB~c\fR\fI name \|.\|.\|.\fR\fR
1716 .RS 23n
1717 Add the \fIname\fRs to the carbon copy (\fBCc\fR) list.
1721 .ne 2
1723 \fB\fB~d\fR\fR
1725 .RS 23n
1726 Read in the \fBdead-letter\fR file. See \fBDEAD\fR in ENVIRONMENT VARIABLES for
1727 a description of this file.
1731 .ne 2
1733 \fB\fB~e\fR\fR
1735 .RS 23n
1736 Invoke the editor on the partial message. See also \fBEDITOR\fR in ENVIRONMENT
1737 VARIABLES.
1741 .ne 2
1743 \fB\fB~f\fR [\fImessage-list\fR]\fR
1745 .RS 23n
1746 Forward the specified message, or the current message being read. Valid only
1747 when sending a message while reading mail. The messages are inserted into the
1748 message without alteration (as opposed to the \fB~m\fR escape).
1752 .ne 2
1754 \fB\fB~F\fR [\fImessage-list\fR]\fR
1756 .RS 23n
1757 Forward the specified message, or the current message being read, including all
1758 header fields. Overrides the suppression of fields by the \fBig\fRnore command.
1762 .ne 2
1764 \fB\fB~h\fR\fR
1766 .RS 23n
1767 Prompt for \fBSubject\fR line and \fBTo\fR, \fBCc\fR, and \fBBcc\fR lists. If
1768 the field is displayed with an initial value, it may be edited as if you had
1769 just typed it.
1773 .ne 2
1775 \fB\fB~i\fR \fIvariable\fR\fR
1777 .RS 23n
1778 Insert the value of the named variable into the text of the message. For
1779 example, \fB~A\fR is equivalent to `\fB~i Sign\fR.' Environment variables set
1780 and exported in the shell are also accessible by \fB~i\fR.
1784 .ne 2
1786 \fB\fB~m\fR [\fImessage-list\fR]\fR
1788 .RS 23n
1789 Insert the listed messages, or the current message being read into the letter.
1790 Valid only when sending a message while reading mail. The text of the message
1791 is shifted to the right, and the string contained in the \fBindentprefix\fR
1792 variable is inserted as the leftmost characters of each line. If
1793 \fBindentprefix\fR is not set, a TAB character is inserted into each line.
1797 .ne 2
1799 \fB\fB~M\fR [\fImessage-list\fR]\fR
1801 .RS 23n
1802 Insert the listed messages, or the current message being read, including the
1803 header fields, into the letter. Valid only when sending a message while reading
1804 mail. The text of the message is shifted to the right, and the string contained
1805 in the \fBindentprefix\fR variable is inserted as the leftmost characters of
1806 each line. If \fBindentprefix\fR is not set, a TAB character is inserted into
1807 each line. Overrides the suppression of fields by the \fBig\fRnore command.
1811 .ne 2
1813 \fB\fB~p\fR\fR
1815 .RS 23n
1816 Print the message being entered.
1820 .ne 2
1822 \fB\fB~q\fR\fR
1824 .RS 23n
1825 Quit from input mode by simulating an interrupt. If the body of the message is
1826 not null, the partial message is saved in \fBdead-letter\fR. See \fBDEAD\fR in
1827 ENVIRONMENT VARIABLES for a description of this file.
1831 .ne 2
1833 \fB\fB~R\fR\fR
1835 .RS 23n
1836 Mark message for return receipt.
1840 .ne 2
1842 \fB\fB~r\fR \fIfile\fR\fR
1846 \fB\fB~<\fR \fIfile\fR\fR
1850 \fB\fB~< ! \fR\fIshell-command\fR\fR
1852 .RS 23n
1853 Read in the specified file. If the argument begins with an exclamation point
1854 (!), the rest of the string is taken as an arbitrary shell command and is
1855 executed, with the standard output inserted into the message.
1859 .ne 2
1861 \fB\fB~s\fR \fIstring \|.\|.\|.\fR\fR
1863 .RS 23n
1864 Set the subject line to \fIstring\fR.
1868 .ne 2
1870 \fB\fB~t\fR \fIname \|.\|.\|.\fR\fR
1872 .RS 23n
1873 Add the given \fIname\fRs to the To list.
1877 .ne 2
1879 \fB\fB~v\fR\fR
1881 .RS 23n
1882 Invoke a preferred screen editor on the partial message. The default visual
1883 editor is \fBvi\fR(1). See also \fBVISUAL\fR in ENVIRONMENT VARIABLES.
1887 .ne 2
1889 \fB\fB~w\fR \fIfile\fR\fR
1891 .RS 23n
1892 Write the message into the given file, without the header.
1896 .ne 2
1898 \fB\fB~x\fR\fR
1900 .RS 23n
1901 Exit as with \fB~q\fR except the message is not saved in \fBdead-letter\fR.
1905 .ne 2
1907 \fB\fB~|\fR \fIshell-command\fR\fR
1909 .RS 23n
1910 Pipe the body of the message through the given \fIshell-command\fR. If the
1911 \fIshell-command\fR returns a successful exit status, the output of the command
1912 replaces the message.
1915 .SS "Internal Variables"
1917 The following variables are internal variables. They may be imported from the
1918 execution environment or set using the \fBse\fRt command at any time. The
1919 \fBuns\fRet command may be used to erase variables.
1921 .ne 2
1923 \fB\fBallnet\fR\fR
1925 .RS 26n
1926 All network names whose last component (login name) match are treated as
1927 identical. This causes the \fImessage-list\fR message specifications to behave
1928 similarly. Disabled by default. See also the \fBalt\fRernates command and the
1929 \fBmetoo\fR and \fBfuzzymatch\fR variables.
1933 .ne 2
1935 \fB\fBalwaysignore\fR\fR
1937 .RS 26n
1938 Ignore header fields with \fBig\fRnore everywhere, not just during \fBp\fRrint
1939 or \fBt\fRype. Affects the \fBs\fRave, \fBS\fRave, \fBc\fRopy, \fBC\fRopy,
1940 \fBto\fRp, \fBpi\fRpe, and \fBw\fRrite commands, and the \fB~m\fR and \fB~f\fR
1941 tilde escapes. Enabled by default.
1945 .ne 2
1947 \fB\fBappend\fR\fR
1949 .RS 26n
1950 Upon termination, append messages to the end of the \fBmbox\fR file instead of
1951 prepending them. Although disabled by default, \fBappend\fR is set in the
1952 system startup file (which can be suppressed with the \fB-n\fR command line
1953 option).
1957 .ne 2
1959 \fB\fBappenddeadletter\fR\fR
1961 .RS 26n
1962 Append to the deadletter file rather than overwrite it. Although disabled by
1963 default, \fBappenddeadletter\fR is frequently set in the system startup file.
1964 See \fBStarting Mail\fR in USAGE above.
1968 .ne 2
1970 \fB\fBaskbcc\fR\fR
1972 .RS 26n
1973 Prompt for the \fBBcc\fR list after the \fBSubject\fR is entered if it is not
1974 specified on the command line with the \fB-b\fR option. Disabled by default.
1978 .ne 2
1980 \fB\fBaskcc\fR\fR
1982 .RS 26n
1983 Prompt for the \fBCc\fR list after the \fBSubject\fR is entered if it is not
1984 specified on the command line with the \fB-c\fR option. Disabled by default.
1988 .ne 2
1990 \fB\fBasksub\fR\fR
1992 .RS 26n
1993 Prompt for subject if it is not specified on the command line with the \fB-s\fR
1994 option. Enabled by default.
1998 .ne 2
2000 \fB\fBautoinc\fR\fR
2002 .RS 26n
2003 Automatically incorporate new messages into the current session as they arrive.
2004 This has an affect similar to issuing the \fBinc\fR command every time the
2005 command prompt is displayed. Disabled by default, but \fBautoinc\fR is set in
2006 the default system startup file for \fBmailx\fR; it is not set for
2007 \fB/usr/ucb/mail\fR or \fB/usr/ucb/Mail\fR.
2011 .ne 2
2013 \fB\fBautoprint\fR\fR
2015 .RS 26n
2016 Enable automatic printing of messages after \fBd\fRelete and \fBu\fRndelete
2017 commands. Disabled by default.
2021 .ne 2
2023 \fB\fBbang\fR\fR
2025 .RS 26n
2026 Enable the special-casing of exclamation points (!) in shell escape command
2027 lines as in \fBvi\fR(1). Disabled by default.
2031 .ne 2
2033 \fB\fBbsdcompat\fR\fR
2035 .RS 26n
2036 Set automatically if \fBmailx\fR is invoked as \fBmail\fR or \fBMail\fR. Causes
2037 \fBmailx\fR to use \fB/etc/mail/Mail.rc\fR as the system startup file. Changes
2038 the default pager to \fBmore\fR(1).
2042 .ne 2
2044 \fB\fBcmd=\fR\fIshell-command\fR\fR
2046 .RS 26n
2047 Set the default command for the \fBpi\fRpe command.  No default value.
2051 .ne 2
2053 \fB\fBconv=\fR\fIconversion\fR\fR
2055 .RS 26n
2056 Convert \fBuucp\fR addresses to the specified address style, which can be
2057 either:
2059 .ne 2
2061 \fB\fBinternet\fR\fR
2063 .RS 12n
2064 This requires a mail delivery program conforming to the \fBRFC822\fR standard
2065 for electronic mail addressing.
2069 .ne 2
2071 \fB\fBoptimize\fR\fR
2073 .RS 12n
2074 Remove loops in \fBuucp\fR(1C) address paths (typically generated by the
2075 \fBr\fReply command).  No rerouting is performed; \fBmail\fR has no knowledge
2076 of \fBUUCP\fR routes or connections.
2079 Conversion is disabled by default. See also \fBsendmail\fR(1M) and the \fB-U\fR
2080 command-line option.
2084 .ne 2
2086 \fB\fBcrt\fR[\fB=\fR\fInumber\fR]\fR
2088 .RS 26n
2089 Pipe messages having more than \fInumber\fR lines through the command specified
2090 by the value of the \fBPAGER\fR variable ( \fBpg\fR(1) or \fBmore\fR(1) by
2091 default). If \fInumber\fR is not specified, the current window size is used.
2092 Disabled by default.
2096 .ne 2
2098 \fB\fBdebug\fR\fR
2100 .RS 26n
2101 Enable verbose diagnostics for debugging. Messages are not delivered. Disabled
2102 by default.
2106 .ne 2
2108 \fB\fBdot\fR\fR
2110 .RS 26n
2111 Take a period on a line by itself, or \fBEOF\fR during input from a terminal as
2112 end-of-file. Disabled by default, but \fBdot\fR is set in the system startup
2113 file (which can be suppressed with the \fB-n\fR command line option).
2117 .ne 2
2119 \fB\fBfcc\fR\fR
2121 .RS 26n
2122 By default, \fBmailx\fR will treat any address containing a slash ("/")
2123 character as a local "send to file" address. By unsetting this option, this
2124 behavior is disabled. Enabled by default.
2128 .ne 2
2130 \fB\fBflipr\fR\fR
2132 .RS 26n
2133 Reverse the effect of the \fBfo\fRllowup/\fBFo\fRllowup and
2134 \fBr\fReply/\fBR\fReply command pairs.  If both \fBflipr\fR and \fBreplyall\fR
2135 are set, the effect is as if neither was set.
2139 .ne 2
2141 \fB\fBfrom\fR\fR
2143 .RS 26n
2144 Extract the author listed in the header summary from the \fBFrom:\fR header
2145 instead of the UNIX \fBFrom\fR line. Enabled by default.
2149 .ne 2
2151 \fB\fBfuzzymatch\fR\fR
2153 .RS 26n
2154 The \fBfrom\fR command searches for messages from the indicated sender. By
2155 default, the full sender address must be specified. By setting this option,
2156 only a sub-string of the sender address need be specified. Disabled by default.
2160 .ne 2
2162 \fB\fBescape=\fR\fIc\fR\fR
2164 .RS 26n
2165 Substitute \fIc\fR for the ~ escape character. Takes effect with next message
2166 sent.
2170 .ne 2
2172 \fB\fBfolder=\fR\fIdirectory\fR\fR
2174 .RS 26n
2175 The directory for saving standard mail files. User-specified file names
2176 beginning with a plus (+) are expanded by preceding the file name with this
2177 directory name to obtain the real file name. If \fIdirectory\fR does not start
2178 with a slash (/), \fB$HOME\fR is prepended to it.  There is no default for the
2179 \fBfolder\fR variable. See also \fBoutfolder\fR below.
2183 .ne 2
2185 \fB\fBheader\fR\fR
2187 .RS 26n
2188 Enable printing of the header summary when entering \fBmailx\fR. Enabled by
2189 default.
2193 .ne 2
2195 \fB\fBhold\fR\fR
2197 .RS 26n
2198 Preserve all messages that are read in the \fBmailbox\fR instead of putting
2199 them in the standard \fBmbox\fR save file. Disabled by default.
2203 .ne 2
2205 \fB\fBignore\fR\fR
2207 .RS 26n
2208 Ignore interrupts while entering messages. Handy for noisy dial-up lines.
2209 Disabled by default.
2213 .ne 2
2215 \fB\fBignoreeof\fR\fR
2217 .RS 26n
2218 Ignore end-of-file during message input. Input must be terminated by a period
2219 (.) on a line by itself or by the \fB~.\fR command. See also \fBdot\fR above.
2220 Disabled by default.
2224 .ne 2
2226 \fB\fBindentprefix=\fR\fIstring\fR\fR
2228 .RS 26n
2229 When \fBindentprefix\fR is set, \fIstring\fR is used to mark indented lines
2230 from messages included with \fB~m\fR. The default is a TAB character.
2234 .ne 2
2236 \fB\fBkeep\fR\fR
2238 .RS 26n
2239 When the \fBmailbox\fR is empty, truncate it to zero length instead of removing
2240 it. Disabled by default.
2244 .ne 2
2246 \fB\fBiprompt=\fR\fIstring\fR\fR
2248 .RS 26n
2249 The specified prompt string is displayed before each line on input is requested
2250 when sending a message.
2254 .ne 2
2256 \fB\fBkeepsave\fR\fR
2258 .RS 26n
2259 Keep messages that have been saved in other files in the \fBmailbox\fR instead
2260 of deleting them. Disabled by default.
2264 .ne 2
2266 \fB\fBmakeremote\fR\fR
2268 .RS 26n
2269 When replying to all recipients of a message, if an address does not include a
2270 machine name, it is assumed to be relative to the sender of the message.
2271 Normally not needed when dealing with hosts that support RFC822.
2275 .ne 2
2277 \fB\fBmetoo\fR\fR
2279 .RS 26n
2280 If your login appears as a recipient, do not delete it from the list. Disabled
2281 by default.
2285 .ne 2
2287 \fB\fBmustbang\fR\fR
2289 .RS 26n
2290 Force all mail addresses to be in bang format.
2294 .ne 2
2296 \fB\fBonehop\fR\fR
2298 .RS 26n
2299 When responding to a message that was originally sent to several recipients,
2300 the other recipient addresses are normally forced to be relative to the
2301 originating author's machine for the response. This flag disables alteration of
2302 the recipients' addresses, improving efficiency in a network where all machines
2303 can send directly to all other machines (that is, one hop away). Disabled by
2304 default.
2308 .ne 2
2310 \fB\fBoutfolder\fR\fR
2312 .RS 26n
2313 Locate the files used to record outgoing messages in the directory specified by
2314 the \fBfolder\fR variable unless the path name is absolute. Disabled by
2315 default. See \fBfolder\fR above and the \fBS\fRave, \fBC\fRopy, \fBfo\fRllowup,
2316 and \fBF\fRollowup commands.
2320 .ne 2
2322 \fB\fBpage\fR\fR
2324 .RS 26n
2325 Used with the \fBpi\fRpe command to insert a form feed after each message sent
2326 through the pipe. Disabled by default.
2330 .ne 2
2332 \fB\fBpipeignore\fR\fR
2334 .RS 26n
2335 Omit ignored header when outputting to the \fBpipe\fR command. Although
2336 disabled by default,  \fBpipeignore\fR is frequently set in the system startup
2337 file. See \fBStarting Mail\fR in USAGE above.
2341 .ne 2
2343 \fB\fBpostmark\fR\fR
2345 .RS 26n
2346 Your "real name" to be included in the From line of messages you send.  By
2347 default this is derived from the comment field in your \fBpasswd\fR(4) file
2348 entry.
2352 .ne 2
2354 \fB\fBprompt=\fR\fIstring\fR\fR
2356 .RS 26n
2357 Set the \fIcommand mode\fR prompt to \fIstring\fR. Default is "\fB? \fR",
2358 unless the \fBbsdcompat\fR variable is set, then the default is "\fB&\fR".
2362 .ne 2
2364 \fB\fBquiet\fR\fR
2366 .RS 26n
2367 Refrain from printing the opening message and version when entering
2368 \fBmailx\fR. Disabled by default.
2372 .ne 2
2374 \fB\fBrecord=\fR\fIfile\fR\fR
2376 .RS 26n
2377 Record all outgoing mail in \fIfile\fR. Disabled by default. See also
2378 \fBoutfolder\fR above.
2382 .ne 2
2384 \fB\fBreplyall\fR\fR
2386 .RS 26n
2387 Reverse the effect of the \fBr\fReply and \fBR\fReply and \fBfo\fRllowup and
2388 \fBFo\fRllowup commands. Although set by default,  \fBreplayall\fR is
2389 frequently unset in the system startup file. See \fBflipr\fR and \fBStarting
2390 Mail\fR in USAGE above.
2394 .ne 2
2396 \fB\fBreturnaddr=\fR\fIstring\fR\fR
2398 .RS 26n
2399 The default sender address is that of the current user. This variable can be
2400 used to set the sender address to any arbitrary value. Set with caution.
2404 .ne 2
2406 \fB\fBsave\fR\fR
2408 .RS 26n
2409 Enable saving of messages in \fBdead-letter\fR on interrupt or delivery error.
2410 See \fBDEAD\fR for a description of this file. Enabled by default.
2414 .ne 2
2416 \fB\fBscreen=\fR\fInumber\fR\fR
2418 .RS 26n
2419 Sets the number of lines in a screen-full of headers for the \fBh\fReaders
2420 command. \fInumber\fR must be a positive number.
2422 The default is set according to baud rate or window size. With a baud rate less
2423 than \fB1200\fR, \fInumber\fR defaults to \fB5\fR, if baud rate is exactly
2424 \fB1200\fR, it defaults to \fB10\fR. If you are in a window, \fInumber\fR
2425 defaults to the default window size minus 4. Otherwise, the default is
2426 \fB20\fR.
2430 .ne 2
2432 \fB\fBsendmail=\fR\fIshell-command\fR\fR
2434 .RS 26n
2435 Alternate command for delivering messages. \fBNote:\fR In addition to the
2436 expected list of recipients, \fBmail\fR also passes the \fB-i\fR and \fB-m\fR,
2437 flags to the command. Since these flags are not appropriate to other commands,
2438 you may have to use a shell script that strips them from the arguments list
2439 before invoking the desired command. Default is \fB/usr/bin/rmail\fR.
2443 .ne 2
2445 \fB\fBsendwait\fR\fR
2447 .RS 26n
2448 Wait for background mailer to finish before returning. Disabled by default.
2452 .ne 2
2454 \fB\fBshowname\fR\fR
2456 .RS 26n
2457 Causes the message header display to show the sender's real name (if known)
2458 rather than their mail address. Disabled by default, but \fBshowname\fR is set
2459 in the \fB/etc/mail/mailx.rc\fR system startup file for \fBmailx\fR.
2463 .ne 2
2465 \fB\fBshowto\fR\fR
2467 .RS 26n
2468 When displaying the header summary and the message is from you, print the
2469 recipient's name instead of the author's name.
2473 .ne 2
2475 \fB\fBsign=\fR\fIstring\fR\fR
2477 .RS 26n
2478 The variable inserted into the text of a message when the \fB~a\fR (autograph)
2479 command is given. No default (see also \fB~i\fR in \fBTilde Escapes\fR).
2485 .ne 2
2487 \fB\fBSign=\fR\fIstring\fR\fR
2489 .RS 26n
2490 The variable inserted into the text of a message when the \fB~A\fR command is
2491 given.  No default (see also \fB~i\fR in \fBTilde Escapes\fR).
2495 .ne 2
2497 \fB\fBtoplines=\fR\fInumber\fR\fR
2499 .RS 26n
2500 The number of lines of header to print with the \fBto\fRp command. Default is
2501 \fB5\fR.
2505 .ne 2
2507 \fB\fBverbose\fR\fR
2509 .RS 26n
2510 Invoke \fBsendmail\fR(1M) with the \fB-v\fR flag.
2514 .ne 2
2516 \fB\fBtranslate\fR\fR
2518 .RS 26n
2519 The name of a program to translate mail addresses. The program receives mail
2520 addresses as arguments. The program produces, on the standard output, lines
2521 containing the following data, in this order:
2522 .RS +4
2524 .ie t \(bu
2525 .el o
2526 the postmark for the sender (see the postmark variable)
2528 .RS +4
2530 .ie t \(bu
2531 .el o
2532 translated mail addresses, one per line, corresponding to the program's
2533 arguments.  Each translated address will replace the corresponding address in
2534 the mail message being sent.
2536 .RS +4
2538 .ie t \(bu
2539 .el o
2540 a line containing only "y" or "n".  if the line contains "y" the user will be
2541 asked to confirm that the message should be sent.
2543 The translate program will be invoked for each mail message to be sent. If the
2544 program exits with a non-zero exit status, or fails to produce enough output,
2545 the message is not sent.
2548 .SS "Large File Behavior"
2550 See \fBlargefile\fR(5) for the description of the behavior of \fBmailx\fR when
2551 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
2552 .SH ENVIRONMENT VARIABLES
2554 See \fBenviron\fR(5) for descriptions of the following environment variables
2555 that affect the execution of \fBmailx\fR: \fBHOME\fR, \fBLANG\fR,
2556 \fBLC_CTYPE\fR, \fBLC_TIME\fR, \fBLC_MESSAGES\fR, \fBNLSPATH\fR, and
2557 \fBTERM\fR.
2559 .ne 2
2561 \fB\fBDEAD\fR\fR
2563 .RS 14n
2564 The name of the file in which to save partial letters in case of untimely
2565 interrupt. Default is \fB$HOME/dead.letter\fR.
2569 .ne 2
2571 \fB\fBEDITOR\fR\fR
2573 .RS 14n
2574 The command to run when the \fBe\fRdit or \fB~e\fR command is used. Default is
2575 \fBed\fR(1).
2579 .ne 2
2581 \fB\fBLISTER\fR\fR
2583 .RS 14n
2584 The command (and options) to use when listing the contents of the \fBfolder\fR
2585 directory. The default is \fBls\fR(1).
2589 .ne 2
2591 \fB\fBMAIL\fR\fR
2593 .RS 14n
2594 The name of the initial mailbox file to read (in lieu of the standard system
2595 mailbox). The default is \fB/var/mail/\fIusername\fR .\fR
2599 .ne 2
2601 \fB\fBMAILRC\fR\fR
2603 .RS 14n
2604 The name of the startup file.  Default is \fB$HOME/.mailrc\fR.
2608 .ne 2
2610 \fB\fBMAILX_HEAD\fR\fR
2612 .RS 14n
2613 The specified string is included at the beginning of the body of each message
2614 that is sent.
2618 .ne 2
2620 \fB\fBMAILX_TAIL\fR\fR
2622 .RS 14n
2623 The specified string is included at the end of the body of each message that is
2624 sent.
2628 .ne 2
2630 \fB\fBMBOX\fR\fR
2632 .RS 14n
2633 The name of the file to save messages which have been read. The \fBex\fRit
2634 command overrides this function, as does saving the message explicitly in
2635 another file.  Default is \fB$HOME/mbox\fR.
2639 .ne 2
2641 \fB\fBPAGER\fR\fR
2643 .RS 14n
2644 The command to use as a filter for paginating output. This can also be used to
2645 specify the options to be used.  Default is \fBpg\fR(1), or if the
2646 \fBbsdcompat\fR variable is set, the default is \fBmore\fR(1). See \fBInternal
2647 Variables\fR.
2651 .ne 2
2653 \fB\fBSHELL\fR\fR
2655 .RS 14n
2656 The name of a preferred command interpreter. Default is \fBsh\fR(1).
2660 .ne 2
2662 \fB\fBVISUAL\fR\fR
2664 .RS 14n
2665 The name of a preferred screen editor.  Default is \fBvi\fR(1).
2668 .SH EXIT STATUS
2670 When the \fB-e\fR option is specified, the following exit values are returned:
2672 .ne 2
2674 \fB\fB0\fR\fR
2676 .RS 6n
2677 Mail was found.
2681 .ne 2
2683 \fB\fB>0\fR\fR
2685 .RS 6n
2686 Mail was not found or an error occurred.
2691 Otherwise, the following exit values are returned:
2693 .ne 2
2695 \fB\fB0\fR\fR
2697 .RS 6n
2698 Successful completion. Notice that this status implies that all messages were
2699 \fBsent\fR, but it gives no assurances that any of them were actually
2700 \fBdelivered\fR.
2704 .ne 2
2706 \fB\fB>0\fR\fR
2708 .RS 6n
2709 An error occurred
2712 .SH FILES
2713 .ne 2
2715 \fB\fB$HOME/.mailrc\fR\fR
2717 .sp .6
2718 .RS 4n
2719  personal startup file
2723 .ne 2
2725 \fB\fB$HOME/mbox\fR\fR
2727 .sp .6
2728 .RS 4n
2729 secondary storage file
2733 .ne 2
2735 \fB\fB$HOME/.Maillock\fR\fR
2737 .sp .6
2738 .RS 4n
2739 lock file to prevent multiple writers of system mailbox
2743 .ne 2
2745 \fB\fB/etc/mail/mailx.rc\fR\fR
2747 .sp .6
2748 .RS 4n
2749 optional system startup file for \fBmailx\fR only
2753 .ne 2
2755 \fB\fB/etc/mail/Mail.rc\fR\fR
2757 .sp .6
2758 .RS 4n
2759 BSD compatibility system-wide startup file for \fB/usr/ucb/mail\fR and
2760 \fB/usr/ucb/Mail\fR
2764 .ne 2
2766 \fB\fB/tmp/R[emqsx]*\fR\fR
2768 .sp .6
2769 .RS 4n
2770 temporary files
2774 .ne 2
2776 \fB\fB/usr/share/lib/mailx/mailx.help*\fR\fR
2778 .sp .6
2779 .RS 4n
2780 help message files
2784 .ne 2
2786 \fB\fB/var/mail/*\fR\fR
2788 .sp .6
2789 .RS 4n
2790 post office directory
2793 .SH ATTRIBUTES
2795 See \fBattributes\fR(5) for descriptions of the following attributes:
2800 box;
2801 c | c
2802 l | l .
2803 ATTRIBUTE TYPE  ATTRIBUTE VALUE
2805 Interface Stability     Standard
2808 .SH SEE ALSO
2810 \fBbiff\fR(1B), \fBecho\fR(1), \fBed\fR(1), \fBex\fR(1), \fBfmt\fR(1),
2811 \fBlp\fR(1), \fBls\fR(1), \fBmail\fR(1), \fBmail\fR(1B), \fBmailcompat\fR(1),
2812 \fBmore\fR(1), \fBpg\fR(1), \fBsh\fR(1), \fBuucp\fR(1C), \fBvacation\fR(1),
2813 \fBvi\fR(1), \fBnewaliases\fR(1M), \fBsendmail\fR(1M), \fBaliases\fR(4),
2814 \fBpasswd\fR(4), \fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5),
2815 \fBstandards\fR(5)
2816 .SH NOTES
2818 Where \fIshell-command\fR is shown as valid, arguments are not always allowed.
2819 Experimentation is recommended.
2822 Internal variables imported from the execution environment cannot be
2823 \fBuns\fRet.
2826 The full internet addressing is not fully supported by \fBmailx\fR. The new
2827 standards need some time to settle down.
2830 Replies do not always generate correct return addresses.  Try resending the
2831 errant reply with \fBonehop\fR set.
2834 \fBmailx\fR does not lock your record file. So, if you use a record file and
2835 send two or more messages simultaneously, lines from the messages may be
2836 interleaved in the record file.
2839 The format for the \fBalias\fR command is a space-separated list of recipients,
2840 while the format for an alias in either the \fB\&.forward\fR or
2841 \fB/etc/aliases\fR is a comma-separated list.
2844 To read mail on a workstation running Solaris 1.\fIx\fR when your mail server
2845 is running Solaris 2.\fIx\fR, first execute the \fBmailcompat\fR(1) program.