teach manpages about largefile's demise
[unleashed.git] / share / man / man1 / mailx.1
blob4733030444da715475b30fc7103eded2ec99402c
1 .\"
2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 .\" permission to reproduce portions of its copyrighted documentation.
4 .\" Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
6 .\"
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
9 .\" documentation.
10 .\"
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
13 .\"
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group.  In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document.  The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
24 .\"
25 .\" This notice shall appear on any product containing this material.
26 .\"
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
30 .\"
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
35 .\"
36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 .\" If applicable, add the following below this CDDL HEADER, with the
39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
41 .\"
42 .\"
43 .\" Copyright 1989 AT&T
44 .\" Portions Copyright (c) 1992, X/Open Company Limited  All Rights Reserved
45 .\" Copyright (c) 2001, Sun Microsystems, Inc.  All Rights Reserved
46 .\"
47 .TH MAILX 1 "Dec 18, 2014"
48 .SH NAME
49 mailx \- interactive message processing system
50 .SH SYNOPSIS
51 .LP
52 .nf
53 \fBmailx\fR [\fB-BdeHiInNURvV~\fR] [\fB-f\fR [\fIfile\fR | \fI+folder\fR]] [\fB-T\fR \fIfile\fR]
54      [\fB-u\fR \fIuser\fR]
55 .fi
57 .LP
58 .nf
59 \fBmailx\fR [\fB-BdFintUv~\fR] [\fB-b\fR \fIbcc\fR] [\fB-c\fR \fIcc\fR] [\fB-h\fR \fInumber\fR]
60      [\fB-r\fR \fIaddress\fR] [\fB-s\fR \fIsubject\fR] \fIrecipient\fR...
61 .fi
63 .SH DESCRIPTION
64 .LP
65 The mail utilities listed above provide a comfortable, flexible environment for
66 sending and receiving mail messages electronically.
67 .sp
68 .LP
69 When reading mail, the mail utilities provide commands to facilitate saving,
70 deleting, and responding to messages. When sending mail, the mail utilities
71 allow editing, reviewing and other modification of the message as it is
72 entered.
73 .sp
74 .LP
75 Incoming mail is stored in a standard file for each user, called the
76 \fBmailbox\fR for that user. When the mail utilities are called to read
77 messages, the \fBmailbox\fR is the default place to find them. As messages are
78 read, they are marked to be moved to a secondary file for storage, unless
79 specific action is taken, so that the messages need not be seen again.This
80 secondary file is called the \fBmbox\fR and is normally located in the user's
81 \fBHOME\fR directory (see \fBMBOX\fR in ENVIRONMENT VARIABLES for a description
82 of this file). Messages can be saved in other secondary files named by the
83 user. Messages remain in a secondary file until forcibly removed.
84 .sp
85 .LP
86 The user can access a secondary file by using the \fB-f\fR option. Messages in
87 the secondary file can then be read or otherwise processed using the same
88 \fBCommands\fR as in the primary \fBmailbox\fR. This gives rise within these
89 pages to the notion of a current \fBmailbox\fR.
90 .SH OPTIONS
91 .LP
92 On the command line options start with a dash (\(mi). Any other arguments are
93 taken to be destinations (recipients). If no recipients are specified,
94 \fBmailx\fR attempts to read messages from the \fBmailbox\fR.
95 .sp
96 .ne 2
97 .na
98 \fB\fB-B\fR\fR
99 .ad
100 .RS 17n
101 Do not buffer standard input or standard output.
105 .ne 2
107 \fB\fB-b\fR \fIbcc\fR\fR
109 .RS 17n
110 Set the blind carbon copy list to \fIbcc\fR. \fIbcc\fR should be enclosed in
111 quotes if it contains more than one name.
115 .ne 2
117 \fB\fB-c\fR \fIcc\fR\fR
119 .RS 17n
120 Set the carbon copy list to \fIcc\fR. \fIcc\fR should be enclosed in quotes if
121 it contains more than one name.
125 .ne 2
127 \fB\fB-d\fR\fR
129 .RS 17n
130 Turn on debugging output. (Neither particularly interesting nor recommended.)
134 .ne 2
136 \fB\fB-e\fR\fR
138 .RS 17n
139 Test for the presence of mail. \fBmailx\fR prints nothing and exits with a
140 successful return code if there is mail to read.
144 .ne 2
146 \fB\fB-F\fR\fR
148 .RS 17n
149 Record the message in a file named after the first recipient. Overrides the
150 \fBrecord\fR variable, if set (see \fBInternal Variables\fR).
154 .ne 2
156 \fB\fB\fR\fB-f\fR\fB [\fR\fIfile\fR\fB]\fR\fR
158 .RS 17n
159 Read messages from \fIfile\fR instead of \fBmailbox\fR. If no \fIfile\fR is
160 specified, the \fBmbox\fR is used.
164 .ne 2
166 \fB\fB\fR\fB-f\fR\fB [ \fR\fB+\fR\fIfolder\fR\fB]\fR\fR
168 .RS 17n
169 Use the file \fIfolder\fR in the folder directory (same as the \fBfold\fRer
170 command). The name of this directory is listed in the \fBfolder\fR variable.
174 .ne 2
176 \fB\fB-H\fR\fR
178 .RS 17n
179 Print header summary only.
183 .ne 2
185 \fB\fB-h\fR \fInumber\fR\fR
187 .RS 17n
188 The number of network "hops" made so far. This is provided for network software
189 to avoid infinite delivery loops. This option and its argument are passed to
190 the delivery program.
194 .ne 2
196 \fB\fB-I\fR\fR
198 .RS 17n
199 Include the newsgroup and article-id header lines when printing mail messages.
200 This option requires the \fB-f\fR option to be specified.
204 .ne 2
206 \fB\fB-i\fR\fR
208 .RS 17n
209 Ignore interrupts. See also \fBignore\fR in \fBInternal Variables\fR.
213 .ne 2
215 \fB\fB-N\fR\fR
217 .RS 17n
218 Do not print initial header summary.
222 .ne 2
224 \fB\fB-n\fR\fR
226 .RS 17n
227 Do not initialize from the system default \fBmailx.rc\fR or \fBMail.rc\fR file.
228 See USAGE.
232 .ne 2
234 \fB\fB-r\fR \fIaddress\fR\fR
236 .RS 17n
237 Use \fIaddress\fR as the return address when invoking the delivery program. All
238 tilde commands are disabled. This option and its argument is passed to the
239 delivery program.
243 .ne 2
245 \fB\fB-s\fR \fIsubject\fR\fR
247 .RS 17n
248 Set the Subject header field to \fIsubject\fR. \fIsubject\fR should be enclosed
249 in quotes if it contains embedded white space.
253 .ne 2
255 \fB\fB-T\fR \fIfile\fR\fR
257 .RS 17n
258 Message-id and article-id header lines are recorded in \fIfile\fR after the
259 message is read. This option also sets the \fB-I\fR option.
263 .ne 2
265 \fB\fB-t\fR\fR
267 .RS 17n
268 Scan the input for \fBTo:\fR, \fBCc:\fR, and \fBBcc:\fR fields. Any recipients
269 on the command line will be ignored.
273 .ne 2
275 \fB\fB-U\fR\fR
277 .RS 17n
278 Convert \fBUUCP-style\fR addresses to internet standards.  Overrides the
279 \fBconv\fR environment variable.
283 .ne 2
285 \fB\fB-u\fR \fIuser\fR\fR
287 .RS 17n
288 Read \fIuser\fR's \fBmailbox\fR. This is only effective if \fIuser\fR's
289 \fBmailbox\fR is not read protected.
293 .ne 2
295 \fB\fB-V\fR\fR
297 .RS 17n
298 Print the \fBmailx\fR version number and exit.
302 .ne 2
304 \fB\fB-v\fR\fR
306 .RS 17n
307 Pass the \fB-v\fR flag to \fBsendmail\fR(8).
311 .ne 2
313 \fB\fB-~\fR\fR
315 .RS 17n
316 Interpret tilde escapes in the input even if not reading from a tty.
319 .SH OPERANDS
321 The following operands are supported:
323 .ne 2
325 \fB\fIrecipient\fR\fR
327 .RS 13n
328 Addressee of message.
331 .SH USAGE
332 .SS "Starting Mail"
334 At startup time, \fBmailx\fR executes the system startup file
335 \fB/etc/mail/mailx.rc\fR. If invoked as \fBmail\fR or \fBMail\fR, the system
336 startup file \fB/etc/mail/Mail.rc\fR is used instead.
339 The system startup file sets  up initial display options and alias lists and
340 assigns values to some internal variables. These variables are flags and valued
341 parameters which are set and cleared using the \fBse\fRt and \fBuns\fRet
342 commands. See \fBInternal Variables\fR.
345 With the following exceptions, regular commands are legal inside startup files:
346 \fB!\fR, \fBC\fRopy, \fBe\fRdit, \fBfo\fRllowup, \fBF\fRollowup, \fBho\fRld,
347 \fBm\fRail, \fBpre\fRserve, \fBr\fReply, \fBR\fReply, \fBsh\fRell, and
348 \fBv\fRisual. An error in the startup file causes the remaining lines in the
349 file to be ignored.
352 After executing the system startup file,  the mail utilities execute the
353 optional personal startup file \fB$HOME/.mailrc\fR, wherein the user can
354 override the values of the internal variables as set by the system startup
355 file.
358 If the \fB-n\fR option is specified, however, the mail utilities do not execute
359 the system startup file.
362 Many system administrators include the commands
364 .in +2
366 set appenddeadletter
367 unset replyall
368 unset pipeignore
370 .in -2
375 in the system startup files (to be compatible with past Solaris behavior), but
376 this does not meet standards requirements for \fBmailx\fR. To get standard
377 behavior for \fBmailx\fR, users should use the \fB-n\fR option or include the
378 following commands in a personal startup file:
380 .in +2
382 unset appenddeadletter
383 set replyall
384 set pipeignore
386 .in -2
391 When reading mail, the mail utilities are in \fIcommand mode\fR. A header
392 summary of the first several messages is displayed, followed by a prompt
393 indicating the mail utilities can accept regular commands (see \fBCommands\fR
394 below). When sending mail, the mail utilities are in \fIinput mode\fR. If no
395 subject is specified on the command line, and the \fBasksub\fR variable is set,
396 a prompt for the subject is printed.
399 As the message is typed, the mail utilities read the message and store it in a
400 temporary file. Commands may be entered by beginning a line with the tilde (~)
401 escape character followed by a single command letter and optional arguments.
402 See \fBTilde Escapes\fR for a summary of these commands.
403 .SS "Reading Mail"
405 Each message is assigned a sequential number, and there is at any time the
406 notion of a current message, marked by a right angle bracket (>) in the header
407 summary. Many commands take an optional list of messages (\fImessage-list\fR)
408 to operate on.  In most cases, the current message is set to the
409 highest-numbered message in the list after the command is finished executing.
412 The default for \fImessage-list\fR is the current message. A \fImessage-list\fR
413 is a list of message identifiers separated by spaces, which may include:
415 .ne 2
417 \fB\fIn\fR\fR
419 .RS 11n
420 Message number \fIn\fR.
424 .ne 2
426 \fB\fB\&.\fR\fR
428 .RS 11n
429 The current message.
433 .ne 2
435 \fB\fB^\fR\fR
437 .RS 11n
438 The first undeleted message.
442 .ne 2
444 \fB\fB$\fR\fR
446 .RS 11n
447 The last message.
451 .ne 2
453 \fB\fB*\fR\fR
455 .RS 11n
456 All messages.
460 .ne 2
462 \fB\fB+\fR\fR
464 .RS 11n
465 The next undeleted message.
469 .ne 2
471 \fB\fB\(mi\fR\fR
473 .RS 11n
474 The previous undeleted message.
478 .ne 2
480 \fB\fIn\fR\fB\(mi\fR\fIm\fR\fR
482 .RS 11n
483 An inclusive range of message numbers.
487 .ne 2
489 \fB\fIuser\fR\fR
491 .RS 11n
492 All messages from \fIuser\fR.
496 .ne 2
498 \fB\fI/string\fR\fR
500 .RS 11n
501 All messages with \fIstring\fR in the Subject line (case ignored).
505 .ne 2
507 \fB\fB:\fR\fIc\fR\fR
509 .RS 11n
510 All messages of type \fIc\fR, where \fIc\fR is one of:
512 .ne 2
514 \fB\fBd\fR\fR
516 .RS 5n
517 deleted messages
521 .ne 2
523 \fB\fBn\fR\fR
525 .RS 5n
526 new messages
530 .ne 2
532 \fB\fBo\fR\fR
534 .RS 5n
535 old messages
539 .ne 2
541 \fB\fBr\fR\fR
543 .RS 5n
544 read messages
548 .ne 2
550 \fB\fBu\fR\fR
552 .RS 5n
553 unread messages
556 Notice that the context of the command determines whether this type of message
557 specification makes sense.
562 Other arguments are usually arbitrary strings whose usage depends on the
563 command involved. Filenames, where expected, are expanded using the normal
564 shell conventions (see \fBsh\fR(1)). Special characters are recognized by
565 certain commands and are documented with the commands below.
566 .SS "Sending Mail"
568 Recipients listed on the command line may be of three types: login names, shell
569 commands, or alias groups. Login names may be any network address, including
570 mixed network addressing. If mail is found to be undeliverable, an attempt is
571 made to return it to the sender's \fBmailbox\fR. If the \fBexpandaddr\fR option
572 is not set (the default), then the following rules do not apply and the name of
573 the recipient must be a local mailbox or network address. If the recipient name
574 begins with a pipe symbol ( | ), the rest of the name is taken to be a shell
575 command to pipe the message through. This provides an automatic interface with
576 any program that reads the standard input, such as \fBlp\fR(1) for recording
577 outgoing mail on paper.
580 Alias groups are set by the \fBa\fRlias command (see \fBCommands\fR below) or in
581 a system startup file (for example, \fB$HOME/.mailrc\fR). Aliases are lists of
582 recipients of any type.
583 .SS "Forwarding Mail"
585 To forward a specific message, include it in a message to the desired
586 recipients with the \fB~f\fR or \fB~m\fR tilde escapes. See \fBTilde\fR
587 \fBEscapes\fR below. To forward mail automatically, add a comma-separated list
588 of addresses for additional recipients to the \fB\&.forward\fR file in your
589 home directory. This is different from the format of the \fBalias\fR command,
590 which takes a space-separated list instead. \fBNote:\fR Forwarding addresses
591 must be valid, or the messages will "bounce." You cannot, for instance, reroute
592 your mail to a new host by forwarding it to your new address if it is not yet
593 listed in the \fBNIS\fR aliases domain.
594 .SS "Commands"
596 Regular commands are of the form
598 .in +2
600 [ \fIcommand\fR ] [ \fImessage-list\fR ] [ \fIarguments\fR ]
602 .in -2
607 In \fIinput mode\fR, commands are recognized by the escape character,
608 \fBtilde(~)\fR, and lines not treated as commands are taken as input for the
609 message. If no command is specified in \fIcommand mode\fR, \fBn\fRext is
610 assumed. The following is a complete list of \fBmailx\fR commands:
612 .ne 2
614 \fB\fB!\fR\fIshell-command\fR\fR
616 .sp .6
617 .RS 4n
618 Escape to the shell. See \fBSHELL\fR in ENVIRONMENT VARIABLES.
622 .ne 2
624 \fB\fB#\fR \fIcomment\fR\fR
626 .sp .6
627 .RS 4n
628 \fINULL\fR command (comment). Useful in \fBmailrc\fR files.
632 .ne 2
634 \fB\fB=\fR\fR
636 .sp .6
637 .RS 4n
638 Print the current message number.
642 .ne 2
644 \fB\fB?\fR\fR
646 .sp .6
647 .RS 4n
648 Prints a summary of commands.
652 .ne 2
654 \fB\fBa\fRlias \fIalias name\fR .\|.\|.\fR
658 \fB\fBg\fRroup \fIalias name\fR .\|.\|.\fR
660 .sp .6
661 .RS 4n
662 Declare an alias for the given names. The names are substituted when
663 \fBalias\fR is used as a recipient. Useful in the \fBmailrc\fR file. With no
664 arguments, the command displays the list of defined aliases.
668 .ne 2
670 \fB\fBalt\fRernates \fIname .\|.\|.\fR\fR
672 .sp .6
673 .RS 4n
674 Declare a list of alternate names for your login. When responding to a message,
675 these names are removed from the list of recipients for the response. With no
676 arguments, print the current list of alternate names. See also \fBallnet\fR in
677 \fBInternal Variables\fR.
681 .ne 2
683 \fB\fBcd\fR [\fIdirectory\fR]\fR
687 \fB\fBch\fRdir [\fIdirectory\fR]\fR
689 .sp .6
690 .RS 4n
691 Change directory. If \fIdirectory\fR is not specified, \fB$HOME\fR is used.
695 .ne 2
697 \fB\fBc\fRopy [\fIfile\fR]\fR
701 \fB\fBc\fRopy [\fImessage-list\fR] \fIfile\fR\fR
703 .sp .6
704 .RS 4n
705 Copy messages to the file without marking the messages as saved. Otherwise
706 equivalent to the \fBs\fRave command.
710 .ne 2
712 \fB\fBC\fRopy [\fImessage-list\fR]\fR
714 .sp .6
715 .RS 4n
716 Save the specified messages in a file whose name is derived from the author of
717 the message to be saved, without marking the messages as saved. Otherwise
718 equivalent to the \fBS\fRave command.
722 .ne 2
724 \fB\fBd\fRelete [\fImessage-list\fR]\fR
726 .sp .6
727 .RS 4n
728 Delete messages from the \fBmailbox\fR. If \fBautoprint\fR is set, the next
729 message after the last one deleted is printed (see \fBInternal Variables\fR).
733 .ne 2
735 \fB\fBdi\fRscard [\fIheader-field\fR.\|.\|.\|]\fR
739 \fB\fBig\fRnore [\fIheader-field\fR.\|.\|.\|]\fR
741 .sp .6
742 .RS 4n
743 Suppress printing of the specified header fields when displaying messages on
744 the screen. Examples of header fields to ignore are \fBStatus\fR and
745 \fBReceived\fR. The fields are included when the message is saved, unless the
746 \fBalwaysignore\fR variable is set. The \fBMo\fRre, \fBPa\fRge, \fBP\fRrint,
747 and \fBT\fRype commands override this command. If no header is specified, the
748 current list of header fields being ignored is printed. See also the
749 \fBundi\fRscard and \fBunig\fRnore commands.
753 .ne 2
755 \fB\fBdp\fR [\fImessage-list\fR]\fR
759 \fB\fBdt \fR[\fImessage-list\fR]\fR
761 .sp .6
762 .RS 4n
763 Delete the specified messages from the \fBmailbox\fR and print the next message
764 after the last one deleted. Roughly equivalent to a \fBd\fRelete command
765 followed by a \fBp\fRrint command.
769 .ne 2
771 \fB\fBec\fRho \fIstring \fR.\|.\|.\fR
773 .sp .6
774 .RS 4n
775 Echo the given strings (like \fBecho\fR(1)).
779 .ne 2
781 \fB\fBe\fRdit [\fImessage-list\fR]\fR
783 .sp .6
784 .RS 4n
785 Edit the given messages. Each message is placed in a temporary file and the
786 program named by the \fBEDITOR\fR variable is invoked to edit it (see
787 ENVIRONMENT VARIABLES). Default editor is \fBed\fR(1).
791 .ne 2
793 \fB\fBexpandaddr\fR\fR
795 .sp .6
796 .RS 4n
797 Causes recipient addresses to be expanded based on the discussion in the section
798 \fBSending Mail\fR. Note that enabling this option allows for addresses that can
799 cause arbitrary command execution by starting with the \fB|\fR character.
803 .ne 2
805 \fB\fBex\fRit\fR
809 \fB\fBx\fRit\fR
811 .sp .6
812 .RS 4n
813 Exit from \fBmailx\fR, without changing the \fBmailbox\fR. No messages are
814 saved in the \fBmbox\fR (see also \fBq\fRuit).
818 .ne 2
820 \fB\fBfie\fRld [\fImessage-list\fR] header-file\fR
822 .sp .6
823 .RS 4n
824 Display the value of the header field in the specified message.
828 .ne 2
830 \fB\fBfi\fRle [\fIfile\fR]\fR
834 \fB\fBfold\fRer [\fIfile\fR]\fR
836 .sp .6
837 .RS 4n
838 Quit from the current file of messages and read in the specified file. Several
839 special characters are recognized when used as file names:
841 .ne 2
843 \fB\fB%\fR\fR
845 .RS 9n
846 the current \fBmailbox\fR.
850 .ne 2
852 \fB\fB%\fR\fIuser\fR\fR
854 .RS 9n
855 the \fBmailbox\fR for \fIuser\fR.
859 .ne 2
861 \fB\fB#\fR\fR
863 .RS 9n
864 the previous mail file.
868 .ne 2
870 \fB\fB&\fR\fR
872 .RS 9n
873 the current \fBmbox\fR.
877 .ne 2
879 \fB\fB+\fR\fIfile\fR\fR
881 .RS 9n
882 The named file in the \fIfolder\fR directory (listed in the \fBfolder\fR
883 variable).
886 With no arguments, print the name of the current mail file, and the number of
887 messages and characters it contains.
891 .ne 2
893 \fB\fBfolders\fR\fR
895 .sp .6
896 .RS 4n
897 Print the names of the files in the directory set by the \fBfolder\fR variable
898 (see \fBInternal Variables\fR).
902 .ne 2
904 \fB\fBFo\fRllowup [\fImessage\fR]\fR
906 .sp .6
907 .RS 4n
908 Respond to a message, recording the response in a file whose name is derived
909 from the author of the message. Overrides the \fBrecord\fR variable, if set. If
910 the \fBreplyall\fR variable is set, the actions of \fBFo\fRllowup and
911 \fBfo\fRllowup are reversed. See also the \fBf\fRollowup, \fBS\fRave, and
912 \fBC\fRopy commands and \fBoutfolder\fR in \fBInternal Variables\fR, and the
913 \fBStarting Mail\fR section in USAGE above.
917 .ne 2
919 \fB\fBf\fRollowup [\fImessage-list\fR]\fR
921 .sp .6
922 .RS 4n
923 Respond to the first message in the \fImessage-list\fR, sending the message to
924 the author of each message in the \fImessage-list\fR. The subject line is taken
925 from the first message and the response is recorded in a file whose name is
926 derived from the author of the first message. If the \fBreplyall\fR variable is
927 set, the actions of \fBfo\fRllowup and \fBFo\fRllowup are reversed. See also
928 the \fBFo\fRllowup, \fBS\fRave, and \fBC\fRopy commands and \fBoutfolder\fR in
929 \fBInternal Variables\fR, and the \fBStarting Mail\fR section in USAGE above.
933 .ne 2
935 \fB\fBf\fRrom [\fImessage-list\fR]\fR
937 .sp .6
938 .RS 4n
939 Print the header summary for the specified messages. If no messages are
940 specified, print the header summary for the current message.
944 .ne 2
946 \fB\fBg\fRroup \fIalias name \fR.\|.\|.\fR
950 \fB\fBa\fRlias \fIalias name \fR.\|.\|.\fR
952 .sp .6
953 .RS 4n
954 Declare an alias for the given names. The names are substituted when
955 \fBalias\fR is used as a recipient. Useful in the \fBmailrc\fR file.
959 .ne 2
961 \fB\fBh\fReaders [\fImessage\fR]\fR
963 .sp .6
964 .RS 4n
965 Print the page of headers which includes the message specified. The
966 \fBscreen\fR variable sets the number of headers per page (see \fBInternal
967 Variables\fR). See also the \fBz\fR command.
971 .ne 2
973 \fB\fBhel\fRp\fR
975 .sp .6
976 .RS 4n
977 Print a summary of commands.
981 .ne 2
983 \fB\fBho\fRld [\fImessage-list\fR]\fR
987 \fB\fBpre\fRserve [\fImessage-list\fR]\fR
989 .sp .6
990 .RS 4n
991 Hold the specified messages in the \fBmailbox\fR.
995 .ne 2
997 \fB\fBi\fRf \fBs\fR | \fBr\fR | \fBt\fR\fR
1001 \fB\fImail-commands\fR\fR
1005 \fB\fR
1009 \fB\fBel\fRse\fR
1013 \fB\fImail-commands\fR\fR
1017 \fB\fR
1021 \fB\fBen\fRdif\fR
1023 .sp .6
1024 .RS 4n
1025 Conditional execution, where \fIs\fR executes following \fImail-commands\fR, up
1026 to an \fBel\fRse or \fBen\fRdif, if the program is in \fIsend\fR mode, \fIr\fR
1027 causes the \fImail-commands\fR to be executed only in \fIreceive\fR mode, and
1028 \fBt\fR causes the \fImail-commands\fR to be executed only if \fBmailx\fR is
1029 being run from a terminal. Useful in the \fBmailrc\fR file.
1033 .ne 2
1035 \fB\fBinc\fR\fR
1037 .sp .6
1038 .RS 4n
1039 Incorporate messages that arrive while you are reading the system mailbox. The
1040 new messages are added to the message list in the current \fBmail\fR session.
1041 This command does not commit changes made during the session, and prior
1042 messages are not renumbered.
1046 .ne 2
1048 \fB\fBig\fRnore [\fIheader-field \fR.\|.\|.\|]\fR
1052 \fB\fBdi\fRscard [\fIheader-field \fR.\|.\|.\|]\fR
1054 .sp .6
1055 .RS 4n
1056 Suppress printing of the specified header fields when displaying messages on
1057 the screen. Examples of header fields to ignore are \fBStatus\fR and \fBCc\fR.
1058 All fields are included when the message is saved. The \fBMo\fRre, \fBPa\fRge,
1059 \fBP\fRrint and \fBT\fRype commands override this command. If no header is
1060 specified, the current list of header fields being ignored is printed. See also
1061 the \fBundi\fRscard and \fBunig\fRnore commands.
1065 .ne 2
1067 \fB\fBl\fRist\fR
1069 .sp .6
1070 .RS 4n
1071 Print all commands available. No explanation is given.
1075 .ne 2
1077 \fB\fBlo\fRad\fR
1079 .sp .6
1080 .RS 4n
1081 [\fImessage\fR] \fBfile\fR The specified message is replaced by the message in
1082 the named file. \fBfile\fR should contain a single mail message including mail
1083 headers (as saved by the \fBs\fRave command).
1087 .ne 2
1089 \fB\fBm\fRail \fIrecipient \fR.\|.\|.\fR
1091 .sp .6
1092 .RS 4n
1093 Mail a message to the specified recipients.
1097 .ne 2
1099 \fB\fBM\fRail \fIrecipient\fR\fR
1101 .sp .6
1102 .RS 4n
1103 Mail a message to the specified recipients, and record it in a file whose name
1104 is derived from the author of the message. Overrides the \fBrecord\fR variable,
1105 if set. See also the \fBSave\fR and \fBCopy\fR commands and \fBoutfolder\fR in
1106 \fBInternal Variables\fR.
1110 .ne 2
1112 \fB\fBmb\fRox [\fImessage-list\fR]\fR
1114 .sp .6
1115 .RS 4n
1116 Arrange for the given messages to end up in the standard \fBmbox\fR save file
1117 when \fBmailx\fR terminates normally. See \fBMBOX\fR in ENVIRONMENT VARIABLES
1118 for a description of this file. See also the \fBex\fRit and \fBq\fRuit
1119 commands.
1123 .ne 2
1125 \fB\fBmo\fRre [\fImessage-list\fR]\fR
1129 \fB\fBpa\fRge [\fImessage-list\fR]\fR
1131 .sp .6
1132 .RS 4n
1133 Print the specified messages. If \fBcrt\fR is set, the messages longer than the
1134 number of lines specified by the \fBcrt\fR variable are paged through the
1135 command specified by the \fBPAGER\fR variable. The default command is
1136 \fBpg\fR(1) or if the \fBbsdcompat\fR variable is set, the default is
1137 \fBmore\fR(1). See ENVIRONMENT VARIABLES. Same as the \fBp\fRrint and
1138 \fBt\fRype commands.
1142 .ne 2
1144 \fB\fBMo\fRre [\fImessage-list\fR]\fR
1148 \fB\fBPa\fRge [\fImessage-list\fR]\fR
1150 .sp .6
1151 .RS 4n
1152 Print the specified messages on the screen, including all header fields.
1153 Overrides suppression of fields by the \fBig\fRnore command. Same as the
1154 \fBP\fRrint and \fBT\fRype commands.
1158 .ne 2
1160 \fB\fBne\fRw [\fImessage-list\fR]\fR
1164 \fB\fBN\fRew [\fImessage-list\fR]\fR
1168 \fB\fBunr\fRead [\fImessage-list\fR]\fR
1172 \fB\fBU\fRnread\fR
1174 .sp .6
1175 .RS 4n
1176 [\fImessage-list\fR] Take a message list and mark each message as \fInot\fR
1177 having been read.
1181 .ne 2
1183 \fB\fBn\fRext [\fImessage\fR]\fR
1185 .sp .6
1186 .RS 4n
1187 Go to the next message matching \fImessage\fR. If message is not supplied, this
1188 command finds the next message that was not deleted or saved. A
1189 \fImessage-list\fR may be specified, but in this case the first valid message
1190 in the list is the only one used. This is useful for jumping to the next
1191 message from a specific user, since the name would be taken as a command in the
1192 absence of a real command. See the discussion of \fImessage-list\fR above for a
1193 description of possible message specifications.
1197 .ne 2
1199 \fB\fBpi\fRpe [\fImessage-list\fR] [\fIshell-command\fR]\fR
1203 \fB\fB|\fR [\fImessage-list\fR] [\fIshell-command\fR]\fR
1205 .sp .6
1206 .RS 4n
1207 Pipe the message through the given \fIshell-command\fR. The message is treated
1208 as if it were read. If no arguments are given, the current message is piped
1209 through the command specified by the value of the \fBcmd\fR variable. If the
1210 \fBpage\fR variable is set, a form feed character is inserted after each
1211 message (see \fBInternal Variables\fR).
1215 .ne 2
1217 \fB\fBpre\fRserve [\fImessage-list\fR]\fR
1221 \fB\fBho\fRld [\fImessage-list\fR]\fR
1223 .sp .6
1224 .RS 4n
1225 Preserve the specified messages in the \fBmailbox\fR.
1229 .ne 2
1231 \fB\fBp\fRrint [\fImessage-list\fR]\fR
1235 \fB\fBt\fRype [\fImessage-list\fR]\fR
1237 .sp .6
1238 .RS 4n
1239 Print the specified messages. If \fBcrt\fR is set, the messages longer than the
1240 number of lines specified by the \fBcrt\fR variable are paged through the
1241 command specified by the \fBPAGER\fR variable. The default command is
1242 \fBpg\fR(1) or if the \fBbsdcompat\fR variable is set, the default is
1243 \fBmore\fR(1). See ENVIRONMENT VARIABLES. Same as the \fBmo\fRre and \fBpa\fRge
1244 commands.
1248 .ne 2
1250 \fB\fBP\fRrint [\fImessage-list\fR]\fR
1254 \fB\fBT\fRype [\fImessage-list\fR]\fR
1256 .sp .6
1257 .RS 4n
1258 Print the specified messages on the screen, including all header fields.
1259 Overrides suppression of fields by the \fBig\fRnore command.  Same as the
1260 \fBMo\fRre and \fBPa\fRge commands.
1264 .ne 2
1266 \fB\fBpu\fRt [\fIfile\fR]\fR
1270 \fB\fBpu\fRt [\fImessage-list\fR] \fIfile\fR\fR
1272 .sp .6
1273 .RS 4n
1274 Save the specified message in the given file. Use the same conventions as the
1275 \fBp\fRrint command for which header fields are ignored.
1279 .ne 2
1281 \fB\fBPu\fRt [\fIfile\fR]\fR
1285 \fB\fBPu\fRt [\fImessage-list\fR] \fIfile\fR\fR
1287 .sp .6
1288 .RS 4n
1289 Save the specified message in the given file. Overrides suppression of fields
1290 by the \fBig\fRnore command.
1294 .ne 2
1296 \fB\fBq\fRuit\fR
1298 .sp .6
1299 .RS 4n
1300 Exit from \fBmailx\fR, storing messages that were read in \fBmbox\fR and unread
1301 messages in the \fBmailbox\fR. Messages that have been explicitly saved in a
1302 file are deleted unless the \fBkeepsave\fR variable is set.
1306 .ne 2
1308 \fB\fBr\fReply [\fImessage-list\fR]\fR
1312 \fB\fBr\fRespond [\fImessage-list\fR]\fR
1316 \fB\fBreplys\fRender [\fImessage-list\fR]\fR
1318 .sp .6
1319 .RS 4n
1320 Send a response to the author of each message in the \fImessage-list\fR. The
1321 subject line is taken from the first message.  If \fBrecord\fR is set to a
1322 file, a copy of the reply is added to that file. If the \fBreplyall\fR variable
1323 is set, the actions of \fBR\fReply/\fBR\fRespond and \fBr\fReply/\fBr\fRespond
1324 are reversed. The \fBreplys\fRender command is not affected by the
1325 \fBreplyall\fR variable, but sends each reply only to the sender of each
1326 message. See the \fBStarting Mail\fR section in USAGE above.
1330 .ne 2
1332 \fB\fBR\fReply [\fImessage\fR]\fR
1336 \fB\fBR\fRespond [\fImessage\fR]\fR
1340 \fB\fBreplya\fRll [\fImessage\fR]\fR
1342 .sp .6
1343 .RS 4n
1344 Reply to the specified message, including all other recipients of that message.
1345 If the variable \fBrecord\fR is set to a file, a copy of the reply added to
1346 that file. If the \fBreplyall\fR variable is set, the actions of
1347 \fBR\fReply/\fBR\fRespond and \fBr\fReply/\fBr\fRespond are reversed. The
1348 \fBreplya\fRll command is not affected by the \fBreplyall\fR variable, but
1349 always sends the reply to all recipients of the message. See the \fBStarting
1350 Mail\fR section in USAGE above.
1354 .ne 2
1356 \fB\fBret\fRain\fR
1358 .sp .6
1359 .RS 4n
1360 Add the list of header fields named to the \fIretained list\fR. Only the header
1361 fields in the retain list are shown on your terminal when you print a message.
1362 All other header fields are suppressed.  The set of retained fields specified
1363 by the \fBret\fRain command overrides any list of ignored fields specified by
1364 the \fBig\fRnore command. The \fBT\fRype and \fBP\fRrint commands can be used
1365 to print a message in its entirety. If \fBret\fRain is executed with no
1366 arguments, it lists the current set of retained fields.
1370 .ne 2
1372 \fB\fBS\fRave [\fImessage-list\fR]\fR
1374 .sp .6
1375 .RS 4n
1376 Save the specified messages in a file whose name is derived from the author of
1377 the first message. The name of the file is taken to be the author's name with
1378 all network addressing stripped off. See also the \fBC\fRopy, \fBfo\fRllowup,
1379 and \fBF\fRollowup commands and \fBoutfolder\fR in \fBInternal Variables\fR.
1383 .ne 2
1385 \fB\fBs\fRave [\fIfile\fR]\fR
1389 \fB\fBs\fRave [\fImessage-list\fR] \fIfile\fR\fR
1391 .sp .6
1392 .RS 4n
1393 Save the specified messages in the given file. The file is created if it does
1394 not exist. The file defaults to \fBmbox\fR. The message is deleted from the
1395 \fBmailbox\fR when \fBmailx\fR terminates unless \fBkeepsave\fR is set (see
1396 also \fBInternal Variables\fR and the \fBex\fRit and \fBq\fRuit commands).
1400 .ne 2
1402 \fB\fBse\fRt\fR
1406 \fB\fBse\fRt \fIvariable\fR\fR
1410 \fB\fBse\fRt \fIvariable\fR\fB=\fR\fIstring\fR\fR
1414 \fB\fBse\fRt \fIvariable\fR\fB=\fR\fInumber\fR\fR
1416 .sp .6
1417 .RS 4n
1418 Define a \fIvariable\fR. To assign a \fIvalue\fR to \fIvariable\fR, separate
1419 the variable name from the value by an `\fB=\fR' (there must be no space before
1420 or after the `\fB=\fR'). A variable may be given a null, string, or numeric
1421 \fIvalue\fR. To embed SPACE characters within a \fIvalue\fR, enclose it in
1422 quotes.
1424 With no arguments, \fBse\fRt displays all defined variables and any values they
1425 might have. See \fBInternal Variables\fR for a description of all predefined
1426 \fBmail\fR variables.
1430 .ne 2
1432 \fB\fBsh\fRell\fR
1434 .sp .6
1435 .RS 4n
1436 Invoke an interactive shell. See also \fBSHELL\fR in ENVIRONMENT VARIABLES.
1440 .ne 2
1442 \fB\fBsi\fRze [\fImessage-list\fR]\fR
1444 .sp .6
1445 .RS 4n
1446 Print the size in characters of the specified messages.
1450 .ne 2
1452 \fB\fBso\fRurce \fIfile\fR\fR
1454 .sp .6
1455 .RS 4n
1456 Read commands from the given file and return to command mode.
1460 .ne 2
1462 \fB\fBto\fRp [\fImessage-list\fR]\fR
1464 .sp .6
1465 .RS 4n
1466 Print the top few lines of the specified messages. If the \fBtoplines\fR
1467 variable is set, it is taken as the number of lines to print (see \fBInternal
1468 Variables\fR). The default is 5.
1472 .ne 2
1474 \fB\fBtou\fRch [\fImessage-list\fR]\fR
1476 .sp .6
1477 .RS 4n
1478 Touch the specified messages. If any message in \fImessage-list\fR is not
1479 specifically saved in a file, it is placed in the \fBmbox\fR, or the file
1480 specified in the \fBMBOX\fR environment variable, upon normal termination. See
1481 \fBex\fRit and \fBq\fRuit.
1485 .ne 2
1487 \fB\fBT\fRype [\fImessage-list\fR]\fR
1491 \fB\fBP\fRrint [\fImessage-list\fR]\fR
1493 .sp .6
1494 .RS 4n
1495 Print the specified messages on the screen, including all header fields.
1496 Overrides suppression of fields by the \fBig\fRnore command.
1500 .ne 2
1502 \fB\fBt\fRype [\fImessage-list\fR]\fR
1506 \fB\fBp\fRrint [\fImessage-list\fR]\fR
1508 .sp .6
1509 .RS 4n
1510 Print the specified messages. If \fBcrt\fR is set, the messages longer than the
1511 number of lines specified by the \fBcrt\fR variable are paged through the
1512 command specified by the \fBPAGER\fR variable. The default command is
1513 \fBpg\fR(1). See ENVIRONMENT VARIABLES.
1517 .ne 2
1519 \fB\fBuna\fRlias [\fBalias\fR] .\|.\|.\fR
1523 \fB\fBung\fRroup [\fBalias\fR] .\|.\|.\fR
1525 .sp .6
1526 .RS 4n
1527 Remove the definitions of the specified aliases.
1531 .ne 2
1533 \fB\fBu\fRndelete [\fImessage-list\fR]\fR
1535 .sp .6
1536 .RS 4n
1537 Restore the specified deleted messages. Will only restore messages deleted in
1538 the current mail session. If \fBautoprint\fR is set, the last message of those
1539 restored is printed (see \fBInternal Variables\fR).
1543 .ne 2
1545 \fB\fBundi\fRscard [\fIheader-field\fR\|.\|.\|.]\fR
1549 \fB\fBunig\fRnore [\fIheader-field\fR\|.\|.\|.]\fR
1551 .sp .6
1552 .RS 4n
1553 Remove the specified header fields from the list being ignored. If no header
1554 fields are specified, all header fields are removed from the list being
1555 ignored.
1559 .ne 2
1561 \fB\fBunret\fRain [\fIheader-field\fR\|.\|.\|.]\fR
1563 .sp .6
1564 .RS 4n
1565 Remove the specified header fields from the list being retained. If no header
1566 fields are specified, all header fields are removed from the list being
1567 retained.
1571 .ne 2
1573 \fB\fBunr\fRead [\fImessage-list\fR]\fR
1577 \fB\fBU\fRnread [\fImessage-list\fR] Same as the \fBne\fRw command.\fR
1579 .sp .6
1580 .RS 4n
1585 .ne 2
1587 \fB\fBuns\fRet \fIvariable\fR\|.\|.\|.\fR
1589 .sp .6
1590 .RS 4n
1591 Erase the specified variables. If the variable was imported from the
1592 environment (that is, an environment variable or exported shell variable), it
1593 cannot be unset from within \fBmailx\fR.
1597 .ne 2
1599 \fB\fBve\fRrsion\fR
1601 .sp .6
1602 .RS 4n
1603 Print the current version and release date of the \fBmailx\fR utility.
1607 .ne 2
1609 \fB\fBv\fRisual [\fImessage-list\fR]\fR
1611 .sp .6
1612 .RS 4n
1613 Edit the given messages with a screen editor. Each messages is placed in a
1614 temporary file and the program named by the \fBVISUAL\fR variable is invoked to
1615 edit it (see ENVIRONMENT VARIABLES). Notice that the default visual editor is
1616 \fBvi\fR.
1620 .ne 2
1622 \fB\fBw\fRrite [\fImessage-list\fR] \fBfile\fR\fR
1624 .sp .6
1625 .RS 4n
1626 Write the given messages on the specified file, minus the header and trailing
1627 blank line. Otherwise equivalent to the \fBs\fRave command.
1631 .ne 2
1633 \fB\fBx\fRit\fR
1637 \fB\fBex\fRit\fR
1639 .sp .6
1640 .RS 4n
1641 Exit from \fBmailx\fR, without changing the \fBmailbox\fR. No messages are
1642 saved in the \fBmbox\fR (see also \fBq\fRuit).
1646 .ne 2
1648 \fB\fBz\fR[\fB+\fR\||\|\fB\(mi\fR]\fR
1650 .sp .6
1651 .RS 4n
1652 Scroll the header display forward or backward one screen\(mifull. The number of
1653 headers displayed is set by the \fBscreen\fR variable (see \fBInternal
1654 Variables\fR).
1657 .SS "Tilde Escapes"
1659 The following tilde escape commands can be used when composing mail to send.
1660 These may be entered only from \fIinput mode\fR, by beginning a line with the
1661 tilde escape character (~). See \fBescape\fR in \fBInternal Variables\fR for
1662 changing this special character. The escape character can be entered as text by
1663 typing it twice.
1665 .ne 2
1667 \fB\fB~\|!\fR\fIshell-command\fR\fR
1669 .RS 23n
1670 Escape to the shell. If present, run \fIshell-command\fR.
1674 .ne 2
1676 \fB\fB~.\fR\fR
1678 .RS 23n
1679 Simulate end of file (terminate message input).
1683 .ne 2
1685 \fB\fB~\|:\fR\fImail-command\fR\fR
1689 \fB\fB~_\|\fR\fImail-command\fR\fR
1691 .RS 23n
1692 Perform the command-level request. Valid only when sending a message while
1693 reading mail.
1697 .ne 2
1699 \fB\fB~?\fR\fR
1701 .RS 23n
1702 Print a summary of tilde escapes.
1706 .ne 2
1708 \fB\fB~A\fR\fR
1710 .RS 23n
1711 Insert the autograph string \fBSign\fR into the message (see \fBInternal
1712 Variables\fR).
1716 .ne 2
1718 \fB\fB~a\fR\fR
1720 .RS 23n
1721 Insert the autograph string \fBsign\fR into the message (see \fBInternal
1722 Variables\fR).
1726 .ne 2
1728 \fB\fB~b\fR\fI name \|.\|.\|.\fR\fR
1730 .RS 23n
1731 Add the \fIname\fRs to the blind carbon copy (\fBBcc\fR) list. This is like the
1732 carbon copy (\fBCc\fR) list, except that the names in the \fBBcc\fR list are
1733 not shown in the header of the mail message.
1737 .ne 2
1739 \fB\fB~c\fR\fI name \|.\|.\|.\fR\fR
1741 .RS 23n
1742 Add the \fIname\fRs to the carbon copy (\fBCc\fR) list.
1746 .ne 2
1748 \fB\fB~d\fR\fR
1750 .RS 23n
1751 Read in the \fBdead-letter\fR file. See \fBDEAD\fR in ENVIRONMENT VARIABLES for
1752 a description of this file.
1756 .ne 2
1758 \fB\fB~e\fR\fR
1760 .RS 23n
1761 Invoke the editor on the partial message. See also \fBEDITOR\fR in ENVIRONMENT
1762 VARIABLES.
1766 .ne 2
1768 \fB\fB~f\fR [\fImessage-list\fR]\fR
1770 .RS 23n
1771 Forward the specified message, or the current message being read. Valid only
1772 when sending a message while reading mail. The messages are inserted into the
1773 message without alteration (as opposed to the \fB~m\fR escape).
1777 .ne 2
1779 \fB\fB~F\fR [\fImessage-list\fR]\fR
1781 .RS 23n
1782 Forward the specified message, or the current message being read, including all
1783 header fields. Overrides the suppression of fields by the \fBig\fRnore command.
1787 .ne 2
1789 \fB\fB~h\fR\fR
1791 .RS 23n
1792 Prompt for \fBSubject\fR line and \fBTo\fR, \fBCc\fR, and \fBBcc\fR lists. If
1793 the field is displayed with an initial value, it may be edited as if you had
1794 just typed it.
1798 .ne 2
1800 \fB\fB~i\fR \fIvariable\fR\fR
1802 .RS 23n
1803 Insert the value of the named variable into the text of the message. For
1804 example, \fB~A\fR is equivalent to `\fB~i Sign\fR.' Environment variables set
1805 and exported in the shell are also accessible by \fB~i\fR.
1809 .ne 2
1811 \fB\fB~m\fR [\fImessage-list\fR]\fR
1813 .RS 23n
1814 Insert the listed messages, or the current message being read into the letter.
1815 Valid only when sending a message while reading mail. The text of the message
1816 is shifted to the right, and the string contained in the \fBindentprefix\fR
1817 variable is inserted as the leftmost characters of each line. If
1818 \fBindentprefix\fR is not set, a TAB character is inserted into each line.
1822 .ne 2
1824 \fB\fB~M\fR [\fImessage-list\fR]\fR
1826 .RS 23n
1827 Insert the listed messages, or the current message being read, including the
1828 header fields, into the letter. Valid only when sending a message while reading
1829 mail. The text of the message is shifted to the right, and the string contained
1830 in the \fBindentprefix\fR variable is inserted as the leftmost characters of
1831 each line. If \fBindentprefix\fR is not set, a TAB character is inserted into
1832 each line. Overrides the suppression of fields by the \fBig\fRnore command.
1836 .ne 2
1838 \fB\fB~p\fR\fR
1840 .RS 23n
1841 Print the message being entered.
1845 .ne 2
1847 \fB\fB~q\fR\fR
1849 .RS 23n
1850 Quit from input mode by simulating an interrupt. If the body of the message is
1851 not null, the partial message is saved in \fBdead-letter\fR. See \fBDEAD\fR in
1852 ENVIRONMENT VARIABLES for a description of this file.
1856 .ne 2
1858 \fB\fB~R\fR\fR
1860 .RS 23n
1861 Mark message for return receipt.
1865 .ne 2
1867 \fB\fB~r\fR \fIfile\fR\fR
1871 \fB\fB~<\fR \fIfile\fR\fR
1875 \fB\fB~< ! \fR\fIshell-command\fR\fR
1877 .RS 23n
1878 Read in the specified file. If the argument begins with an exclamation point
1879 (!), the rest of the string is taken as an arbitrary shell command and is
1880 executed, with the standard output inserted into the message.
1884 .ne 2
1886 \fB\fB~s\fR \fIstring \|.\|.\|.\fR\fR
1888 .RS 23n
1889 Set the subject line to \fIstring\fR.
1893 .ne 2
1895 \fB\fB~t\fR \fIname \|.\|.\|.\fR\fR
1897 .RS 23n
1898 Add the given \fIname\fRs to the To list.
1902 .ne 2
1904 \fB\fB~v\fR\fR
1906 .RS 23n
1907 Invoke a preferred screen editor on the partial message. The default visual
1908 editor is \fBvi\fR(1). See also \fBVISUAL\fR in ENVIRONMENT VARIABLES.
1912 .ne 2
1914 \fB\fB~w\fR \fIfile\fR\fR
1916 .RS 23n
1917 Write the message into the given file, without the header.
1921 .ne 2
1923 \fB\fB~x\fR\fR
1925 .RS 23n
1926 Exit as with \fB~q\fR except the message is not saved in \fBdead-letter\fR.
1930 .ne 2
1932 \fB\fB~|\fR \fIshell-command\fR\fR
1934 .RS 23n
1935 Pipe the body of the message through the given \fIshell-command\fR. If the
1936 \fIshell-command\fR returns a successful exit status, the output of the command
1937 replaces the message.
1940 .SS "Internal Variables"
1942 The following variables are internal variables. They may be imported from the
1943 execution environment or set using the \fBse\fRt command at any time. The
1944 \fBuns\fRet command may be used to erase variables.
1946 .ne 2
1948 \fB\fBallnet\fR\fR
1950 .RS 26n
1951 All network names whose last component (login name) match are treated as
1952 identical. This causes the \fImessage-list\fR message specifications to behave
1953 similarly. Disabled by default. See also the \fBalt\fRernates command and the
1954 \fBmetoo\fR and \fBfuzzymatch\fR variables.
1958 .ne 2
1960 \fB\fBalwaysignore\fR\fR
1962 .RS 26n
1963 Ignore header fields with \fBig\fRnore everywhere, not just during \fBp\fRrint
1964 or \fBt\fRype. Affects the \fBs\fRave, \fBS\fRave, \fBc\fRopy, \fBC\fRopy,
1965 \fBto\fRp, \fBpi\fRpe, and \fBw\fRrite commands, and the \fB~m\fR and \fB~f\fR
1966 tilde escapes. Enabled by default.
1970 .ne 2
1972 \fB\fBappend\fR\fR
1974 .RS 26n
1975 Upon termination, append messages to the end of the \fBmbox\fR file instead of
1976 prepending them. Although disabled by default, \fBappend\fR is set in the
1977 system startup file (which can be suppressed with the \fB-n\fR command line
1978 option).
1982 .ne 2
1984 \fB\fBappenddeadletter\fR\fR
1986 .RS 26n
1987 Append to the deadletter file rather than overwrite it. Although disabled by
1988 default, \fBappenddeadletter\fR is frequently set in the system startup file.
1989 See \fBStarting Mail\fR in USAGE above.
1993 .ne 2
1995 \fB\fBaskbcc\fR\fR
1997 .RS 26n
1998 Prompt for the \fBBcc\fR list after the \fBSubject\fR is entered if it is not
1999 specified on the command line with the \fB-b\fR option. Disabled by default.
2003 .ne 2
2005 \fB\fBaskcc\fR\fR
2007 .RS 26n
2008 Prompt for the \fBCc\fR list after the \fBSubject\fR is entered if it is not
2009 specified on the command line with the \fB-c\fR option. Disabled by default.
2013 .ne 2
2015 \fB\fBasksub\fR\fR
2017 .RS 26n
2018 Prompt for subject if it is not specified on the command line with the \fB-s\fR
2019 option. Enabled by default.
2023 .ne 2
2025 \fB\fBautoinc\fR\fR
2027 .RS 26n
2028 Automatically incorporate new messages into the current session as they arrive.
2029 This has an affect similar to issuing the \fBinc\fR command every time the
2030 command prompt is displayed. Disabled by default, but \fBautoinc\fR is set in
2031 the default system startup file for \fBmailx\fR.
2035 .ne 2
2037 \fB\fBautoprint\fR\fR
2039 .RS 26n
2040 Enable automatic printing of messages after \fBd\fRelete and \fBu\fRndelete
2041 commands. Disabled by default.
2045 .ne 2
2047 \fB\fBbang\fR\fR
2049 .RS 26n
2050 Enable the special-casing of exclamation points (!) in shell escape command
2051 lines as in \fBvi\fR(1). Disabled by default.
2055 .ne 2
2057 \fB\fBbsdcompat\fR\fR
2059 .RS 26n
2060 Set automatically if \fBmailx\fR is invoked as \fBmail\fR or \fBMail\fR. Causes
2061 \fBmailx\fR to use \fB/etc/mail/Mail.rc\fR as the system startup file. Changes
2062 the default pager to \fBmore\fR(1).
2066 .ne 2
2068 \fB\fBcmd=\fR\fIshell-command\fR\fR
2070 .RS 26n
2071 Set the default command for the \fBpi\fRpe command.  No default value.
2075 .ne 2
2077 \fB\fBconv=\fR\fIconversion\fR\fR
2079 .RS 26n
2080 Convert uucp addresses to the specified address style, which can be
2081 either:
2083 .ne 2
2085 \fB\fBinternet\fR\fR
2087 .RS 12n
2088 This requires a mail delivery program conforming to the \fBRFC822\fR standard
2089 for electronic mail addressing.
2093 .ne 2
2095 \fB\fBoptimize\fR\fR
2097 .RS 12n
2098 Remove loops in uucp address paths (typically generated by the
2099 \fBr\fReply command).  No rerouting is performed; \fBmail\fR has no knowledge
2100 of \fBUUCP\fR routes or connections.
2103 Conversion is disabled by default. See also \fBsendmail\fR(8) and the \fB-U\fR
2104 command-line option.
2108 .ne 2
2110 \fB\fBcrt\fR[\fB=\fR\fInumber\fR]\fR
2112 .RS 26n
2113 Pipe messages having more than \fInumber\fR lines through the command specified
2114 by the value of the \fBPAGER\fR variable ( \fBpg\fR(1) or \fBmore\fR(1) by
2115 default). If \fInumber\fR is not specified, the current window size is used.
2116 Disabled by default.
2120 .ne 2
2122 \fB\fBdebug\fR\fR
2124 .RS 26n
2125 Enable verbose diagnostics for debugging. Messages are not delivered. Disabled
2126 by default.
2130 .ne 2
2132 \fB\fBdot\fR\fR
2134 .RS 26n
2135 Take a period on a line by itself, or \fBEOF\fR during input from a terminal as
2136 end-of-file. Disabled by default, but \fBdot\fR is set in the system startup
2137 file (which can be suppressed with the \fB-n\fR command line option).
2141 .ne 2
2143 \fB\fBfcc\fR\fR
2145 .RS 26n
2146 By default, \fBmailx\fR will treat any address containing a slash ("/")
2147 character as a local "send to file" address. By unsetting this option, this
2148 behavior is disabled. Enabled by default.
2152 .ne 2
2154 \fB\fBflipr\fR\fR
2156 .RS 26n
2157 Reverse the effect of the \fBfo\fRllowup/\fBFo\fRllowup and
2158 \fBr\fReply/\fBR\fReply command pairs.  If both \fBflipr\fR and \fBreplyall\fR
2159 are set, the effect is as if neither was set.
2163 .ne 2
2165 \fB\fBfrom\fR\fR
2167 .RS 26n
2168 Extract the author listed in the header summary from the \fBFrom:\fR header
2169 instead of the UNIX \fBFrom\fR line. Enabled by default.
2173 .ne 2
2175 \fB\fBfuzzymatch\fR\fR
2177 .RS 26n
2178 The \fBfrom\fR command searches for messages from the indicated sender. By
2179 default, the full sender address must be specified. By setting this option,
2180 only a sub-string of the sender address need be specified. Disabled by default.
2184 .ne 2
2186 \fB\fBescape=\fR\fIc\fR\fR
2188 .RS 26n
2189 Substitute \fIc\fR for the ~ escape character. Takes effect with next message
2190 sent.
2194 .ne 2
2196 \fB\fBfolder=\fR\fIdirectory\fR\fR
2198 .RS 26n
2199 The directory for saving standard mail files. User-specified file names
2200 beginning with a plus (+) are expanded by preceding the file name with this
2201 directory name to obtain the real file name. If \fIdirectory\fR does not start
2202 with a slash (/), \fB$HOME\fR is prepended to it.  There is no default for the
2203 \fBfolder\fR variable. See also \fBoutfolder\fR below.
2207 .ne 2
2209 \fB\fBheader\fR\fR
2211 .RS 26n
2212 Enable printing of the header summary when entering \fBmailx\fR. Enabled by
2213 default.
2217 .ne 2
2219 \fB\fBhold\fR\fR
2221 .RS 26n
2222 Preserve all messages that are read in the \fBmailbox\fR instead of putting
2223 them in the standard \fBmbox\fR save file. Disabled by default.
2227 .ne 2
2229 \fB\fBignore\fR\fR
2231 .RS 26n
2232 Ignore interrupts while entering messages. Handy for noisy dial-up lines.
2233 Disabled by default.
2237 .ne 2
2239 \fB\fBignoreeof\fR\fR
2241 .RS 26n
2242 Ignore end-of-file during message input. Input must be terminated by a period
2243 (.) on a line by itself or by the \fB~.\fR command. See also \fBdot\fR above.
2244 Disabled by default.
2248 .ne 2
2250 \fB\fBindentprefix=\fR\fIstring\fR\fR
2252 .RS 26n
2253 When \fBindentprefix\fR is set, \fIstring\fR is used to mark indented lines
2254 from messages included with \fB~m\fR. The default is a TAB character.
2258 .ne 2
2260 \fB\fBkeep\fR\fR
2262 .RS 26n
2263 When the \fBmailbox\fR is empty, truncate it to zero length instead of removing
2264 it. Disabled by default.
2268 .ne 2
2270 \fB\fBiprompt=\fR\fIstring\fR\fR
2272 .RS 26n
2273 The specified prompt string is displayed before each line on input is requested
2274 when sending a message.
2278 .ne 2
2280 \fB\fBkeepsave\fR\fR
2282 .RS 26n
2283 Keep messages that have been saved in other files in the \fBmailbox\fR instead
2284 of deleting them. Disabled by default.
2288 .ne 2
2290 \fB\fBmakeremote\fR\fR
2292 .RS 26n
2293 When replying to all recipients of a message, if an address does not include a
2294 machine name, it is assumed to be relative to the sender of the message.
2295 Normally not needed when dealing with hosts that support RFC822.
2299 .ne 2
2301 \fB\fBmetoo\fR\fR
2303 .RS 26n
2304 If your login appears as a recipient, do not delete it from the list. Disabled
2305 by default.
2309 .ne 2
2311 \fB\fBmustbang\fR\fR
2313 .RS 26n
2314 Force all mail addresses to be in bang format.
2318 .ne 2
2320 \fB\fBonehop\fR\fR
2322 .RS 26n
2323 When responding to a message that was originally sent to several recipients,
2324 the other recipient addresses are normally forced to be relative to the
2325 originating author's machine for the response. This flag disables alteration of
2326 the recipients' addresses, improving efficiency in a network where all machines
2327 can send directly to all other machines (that is, one hop away). Disabled by
2328 default.
2332 .ne 2
2334 \fB\fBoutfolder\fR\fR
2336 .RS 26n
2337 Locate the files used to record outgoing messages in the directory specified by
2338 the \fBfolder\fR variable unless the path name is absolute. Disabled by
2339 default. See \fBfolder\fR above and the \fBS\fRave, \fBC\fRopy, \fBfo\fRllowup,
2340 and \fBF\fRollowup commands.
2344 .ne 2
2346 \fB\fBpage\fR\fR
2348 .RS 26n
2349 Used with the \fBpi\fRpe command to insert a form feed after each message sent
2350 through the pipe. Disabled by default.
2354 .ne 2
2356 \fB\fBpipeignore\fR\fR
2358 .RS 26n
2359 Omit ignored header when outputting to the \fBpipe\fR command. Although
2360 disabled by default,  \fBpipeignore\fR is frequently set in the system startup
2361 file. See \fBStarting Mail\fR in USAGE above.
2365 .ne 2
2367 \fB\fBpostmark\fR\fR
2369 .RS 26n
2370 Your "real name" to be included in the From line of messages you send.  By
2371 default this is derived from the comment field in your \fBpasswd\fR(4) file
2372 entry.
2376 .ne 2
2378 \fB\fBprompt=\fR\fIstring\fR\fR
2380 .RS 26n
2381 Set the \fIcommand mode\fR prompt to \fIstring\fR. Default is "\fB? \fR",
2382 unless the \fBbsdcompat\fR variable is set, then the default is "\fB&\fR".
2386 .ne 2
2388 \fB\fBquiet\fR\fR
2390 .RS 26n
2391 Refrain from printing the opening message and version when entering
2392 \fBmailx\fR. Disabled by default.
2396 .ne 2
2398 \fB\fBrecord=\fR\fIfile\fR\fR
2400 .RS 26n
2401 Record all outgoing mail in \fIfile\fR. Disabled by default. See also
2402 \fBoutfolder\fR above.
2406 .ne 2
2408 \fB\fBreplyall\fR\fR
2410 .RS 26n
2411 Reverse the effect of the \fBr\fReply and \fBR\fReply and \fBfo\fRllowup and
2412 \fBFo\fRllowup commands. Although set by default,  \fBreplayall\fR is
2413 frequently unset in the system startup file. See \fBflipr\fR and \fBStarting
2414 Mail\fR in USAGE above.
2418 .ne 2
2420 \fB\fBreturnaddr=\fR\fIstring\fR\fR
2422 .RS 26n
2423 The default sender address is that of the current user. This variable can be
2424 used to set the sender address to any arbitrary value. Set with caution.
2428 .ne 2
2430 \fB\fBsave\fR\fR
2432 .RS 26n
2433 Enable saving of messages in \fBdead-letter\fR on interrupt or delivery error.
2434 See \fBDEAD\fR for a description of this file. Enabled by default.
2438 .ne 2
2440 \fB\fBscreen=\fR\fInumber\fR\fR
2442 .RS 26n
2443 Sets the number of lines in a screen-full of headers for the \fBh\fReaders
2444 command. \fInumber\fR must be a positive number.
2446 The default is set according to baud rate or window size. With a baud rate less
2447 than \fB1200\fR, \fInumber\fR defaults to \fB5\fR, if baud rate is exactly
2448 \fB1200\fR, it defaults to \fB10\fR. If you are in a window, \fInumber\fR
2449 defaults to the default window size minus 4. Otherwise, the default is
2450 \fB20\fR.
2454 .ne 2
2456 \fB\fBsendmail=\fR\fIshell-command\fR\fR
2458 .RS 26n
2459 Alternate command for delivering messages. \fBNote:\fR In addition to the
2460 expected list of recipients, \fBmail\fR also passes the \fB-i\fR and \fB-m\fR,
2461 flags to the command. Since these flags are not appropriate to other commands,
2462 you may have to use a shell script that strips them from the arguments list
2463 before invoking the desired command. Default is \fB/usr/bin/rmail\fR.
2467 .ne 2
2469 \fB\fBsendwait\fR\fR
2471 .RS 26n
2472 Wait for background mailer to finish before returning. Disabled by default.
2476 .ne 2
2478 \fB\fBshowname\fR\fR
2480 .RS 26n
2481 Causes the message header display to show the sender's real name (if known)
2482 rather than their mail address. Disabled by default, but \fBshowname\fR is set
2483 in the \fB/etc/mail/mailx.rc\fR system startup file for \fBmailx\fR.
2487 .ne 2
2489 \fB\fBshowto\fR\fR
2491 .RS 26n
2492 When displaying the header summary and the message is from you, print the
2493 recipient's name instead of the author's name.
2497 .ne 2
2499 \fB\fBsign=\fR\fIstring\fR\fR
2501 .RS 26n
2502 The variable inserted into the text of a message when the \fB~a\fR (autograph)
2503 command is given. No default (see also \fB~i\fR in \fBTilde Escapes\fR).
2509 .ne 2
2511 \fB\fBSign=\fR\fIstring\fR\fR
2513 .RS 26n
2514 The variable inserted into the text of a message when the \fB~A\fR command is
2515 given.  No default (see also \fB~i\fR in \fBTilde Escapes\fR).
2519 .ne 2
2521 \fB\fBtoplines=\fR\fInumber\fR\fR
2523 .RS 26n
2524 The number of lines of header to print with the \fBto\fRp command. Default is
2525 \fB5\fR.
2529 .ne 2
2531 \fB\fBverbose\fR\fR
2533 .RS 26n
2534 Invoke \fBsendmail\fR(8) with the \fB-v\fR flag.
2538 .ne 2
2540 \fB\fBtranslate\fR\fR
2542 .RS 26n
2543 The name of a program to translate mail addresses. The program receives mail
2544 addresses as arguments. The program produces, on the standard output, lines
2545 containing the following data, in this order:
2546 .RS +4
2548 .ie t \(bu
2549 .el o
2550 the postmark for the sender (see the postmark variable)
2552 .RS +4
2554 .ie t \(bu
2555 .el o
2556 translated mail addresses, one per line, corresponding to the program's
2557 arguments.  Each translated address will replace the corresponding address in
2558 the mail message being sent.
2560 .RS +4
2562 .ie t \(bu
2563 .el o
2564 a line containing only "y" or "n".  if the line contains "y" the user will be
2565 asked to confirm that the message should be sent.
2567 The translate program will be invoked for each mail message to be sent. If the
2568 program exits with a non-zero exit status, or fails to produce enough output,
2569 the message is not sent.
2572 .SH ENVIRONMENT VARIABLES
2574 See \fBenviron\fR(5) for descriptions of the following environment variables
2575 that affect the execution of \fBmailx\fR: \fBHOME\fR, \fBLANG\fR,
2576 \fBLC_CTYPE\fR, \fBLC_TIME\fR, \fBLC_MESSAGES\fR, \fBNLSPATH\fR, and
2577 \fBTERM\fR.
2579 .ne 2
2581 \fB\fBDEAD\fR\fR
2583 .RS 14n
2584 The name of the file in which to save partial letters in case of untimely
2585 interrupt. Default is \fB$HOME/dead.letter\fR.
2589 .ne 2
2591 \fB\fBEDITOR\fR\fR
2593 .RS 14n
2594 The command to run when the \fBe\fRdit or \fB~e\fR command is used. Default is
2595 \fBed\fR(1).
2599 .ne 2
2601 \fB\fBLISTER\fR\fR
2603 .RS 14n
2604 The command (and options) to use when listing the contents of the \fBfolder\fR
2605 directory. The default is \fBls\fR(1).
2609 .ne 2
2611 \fB\fBMAIL\fR\fR
2613 .RS 14n
2614 The name of the initial mailbox file to read (in lieu of the standard system
2615 mailbox). The default is \fB/var/mail/\fIusername\fR .\fR
2619 .ne 2
2621 \fB\fBMAILRC\fR\fR
2623 .RS 14n
2624 The name of the startup file.  Default is \fB$HOME/.mailrc\fR.
2628 .ne 2
2630 \fB\fBMAILX_HEAD\fR\fR
2632 .RS 14n
2633 The specified string is included at the beginning of the body of each message
2634 that is sent.
2638 .ne 2
2640 \fB\fBMAILX_TAIL\fR\fR
2642 .RS 14n
2643 The specified string is included at the end of the body of each message that is
2644 sent.
2648 .ne 2
2650 \fB\fBMBOX\fR\fR
2652 .RS 14n
2653 The name of the file to save messages which have been read. The \fBex\fRit
2654 command overrides this function, as does saving the message explicitly in
2655 another file.  Default is \fB$HOME/mbox\fR.
2659 .ne 2
2661 \fB\fBPAGER\fR\fR
2663 .RS 14n
2664 The command to use as a filter for paginating output. This can also be used to
2665 specify the options to be used.  Default is \fBpg\fR(1), or if the
2666 \fBbsdcompat\fR variable is set, the default is \fBmore\fR(1). See \fBInternal
2667 Variables\fR.
2671 .ne 2
2673 \fB\fBSHELL\fR\fR
2675 .RS 14n
2676 The name of a preferred command interpreter. Default is \fBsh\fR(1).
2680 .ne 2
2682 \fB\fBVISUAL\fR\fR
2684 .RS 14n
2685 The name of a preferred screen editor.  Default is \fBvi\fR(1).
2688 .SH EXIT STATUS
2690 When the \fB-e\fR option is specified, the following exit values are returned:
2692 .ne 2
2694 \fB\fB0\fR\fR
2696 .RS 6n
2697 Mail was found.
2701 .ne 2
2703 \fB\fB>0\fR\fR
2705 .RS 6n
2706 Mail was not found or an error occurred.
2711 Otherwise, the following exit values are returned:
2713 .ne 2
2715 \fB\fB0\fR\fR
2717 .RS 6n
2718 Successful completion. Notice that this status implies that all messages were
2719 \fBsent\fR, but it gives no assurances that any of them were actually
2720 \fBdelivered\fR.
2724 .ne 2
2726 \fB\fB>0\fR\fR
2728 .RS 6n
2729 An error occurred
2732 .SH FILES
2733 .ne 2
2735 \fB\fB$HOME/.mailrc\fR\fR
2737 .sp .6
2738 .RS 4n
2739  personal startup file
2743 .ne 2
2745 \fB\fB$HOME/mbox\fR\fR
2747 .sp .6
2748 .RS 4n
2749 secondary storage file
2753 .ne 2
2755 \fB\fB$HOME/.Maillock\fR\fR
2757 .sp .6
2758 .RS 4n
2759 lock file to prevent multiple writers of system mailbox
2763 .ne 2
2765 \fB\fB/etc/mail/mailx.rc\fR\fR
2767 .sp .6
2768 .RS 4n
2769 optional system startup file for \fBmailx\fR only
2773 .ne 2
2775 \fB\fB/tmp/R[emqsx]*\fR\fR
2777 .sp .6
2778 .RS 4n
2779 temporary files
2783 .ne 2
2785 \fB\fB/usr/share/lib/mailx/mailx.help*\fR\fR
2787 .sp .6
2788 .RS 4n
2789 help message files
2793 .ne 2
2795 \fB\fB/var/mail/*\fR\fR
2797 .sp .6
2798 .RS 4n
2799 post office directory
2802 .SH ATTRIBUTES
2804 See \fBattributes\fR(5) for descriptions of the following attributes:
2809 box;
2810 c | c
2811 l | l .
2812 ATTRIBUTE TYPE  ATTRIBUTE VALUE
2814 Interface Stability     Standard
2817 .SH SEE ALSO
2819 \fBbiff\fR(1B), \fBecho\fR(1), \fBed\fR(1), \fBex\fR(1), \fBfmt\fR(1),
2820 \fBlp\fR(1), \fBls\fR(1), \fBmail\fR(1), \fBmail\fR(1B), \fBmailcompat\fR(1),
2821 \fBmore\fR(1), \fBpg\fR(1), \fBsh\fR(1), \fBvacation\fR(1),
2822 \fBvi\fR(1), \fBnewaliases\fR(8), \fBsendmail\fR(8), \fBaliases\fR(4),
2823 \fBpasswd\fR(4), \fBattributes\fR(5), \fBenviron\fR(5),
2824 \fBstandards\fR(5)
2825 .SH NOTES
2827 Where \fIshell-command\fR is shown as valid, arguments are not always allowed.
2828 Experimentation is recommended.
2831 Internal variables imported from the execution environment cannot be
2832 \fBuns\fRet.
2835 The full internet addressing is not fully supported by \fBmailx\fR. The new
2836 standards need some time to settle down.
2839 Replies do not always generate correct return addresses.  Try resending the
2840 errant reply with \fBonehop\fR set.
2843 \fBmailx\fR does not lock your record file. So, if you use a record file and
2844 send two or more messages simultaneously, lines from the messages may be
2845 interleaved in the record file.
2848 The format for the \fBalias\fR command is a space-separated list of recipients,
2849 while the format for an alias in either the \fB\&.forward\fR or
2850 \fB/etc/aliases\fR is a comma-separated list.
2853 To read mail on a workstation running Solaris 1.\fIx\fR when your mail server
2854 is running Solaris 2.\fIx\fR, first execute the \fBmailcompat\fR(1) program.