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"
14 mailx \- interactive message processing system
18 \fBmailx\fR [\fB-BdeHiInNURvV~\fR] [\fB-f\fR [\fIfile\fR | \fI+folder\fR]] [\fB-T\fR \fIfile\fR]
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...
30 The mail utilities listed above provide a comfortable, flexible environment for
31 sending and receiving mail messages electronically.
34 When reading mail, the mail utilities provide commands to facilitate saving,
35 deleting, and responding to messages. When sending mail, the mail utilities
36 allow editing, reviewing and other modification of the message as it is
40 Incoming mail is stored in a standard file for each user, called the
41 \fBmailbox\fR for that user. When the mail utilities are called to read
42 messages, the \fBmailbox\fR is the default place to find them. As messages are
43 read, they are marked to be moved to a secondary file for storage, unless
44 specific action is taken, so that the messages need not be seen again.This
45 secondary file is called the \fBmbox\fR and is normally located in the user's
46 \fBHOME\fR directory (see \fBMBOX\fR in ENVIRONMENT VARIABLES for a description
47 of this file). Messages can be saved in other secondary files named by the
48 user. Messages remain in a secondary file until forcibly removed.
51 The user can access a secondary file by using the \fB-f\fR option. Messages in
52 the secondary file can then be read or otherwise processed using the same
53 \fBCommands\fR as in the primary \fBmailbox\fR. This gives rise within these
54 pages to the notion of a current \fBmailbox\fR.
57 On the command line options start with a dash (\(mi). Any other arguments are
58 taken to be destinations (recipients). If no recipients are specified,
59 \fBmailx\fR attempts to read messages from the \fBmailbox\fR.
66 Do not buffer standard input or standard output.
72 \fB\fB-b\fR \fIbcc\fR\fR
75 Set the blind carbon copy list to \fIbcc\fR. \fIbcc\fR should be enclosed in
76 quotes if it contains more than one name.
82 \fB\fB-c\fR \fIcc\fR\fR
85 Set the carbon copy list to \fIcc\fR. \fIcc\fR should be enclosed in quotes if
86 it contains more than one name.
95 Turn on debugging output. (Neither particularly interesting nor recommended.)
104 Test for the presence of mail. \fBmailx\fR prints nothing and exits with a
105 successful return code if there is mail to read.
114 Record the message in a file named after the first recipient. Overrides the
115 \fBrecord\fR variable, if set (see \fBInternal Variables\fR).
121 \fB\fB\fR\fB-f\fR\fB [\fR\fIfile\fR\fB]\fR\fR
124 Read messages from \fIfile\fR instead of \fBmailbox\fR. If no \fIfile\fR is
125 specified, the \fBmbox\fR is used.
131 \fB\fB\fR\fB-f\fR\fB [ \fR\fB+\fR\fIfolder\fR\fB]\fR\fR
134 Use the file \fIfolder\fR in the folder directory (same as the \fBfold\fRer
135 command). The name of this directory is listed in the \fBfolder\fR variable.
144 Print header summary only.
150 \fB\fB-h\fR \fInumber\fR\fR
153 The number of network "hops" made so far. This is provided for network software
154 to avoid infinite delivery loops. This option and its argument are passed to
155 the delivery program.
164 Include the newsgroup and article-id header lines when printing mail messages.
165 This option requires the \fB-f\fR option to be specified.
174 Ignore interrupts. See also \fBignore\fR in \fBInternal Variables\fR.
183 Do not print initial header summary.
192 Do not initialize from the system default \fBmailx.rc\fR or \fBMail.rc\fR file.
199 \fB\fB-r\fR \fIaddress\fR\fR
202 Use \fIaddress\fR as the return address when invoking the delivery program. All
203 tilde commands are disabled. This option and its argument is passed to the
210 \fB\fB-s\fR \fIsubject\fR\fR
213 Set the Subject header field to \fIsubject\fR. \fIsubject\fR should be enclosed
214 in quotes if it contains embedded white space.
220 \fB\fB-T\fR \fIfile\fR\fR
223 Message-id and article-id header lines are recorded in \fIfile\fR after the
224 message is read. This option also sets the \fB-I\fR option.
233 Scan the input for \fBTo:\fR, \fBCc:\fR, and \fBBcc:\fR fields. Any recipients
234 on the command line will be ignored.
243 Convert \fBUUCP-style\fR addresses to internet standards. Overrides the
244 \fBconv\fR environment variable.
250 \fB\fB-u\fR \fIuser\fR\fR
253 Read \fIuser\fR's \fBmailbox\fR. This is only effective if \fIuser\fR's
254 \fBmailbox\fR is not read protected.
263 Print the \fBmailx\fR version number and exit.
272 Pass the \fB-v\fR flag to \fBsendmail\fR(1M).
281 Interpret tilde escapes in the input even if not reading from a tty.
286 The following operands are supported:
290 \fB\fIrecipient\fR\fR
293 Addressee of message.
299 At startup time, \fBmailx\fR executes the system startup file
300 \fB/etc/mail/mailx.rc\fR. If invoked as \fBmail\fR or \fBMail\fR, the system
301 startup file \fB/etc/mail/Mail.rc\fR is used instead.
304 The system startup file sets up initial display options and alias lists and
305 assigns values to some internal variables. These variables are flags and valued
306 parameters which are set and cleared using the \fBse\fRt and \fBuns\fRet
307 commands. See \fBInternal Variables\fR.
310 With the following exceptions, regular commands are legal inside startup files:
311 \fB!\fR, \fBC\fRopy, \fBe\fRdit, \fBfo\fRllowup, \fBF\fRollowup, \fBho\fRld,
312 \fBm\fRail, \fBpre\fRserve, \fBr\fReply, \fBR\fReply, \fBsh\fRell, and
313 \fBv\fRisual. An error in the startup file causes the remaining lines in the
317 After executing the system startup file, the mail utilities execute the
318 optional personal startup file \fB$HOME/.mailrc\fR, wherein the user can
319 override the values of the internal variables as set by the system startup
323 If the \fB-n\fR option is specified, however, the mail utilities do not execute
324 the system startup file.
327 Many system administrators include the commands
340 in the system startup files (to be compatible with past Solaris behavior), but
341 this does not meet standards requirements for \fBmailx\fR. To get standard
342 behavior for \fBmailx\fR, users should use the \fB-n\fR option or include the
343 following commands in a personal startup file:
347 unset appenddeadletter
356 When reading mail, the mail utilities are in \fIcommand mode\fR. A header
357 summary of the first several messages is displayed, followed by a prompt
358 indicating the mail utilities can accept regular commands (see \fBCommands\fR
359 below). When sending mail, the mail utilities are in \fIinput mode\fR. If no
360 subject is specified on the command line, and the \fBasksub\fR variable is set,
361 a prompt for the subject is printed.
364 As the message is typed, the mail utilities read the message and store it in a
365 temporary file. Commands may be entered by beginning a line with the tilde (~)
366 escape character followed by a single command letter and optional arguments.
367 See \fBTilde Escapes\fR for a summary of these commands.
370 Each message is assigned a sequential number, and there is at any time the
371 notion of a current message, marked by a right angle bracket (>) in the header
372 summary. Many commands take an optional list of messages (\fImessage-list\fR)
373 to operate on. In most cases, the current message is set to the
374 highest-numbered message in the list after the command is finished executing.
377 The default for \fImessage-list\fR is the current message. A \fImessage-list\fR
378 is a list of message identifiers separated by spaces, which may include:
385 Message number \fIn\fR.
403 The first undeleted message.
430 The next undeleted message.
439 The previous undeleted message.
445 \fB\fIn\fR\fB\(mi\fR\fIm\fR\fR
448 An inclusive range of message numbers.
457 All messages from \fIuser\fR.
466 All messages with \fIstring\fR in the Subject line (case ignored).
475 All messages of type \fIc\fR, where \fIc\fR is one of:
521 Notice that the context of the command determines whether this type of message
522 specification makes sense.
527 Other arguments are usually arbitrary strings whose usage depends on the
528 command involved. Filenames, where expected, are expanded using the normal
529 shell conventions (see \fBsh\fR(1)). Special characters are recognized by
530 certain commands and are documented with the commands below.
533 Recipients listed on the command line may be of three types: login names, shell
534 commands, or alias groups. Login names may be any network address, including
535 mixed network addressing. If mail is found to be undeliverable, an attempt is
536 made to return it to the sender's \fBmailbox\fR. If the \fBexpandaddr\fR option
537 is not set (the default), then the following rules do not apply and the name of
538 the recipient must be a local mailbox or network address. If the recipient name
539 begins with a pipe symbol ( | ), the rest of the name is taken to be a shell
540 command to pipe the message through. This provides an automatic interface with
541 any program that reads the standard input, such as \fBlp\fR(1) for recording
542 outgoing mail on paper.
545 Alias groups are set by the \fBa\fRlias command (see \fBCommands\fR below) or in
546 a system startup file (for example, \fB$HOME/.mailrc\fR). Aliases are lists of
547 recipients of any type.
548 .SS "Forwarding Mail"
550 To forward a specific message, include it in a message to the desired
551 recipients with the \fB~f\fR or \fB~m\fR tilde escapes. See \fBTilde\fR
552 \fBEscapes\fR below. To forward mail automatically, add a comma-separated list
553 of addresses for additional recipients to the \fB\&.forward\fR file in your
554 home directory. This is different from the format of the \fBalias\fR command,
555 which takes a space-separated list instead. \fBNote:\fR Forwarding addresses
556 must be valid, or the messages will "bounce." You cannot, for instance, reroute
557 your mail to a new host by forwarding it to your new address if it is not yet
558 listed in the \fBNIS\fR aliases domain.
561 Regular commands are of the form
565 [ \fIcommand\fR ] [ \fImessage-list\fR ] [ \fIarguments\fR ]
572 In \fIinput mode\fR, commands are recognized by the escape character,
573 \fBtilde(~)\fR, and lines not treated as commands are taken as input for the
574 message. If no command is specified in \fIcommand mode\fR, \fBn\fRext is
575 assumed. The following is a complete list of \fBmailx\fR commands:
579 \fB\fB!\fR\fIshell-command\fR\fR
583 Escape to the shell. See \fBSHELL\fR in ENVIRONMENT VARIABLES.
589 \fB\fB#\fR \fIcomment\fR\fR
593 \fINULL\fR command (comment). Useful in \fBmailrc\fR files.
603 Print the current message number.
613 Prints a summary of commands.
619 \fB\fBa\fRlias \fIalias name\fR .\|.\|.\fR
623 \fB\fBg\fRroup \fIalias name\fR .\|.\|.\fR
627 Declare an alias for the given names. The names are substituted when
628 \fBalias\fR is used as a recipient. Useful in the \fBmailrc\fR file. With no
629 arguments, the command displays the list of defined aliases.
635 \fB\fBalt\fRernates \fIname .\|.\|.\fR\fR
639 Declare a list of alternate names for your login. When responding to a message,
640 these names are removed from the list of recipients for the response. With no
641 arguments, print the current list of alternate names. See also \fBallnet\fR in
642 \fBInternal Variables\fR.
648 \fB\fBcd\fR [\fIdirectory\fR]\fR
652 \fB\fBch\fRdir [\fIdirectory\fR]\fR
656 Change directory. If \fIdirectory\fR is not specified, \fB$HOME\fR is used.
662 \fB\fBc\fRopy [\fIfile\fR]\fR
666 \fB\fBc\fRopy [\fImessage-list\fR] \fIfile\fR\fR
670 Copy messages to the file without marking the messages as saved. Otherwise
671 equivalent to the \fBs\fRave command.
677 \fB\fBC\fRopy [\fImessage-list\fR]\fR
681 Save the specified messages in a file whose name is derived from the author of
682 the message to be saved, without marking the messages as saved. Otherwise
683 equivalent to the \fBS\fRave command.
689 \fB\fBd\fRelete [\fImessage-list\fR]\fR
693 Delete messages from the \fBmailbox\fR. If \fBautoprint\fR is set, the next
694 message after the last one deleted is printed (see \fBInternal Variables\fR).
700 \fB\fBdi\fRscard [\fIheader-field\fR.\|.\|.\|]\fR
704 \fB\fBig\fRnore [\fIheader-field\fR.\|.\|.\|]\fR
708 Suppress printing of the specified header fields when displaying messages on
709 the screen. Examples of header fields to ignore are \fBStatus\fR and
710 \fBReceived\fR. The fields are included when the message is saved, unless the
711 \fBalwaysignore\fR variable is set. The \fBMo\fRre, \fBPa\fRge, \fBP\fRrint,
712 and \fBT\fRype commands override this command. If no header is specified, the
713 current list of header fields being ignored is printed. See also the
714 \fBundi\fRscard and \fBunig\fRnore commands.
720 \fB\fBdp\fR [\fImessage-list\fR]\fR
724 \fB\fBdt \fR[\fImessage-list\fR]\fR
728 Delete the specified messages from the \fBmailbox\fR and print the next message
729 after the last one deleted. Roughly equivalent to a \fBd\fRelete command
730 followed by a \fBp\fRrint command.
736 \fB\fBec\fRho \fIstring \fR.\|.\|.\fR
740 Echo the given strings (like \fBecho\fR(1)).
746 \fB\fBe\fRdit [\fImessage-list\fR]\fR
750 Edit the given messages. Each message is placed in a temporary file and the
751 program named by the \fBEDITOR\fR variable is invoked to edit it (see
752 ENVIRONMENT VARIABLES). Default editor is \fBed\fR(1).
758 \fB\fBexpandaddr\fR\fR
762 Causes recipient addresses to be expanded based on the discussion in the section
763 \fBSending Mail\fR. Note that enabling this option allows for addresses that can
764 cause arbitrary command execution by starting with the \fB|\fR character.
778 Exit from \fBmailx\fR, without changing the \fBmailbox\fR. No messages are
779 saved in the \fBmbox\fR (see also \fBq\fRuit).
785 \fB\fBfie\fRld [\fImessage-list\fR] header-file\fR
789 Display the value of the header field in the specified message.
795 \fB\fBfi\fRle [\fIfile\fR]\fR
799 \fB\fBfold\fRer [\fIfile\fR]\fR
803 Quit from the current file of messages and read in the specified file. Several
804 special characters are recognized when used as file names:
811 the current \fBmailbox\fR.
817 \fB\fB%\fR\fIuser\fR\fR
820 the \fBmailbox\fR for \fIuser\fR.
829 the previous mail file.
838 the current \fBmbox\fR.
844 \fB\fB+\fR\fIfile\fR\fR
847 The named file in the \fIfolder\fR directory (listed in the \fBfolder\fR
851 With no arguments, print the name of the current mail file, and the number of
852 messages and characters it contains.
862 Print the names of the files in the directory set by the \fBfolder\fR variable
863 (see \fBInternal Variables\fR).
869 \fB\fBFo\fRllowup [\fImessage\fR]\fR
873 Respond to a message, recording the response in a file whose name is derived
874 from the author of the message. Overrides the \fBrecord\fR variable, if set. If
875 the \fBreplyall\fR variable is set, the actions of \fBFo\fRllowup and
876 \fBfo\fRllowup are reversed. See also the \fBf\fRollowup, \fBS\fRave, and
877 \fBC\fRopy commands and \fBoutfolder\fR in \fBInternal Variables\fR, and the
878 \fBStarting Mail\fR section in USAGE above.
884 \fB\fBf\fRollowup [\fImessage-list\fR]\fR
888 Respond to the first message in the \fImessage-list\fR, sending the message to
889 the author of each message in the \fImessage-list\fR. The subject line is taken
890 from the first message and the response is recorded in a file whose name is
891 derived from the author of the first message. If the \fBreplyall\fR variable is
892 set, the actions of \fBfo\fRllowup and \fBFo\fRllowup are reversed. See also
893 the \fBFo\fRllowup, \fBS\fRave, and \fBC\fRopy commands and \fBoutfolder\fR in
894 \fBInternal Variables\fR, and the \fBStarting Mail\fR section in USAGE above.
900 \fB\fBf\fRrom [\fImessage-list\fR]\fR
904 Print the header summary for the specified messages. If no messages are
905 specified, print the header summary for the current message.
911 \fB\fBg\fRroup \fIalias name \fR.\|.\|.\fR
915 \fB\fBa\fRlias \fIalias name \fR.\|.\|.\fR
919 Declare an alias for the given names. The names are substituted when
920 \fBalias\fR is used as a recipient. Useful in the \fBmailrc\fR file.
926 \fB\fBh\fReaders [\fImessage\fR]\fR
930 Print the page of headers which includes the message specified. The
931 \fBscreen\fR variable sets the number of headers per page (see \fBInternal
932 Variables\fR). See also the \fBz\fR command.
942 Print a summary of commands.
948 \fB\fBho\fRld [\fImessage-list\fR]\fR
952 \fB\fBpre\fRserve [\fImessage-list\fR]\fR
956 Hold the specified messages in the \fBmailbox\fR.
962 \fB\fBi\fRf \fBs\fR | \fBr\fR | \fBt\fR\fR
966 \fB\fImail-commands\fR\fR
978 \fB\fImail-commands\fR\fR
990 Conditional execution, where \fIs\fR executes following \fImail-commands\fR, up
991 to an \fBel\fRse or \fBen\fRdif, if the program is in \fIsend\fR mode, \fIr\fR
992 causes the \fImail-commands\fR to be executed only in \fIreceive\fR mode, and
993 \fBt\fR causes the \fImail-commands\fR to be executed only if \fBmailx\fR is
994 being run from a terminal. Useful in the \fBmailrc\fR file.
1004 Incorporate messages that arrive while you are reading the system mailbox. The
1005 new messages are added to the message list in the current \fBmail\fR session.
1006 This command does not commit changes made during the session, and prior
1007 messages are not renumbered.
1013 \fB\fBig\fRnore [\fIheader-field \fR.\|.\|.\|]\fR
1017 \fB\fBdi\fRscard [\fIheader-field \fR.\|.\|.\|]\fR
1021 Suppress printing of the specified header fields when displaying messages on
1022 the screen. Examples of header fields to ignore are \fBStatus\fR and \fBCc\fR.
1023 All fields are included when the message is saved. The \fBMo\fRre, \fBPa\fRge,
1024 \fBP\fRrint and \fBT\fRype commands override this command. If no header is
1025 specified, the current list of header fields being ignored is printed. See also
1026 the \fBundi\fRscard and \fBunig\fRnore commands.
1036 Print all commands available. No explanation is given.
1046 [\fImessage\fR] \fBfile\fR The specified message is replaced by the message in
1047 the named file. \fBfile\fR should contain a single mail message including mail
1048 headers (as saved by the \fBs\fRave command).
1054 \fB\fBm\fRail \fIrecipient \fR.\|.\|.\fR
1058 Mail a message to the specified recipients.
1064 \fB\fBM\fRail \fIrecipient\fR\fR
1068 Mail a message to the specified recipients, and record it in a file whose name
1069 is derived from the author of the message. Overrides the \fBrecord\fR variable,
1070 if set. See also the \fBSave\fR and \fBCopy\fR commands and \fBoutfolder\fR in
1071 \fBInternal Variables\fR.
1077 \fB\fBmb\fRox [\fImessage-list\fR]\fR
1081 Arrange for the given messages to end up in the standard \fBmbox\fR save file
1082 when \fBmailx\fR terminates normally. See \fBMBOX\fR in ENVIRONMENT VARIABLES
1083 for a description of this file. See also the \fBex\fRit and \fBq\fRuit
1090 \fB\fBmo\fRre [\fImessage-list\fR]\fR
1094 \fB\fBpa\fRge [\fImessage-list\fR]\fR
1098 Print the specified messages. If \fBcrt\fR is set, the messages longer than the
1099 number of lines specified by the \fBcrt\fR variable are paged through the
1100 command specified by the \fBPAGER\fR variable. The default command is
1101 \fBpg\fR(1) or if the \fBbsdcompat\fR variable is set, the default is
1102 \fBmore\fR(1). See ENVIRONMENT VARIABLES. Same as the \fBp\fRrint and
1103 \fBt\fRype commands.
1109 \fB\fBMo\fRre [\fImessage-list\fR]\fR
1113 \fB\fBPa\fRge [\fImessage-list\fR]\fR
1117 Print the specified messages on the screen, including all header fields.
1118 Overrides suppression of fields by the \fBig\fRnore command. Same as the
1119 \fBP\fRrint and \fBT\fRype commands.
1125 \fB\fBne\fRw [\fImessage-list\fR]\fR
1129 \fB\fBN\fRew [\fImessage-list\fR]\fR
1133 \fB\fBunr\fRead [\fImessage-list\fR]\fR
1141 [\fImessage-list\fR] Take a message list and mark each message as \fInot\fR
1148 \fB\fBn\fRext [\fImessage\fR]\fR
1152 Go to the next message matching \fImessage\fR. If message is not supplied, this
1153 command finds the next message that was not deleted or saved. A
1154 \fImessage-list\fR may be specified, but in this case the first valid message
1155 in the list is the only one used. This is useful for jumping to the next
1156 message from a specific user, since the name would be taken as a command in the
1157 absence of a real command. See the discussion of \fImessage-list\fR above for a
1158 description of possible message specifications.
1164 \fB\fBpi\fRpe [\fImessage-list\fR] [\fIshell-command\fR]\fR
1168 \fB\fB|\fR [\fImessage-list\fR] [\fIshell-command\fR]\fR
1172 Pipe the message through the given \fIshell-command\fR. The message is treated
1173 as if it were read. If no arguments are given, the current message is piped
1174 through the command specified by the value of the \fBcmd\fR variable. If the
1175 \fBpage\fR variable is set, a form feed character is inserted after each
1176 message (see \fBInternal Variables\fR).
1182 \fB\fBpre\fRserve [\fImessage-list\fR]\fR
1186 \fB\fBho\fRld [\fImessage-list\fR]\fR
1190 Preserve the specified messages in the \fBmailbox\fR.
1196 \fB\fBp\fRrint [\fImessage-list\fR]\fR
1200 \fB\fBt\fRype [\fImessage-list\fR]\fR
1204 Print the specified messages. If \fBcrt\fR is set, the messages longer than the
1205 number of lines specified by the \fBcrt\fR variable are paged through the
1206 command specified by the \fBPAGER\fR variable. The default command is
1207 \fBpg\fR(1) or if the \fBbsdcompat\fR variable is set, the default is
1208 \fBmore\fR(1). See ENVIRONMENT VARIABLES. Same as the \fBmo\fRre and \fBpa\fRge
1215 \fB\fBP\fRrint [\fImessage-list\fR]\fR
1219 \fB\fBT\fRype [\fImessage-list\fR]\fR
1223 Print the specified messages on the screen, including all header fields.
1224 Overrides suppression of fields by the \fBig\fRnore command. Same as the
1225 \fBMo\fRre and \fBPa\fRge commands.
1231 \fB\fBpu\fRt [\fIfile\fR]\fR
1235 \fB\fBpu\fRt [\fImessage-list\fR] \fIfile\fR\fR
1239 Save the specified message in the given file. Use the same conventions as the
1240 \fBp\fRrint command for which header fields are ignored.
1246 \fB\fBPu\fRt [\fIfile\fR]\fR
1250 \fB\fBPu\fRt [\fImessage-list\fR] \fIfile\fR\fR
1254 Save the specified message in the given file. Overrides suppression of fields
1255 by the \fBig\fRnore command.
1265 Exit from \fBmailx\fR, storing messages that were read in \fBmbox\fR and unread
1266 messages in the \fBmailbox\fR. Messages that have been explicitly saved in a
1267 file are deleted unless the \fBkeepsave\fR variable is set.
1273 \fB\fBr\fReply [\fImessage-list\fR]\fR
1277 \fB\fBr\fRespond [\fImessage-list\fR]\fR
1281 \fB\fBreplys\fRender [\fImessage-list\fR]\fR
1285 Send a response to the author of each message in the \fImessage-list\fR. The
1286 subject line is taken from the first message. If \fBrecord\fR is set to a
1287 file, a copy of the reply is added to that file. If the \fBreplyall\fR variable
1288 is set, the actions of \fBR\fReply/\fBR\fRespond and \fBr\fReply/\fBr\fRespond
1289 are reversed. The \fBreplys\fRender command is not affected by the
1290 \fBreplyall\fR variable, but sends each reply only to the sender of each
1291 message. See the \fBStarting Mail\fR section in USAGE above.
1297 \fB\fBR\fReply [\fImessage\fR]\fR
1301 \fB\fBR\fRespond [\fImessage\fR]\fR
1305 \fB\fBreplya\fRll [\fImessage\fR]\fR
1309 Reply to the specified message, including all other recipients of that message.
1310 If the variable \fBrecord\fR is set to a file, a copy of the reply added to
1311 that file. If the \fBreplyall\fR variable is set, the actions of
1312 \fBR\fReply/\fBR\fRespond and \fBr\fReply/\fBr\fRespond are reversed. The
1313 \fBreplya\fRll command is not affected by the \fBreplyall\fR variable, but
1314 always sends the reply to all recipients of the message. See the \fBStarting
1315 Mail\fR section in USAGE above.
1325 Add the list of header fields named to the \fIretained list\fR. Only the header
1326 fields in the retain list are shown on your terminal when you print a message.
1327 All other header fields are suppressed. The set of retained fields specified
1328 by the \fBret\fRain command overrides any list of ignored fields specified by
1329 the \fBig\fRnore command. The \fBT\fRype and \fBP\fRrint commands can be used
1330 to print a message in its entirety. If \fBret\fRain is executed with no
1331 arguments, it lists the current set of retained fields.
1337 \fB\fBS\fRave [\fImessage-list\fR]\fR
1341 Save the specified messages in a file whose name is derived from the author of
1342 the first message. The name of the file is taken to be the author's name with
1343 all network addressing stripped off. See also the \fBC\fRopy, \fBfo\fRllowup,
1344 and \fBF\fRollowup commands and \fBoutfolder\fR in \fBInternal Variables\fR.
1350 \fB\fBs\fRave [\fIfile\fR]\fR
1354 \fB\fBs\fRave [\fImessage-list\fR] \fIfile\fR\fR
1358 Save the specified messages in the given file. The file is created if it does
1359 not exist. The file defaults to \fBmbox\fR. The message is deleted from the
1360 \fBmailbox\fR when \fBmailx\fR terminates unless \fBkeepsave\fR is set (see
1361 also \fBInternal Variables\fR and the \fBex\fRit and \fBq\fRuit commands).
1371 \fB\fBse\fRt \fIvariable\fR\fR
1375 \fB\fBse\fRt \fIvariable\fR\fB=\fR\fIstring\fR\fR
1379 \fB\fBse\fRt \fIvariable\fR\fB=\fR\fInumber\fR\fR
1383 Define a \fIvariable\fR. To assign a \fIvalue\fR to \fIvariable\fR, separate
1384 the variable name from the value by an `\fB=\fR' (there must be no space before
1385 or after the `\fB=\fR'). A variable may be given a null, string, or numeric
1386 \fIvalue\fR. To embed SPACE characters within a \fIvalue\fR, enclose it in
1389 With no arguments, \fBse\fRt displays all defined variables and any values they
1390 might have. See \fBInternal Variables\fR for a description of all predefined
1391 \fBmail\fR variables.
1401 Invoke an interactive shell. See also \fBSHELL\fR in ENVIRONMENT VARIABLES.
1407 \fB\fBsi\fRze [\fImessage-list\fR]\fR
1411 Print the size in characters of the specified messages.
1417 \fB\fBso\fRurce \fIfile\fR\fR
1421 Read commands from the given file and return to command mode.
1427 \fB\fBto\fRp [\fImessage-list\fR]\fR
1431 Print the top few lines of the specified messages. If the \fBtoplines\fR
1432 variable is set, it is taken as the number of lines to print (see \fBInternal
1433 Variables\fR). The default is 5.
1439 \fB\fBtou\fRch [\fImessage-list\fR]\fR
1443 Touch the specified messages. If any message in \fImessage-list\fR is not
1444 specifically saved in a file, it is placed in the \fBmbox\fR, or the file
1445 specified in the \fBMBOX\fR environment variable, upon normal termination. See
1446 \fBex\fRit and \fBq\fRuit.
1452 \fB\fBT\fRype [\fImessage-list\fR]\fR
1456 \fB\fBP\fRrint [\fImessage-list\fR]\fR
1460 Print the specified messages on the screen, including all header fields.
1461 Overrides suppression of fields by the \fBig\fRnore command.
1467 \fB\fBt\fRype [\fImessage-list\fR]\fR
1471 \fB\fBp\fRrint [\fImessage-list\fR]\fR
1475 Print the specified messages. If \fBcrt\fR is set, the messages longer than the
1476 number of lines specified by the \fBcrt\fR variable are paged through the
1477 command specified by the \fBPAGER\fR variable. The default command is
1478 \fBpg\fR(1). See ENVIRONMENT VARIABLES.
1484 \fB\fBuna\fRlias [\fBalias\fR] .\|.\|.\fR
1488 \fB\fBung\fRroup [\fBalias\fR] .\|.\|.\fR
1492 Remove the definitions of the specified aliases.
1498 \fB\fBu\fRndelete [\fImessage-list\fR]\fR
1502 Restore the specified deleted messages. Will only restore messages deleted in
1503 the current mail session. If \fBautoprint\fR is set, the last message of those
1504 restored is printed (see \fBInternal Variables\fR).
1510 \fB\fBundi\fRscard [\fIheader-field\fR\|.\|.\|.]\fR
1514 \fB\fBunig\fRnore [\fIheader-field\fR\|.\|.\|.]\fR
1518 Remove the specified header fields from the list being ignored. If no header
1519 fields are specified, all header fields are removed from the list being
1526 \fB\fBunret\fRain [\fIheader-field\fR\|.\|.\|.]\fR
1530 Remove the specified header fields from the list being retained. If no header
1531 fields are specified, all header fields are removed from the list being
1538 \fB\fBunr\fRead [\fImessage-list\fR]\fR
1542 \fB\fBU\fRnread [\fImessage-list\fR] Same as the \fBne\fRw command.\fR
1552 \fB\fBuns\fRet \fIvariable\fR\|.\|.\|.\fR
1556 Erase the specified variables. If the variable was imported from the
1557 environment (that is, an environment variable or exported shell variable), it
1558 cannot be unset from within \fBmailx\fR.
1568 Print the current version and release date of the \fBmailx\fR utility.
1574 \fB\fBv\fRisual [\fImessage-list\fR]\fR
1578 Edit the given messages with a screen editor. Each messages is placed in a
1579 temporary file and the program named by the \fBVISUAL\fR variable is invoked to
1580 edit it (see ENVIRONMENT VARIABLES). Notice that the default visual editor is
1587 \fB\fBw\fRrite [\fImessage-list\fR] \fBfile\fR\fR
1591 Write the given messages on the specified file, minus the header and trailing
1592 blank line. Otherwise equivalent to the \fBs\fRave command.
1606 Exit from \fBmailx\fR, without changing the \fBmailbox\fR. No messages are
1607 saved in the \fBmbox\fR (see also \fBq\fRuit).
1613 \fB\fBz\fR[\fB+\fR\||\|\fB\(mi\fR]\fR
1617 Scroll the header display forward or backward one screen\(mifull. The number of
1618 headers displayed is set by the \fBscreen\fR variable (see \fBInternal
1624 The following tilde escape commands can be used when composing mail to send.
1625 These may be entered only from \fIinput mode\fR, by beginning a line with the
1626 tilde escape character (~). See \fBescape\fR in \fBInternal Variables\fR for
1627 changing this special character. The escape character can be entered as text by
1632 \fB\fB~\|!\fR\fIshell-command\fR\fR
1635 Escape to the shell. If present, run \fIshell-command\fR.
1644 Simulate end of file (terminate message input).
1650 \fB\fB~\|:\fR\fImail-command\fR\fR
1654 \fB\fB~_\|\fR\fImail-command\fR\fR
1657 Perform the command-level request. Valid only when sending a message while
1667 Print a summary of tilde escapes.
1676 Insert the autograph string \fBSign\fR into the message (see \fBInternal
1686 Insert the autograph string \fBsign\fR into the message (see \fBInternal
1693 \fB\fB~b\fR\fI name \|.\|.\|.\fR\fR
1696 Add the \fIname\fRs to the blind carbon copy (\fBBcc\fR) list. This is like the
1697 carbon copy (\fBCc\fR) list, except that the names in the \fBBcc\fR list are
1698 not shown in the header of the mail message.
1704 \fB\fB~c\fR\fI name \|.\|.\|.\fR\fR
1707 Add the \fIname\fRs to the carbon copy (\fBCc\fR) list.
1716 Read in the \fBdead-letter\fR file. See \fBDEAD\fR in ENVIRONMENT VARIABLES for
1717 a description of this file.
1726 Invoke the editor on the partial message. See also \fBEDITOR\fR in ENVIRONMENT
1733 \fB\fB~f\fR [\fImessage-list\fR]\fR
1736 Forward the specified message, or the current message being read. Valid only
1737 when sending a message while reading mail. The messages are inserted into the
1738 message without alteration (as opposed to the \fB~m\fR escape).
1744 \fB\fB~F\fR [\fImessage-list\fR]\fR
1747 Forward the specified message, or the current message being read, including all
1748 header fields. Overrides the suppression of fields by the \fBig\fRnore command.
1757 Prompt for \fBSubject\fR line and \fBTo\fR, \fBCc\fR, and \fBBcc\fR lists. If
1758 the field is displayed with an initial value, it may be edited as if you had
1765 \fB\fB~i\fR \fIvariable\fR\fR
1768 Insert the value of the named variable into the text of the message. For
1769 example, \fB~A\fR is equivalent to `\fB~i Sign\fR.' Environment variables set
1770 and exported in the shell are also accessible by \fB~i\fR.
1776 \fB\fB~m\fR [\fImessage-list\fR]\fR
1779 Insert the listed messages, or the current message being read into the letter.
1780 Valid only when sending a message while reading mail. The text of the message
1781 is shifted to the right, and the string contained in the \fBindentprefix\fR
1782 variable is inserted as the leftmost characters of each line. If
1783 \fBindentprefix\fR is not set, a TAB character is inserted into each line.
1789 \fB\fB~M\fR [\fImessage-list\fR]\fR
1792 Insert the listed messages, or the current message being read, including the
1793 header fields, into the letter. Valid only when sending a message while reading
1794 mail. The text of the message is shifted to the right, and the string contained
1795 in the \fBindentprefix\fR variable is inserted as the leftmost characters of
1796 each line. If \fBindentprefix\fR is not set, a TAB character is inserted into
1797 each line. Overrides the suppression of fields by the \fBig\fRnore command.
1806 Print the message being entered.
1815 Quit from input mode by simulating an interrupt. If the body of the message is
1816 not null, the partial message is saved in \fBdead-letter\fR. See \fBDEAD\fR in
1817 ENVIRONMENT VARIABLES for a description of this file.
1826 Mark message for return receipt.
1832 \fB\fB~r\fR \fIfile\fR\fR
1836 \fB\fB~<\fR \fIfile\fR\fR
1840 \fB\fB~< ! \fR\fIshell-command\fR\fR
1843 Read in the specified file. If the argument begins with an exclamation point
1844 (!), the rest of the string is taken as an arbitrary shell command and is
1845 executed, with the standard output inserted into the message.
1851 \fB\fB~s\fR \fIstring \|.\|.\|.\fR\fR
1854 Set the subject line to \fIstring\fR.
1860 \fB\fB~t\fR \fIname \|.\|.\|.\fR\fR
1863 Add the given \fIname\fRs to the To list.
1872 Invoke a preferred screen editor on the partial message. The default visual
1873 editor is \fBvi\fR(1). See also \fBVISUAL\fR in ENVIRONMENT VARIABLES.
1879 \fB\fB~w\fR \fIfile\fR\fR
1882 Write the message into the given file, without the header.
1891 Exit as with \fB~q\fR except the message is not saved in \fBdead-letter\fR.
1897 \fB\fB~|\fR \fIshell-command\fR\fR
1900 Pipe the body of the message through the given \fIshell-command\fR. If the
1901 \fIshell-command\fR returns a successful exit status, the output of the command
1902 replaces the message.
1905 .SS "Internal Variables"
1907 The following variables are internal variables. They may be imported from the
1908 execution environment or set using the \fBse\fRt command at any time. The
1909 \fBuns\fRet command may be used to erase variables.
1916 All network names whose last component (login name) match are treated as
1917 identical. This causes the \fImessage-list\fR message specifications to behave
1918 similarly. Disabled by default. See also the \fBalt\fRernates command and the
1919 \fBmetoo\fR and \fBfuzzymatch\fR variables.
1925 \fB\fBalwaysignore\fR\fR
1928 Ignore header fields with \fBig\fRnore everywhere, not just during \fBp\fRrint
1929 or \fBt\fRype. Affects the \fBs\fRave, \fBS\fRave, \fBc\fRopy, \fBC\fRopy,
1930 \fBto\fRp, \fBpi\fRpe, and \fBw\fRrite commands, and the \fB~m\fR and \fB~f\fR
1931 tilde escapes. Enabled by default.
1940 Upon termination, append messages to the end of the \fBmbox\fR file instead of
1941 prepending them. Although disabled by default, \fBappend\fR is set in the
1942 system startup file (which can be suppressed with the \fB-n\fR command line
1949 \fB\fBappenddeadletter\fR\fR
1952 Append to the deadletter file rather than overwrite it. Although disabled by
1953 default, \fBappenddeadletter\fR is frequently set in the system startup file.
1954 See \fBStarting Mail\fR in USAGE above.
1963 Prompt for the \fBBcc\fR list after the \fBSubject\fR is entered if it is not
1964 specified on the command line with the \fB-b\fR option. Disabled by default.
1973 Prompt for the \fBCc\fR list after the \fBSubject\fR is entered if it is not
1974 specified on the command line with the \fB-c\fR option. Disabled by default.
1983 Prompt for subject if it is not specified on the command line with the \fB-s\fR
1984 option. Enabled by default.
1993 Automatically incorporate new messages into the current session as they arrive.
1994 This has an affect similar to issuing the \fBinc\fR command every time the
1995 command prompt is displayed. Disabled by default, but \fBautoinc\fR is set in
1996 the default system startup file for \fBmailx\fR.
2002 \fB\fBautoprint\fR\fR
2005 Enable automatic printing of messages after \fBd\fRelete and \fBu\fRndelete
2006 commands. Disabled by default.
2015 Enable the special-casing of exclamation points (!) in shell escape command
2016 lines as in \fBvi\fR(1). Disabled by default.
2022 \fB\fBbsdcompat\fR\fR
2025 Set automatically if \fBmailx\fR is invoked as \fBmail\fR or \fBMail\fR. Causes
2026 \fBmailx\fR to use \fB/etc/mail/Mail.rc\fR as the system startup file. Changes
2027 the default pager to \fBmore\fR(1).
2033 \fB\fBcmd=\fR\fIshell-command\fR\fR
2036 Set the default command for the \fBpi\fRpe command. No default value.
2042 \fB\fBconv=\fR\fIconversion\fR\fR
2045 Convert uucp addresses to the specified address style, which can be
2050 \fB\fBinternet\fR\fR
2053 This requires a mail delivery program conforming to the \fBRFC822\fR standard
2054 for electronic mail addressing.
2060 \fB\fBoptimize\fR\fR
2063 Remove loops in uucp address paths (typically generated by the
2064 \fBr\fReply command). No rerouting is performed; \fBmail\fR has no knowledge
2065 of \fBUUCP\fR routes or connections.
2068 Conversion is disabled by default. See also \fBsendmail\fR(1M) and the \fB-U\fR
2069 command-line option.
2075 \fB\fBcrt\fR[\fB=\fR\fInumber\fR]\fR
2078 Pipe messages having more than \fInumber\fR lines through the command specified
2079 by the value of the \fBPAGER\fR variable ( \fBpg\fR(1) or \fBmore\fR(1) by
2080 default). If \fInumber\fR is not specified, the current window size is used.
2081 Disabled by default.
2090 Enable verbose diagnostics for debugging. Messages are not delivered. Disabled
2100 Take a period on a line by itself, or \fBEOF\fR during input from a terminal as
2101 end-of-file. Disabled by default, but \fBdot\fR is set in the system startup
2102 file (which can be suppressed with the \fB-n\fR command line option).
2111 By default, \fBmailx\fR will treat any address containing a slash ("/")
2112 character as a local "send to file" address. By unsetting this option, this
2113 behavior is disabled. Enabled by default.
2122 Reverse the effect of the \fBfo\fRllowup/\fBFo\fRllowup and
2123 \fBr\fReply/\fBR\fReply command pairs. If both \fBflipr\fR and \fBreplyall\fR
2124 are set, the effect is as if neither was set.
2133 Extract the author listed in the header summary from the \fBFrom:\fR header
2134 instead of the UNIX \fBFrom\fR line. Enabled by default.
2140 \fB\fBfuzzymatch\fR\fR
2143 The \fBfrom\fR command searches for messages from the indicated sender. By
2144 default, the full sender address must be specified. By setting this option,
2145 only a sub-string of the sender address need be specified. Disabled by default.
2151 \fB\fBescape=\fR\fIc\fR\fR
2154 Substitute \fIc\fR for the ~ escape character. Takes effect with next message
2161 \fB\fBfolder=\fR\fIdirectory\fR\fR
2164 The directory for saving standard mail files. User-specified file names
2165 beginning with a plus (+) are expanded by preceding the file name with this
2166 directory name to obtain the real file name. If \fIdirectory\fR does not start
2167 with a slash (/), \fB$HOME\fR is prepended to it. There is no default for the
2168 \fBfolder\fR variable. See also \fBoutfolder\fR below.
2177 Enable printing of the header summary when entering \fBmailx\fR. Enabled by
2187 Preserve all messages that are read in the \fBmailbox\fR instead of putting
2188 them in the standard \fBmbox\fR save file. Disabled by default.
2197 Ignore interrupts while entering messages. Handy for noisy dial-up lines.
2198 Disabled by default.
2204 \fB\fBignoreeof\fR\fR
2207 Ignore end-of-file during message input. Input must be terminated by a period
2208 (.) on a line by itself or by the \fB~.\fR command. See also \fBdot\fR above.
2209 Disabled by default.
2215 \fB\fBindentprefix=\fR\fIstring\fR\fR
2218 When \fBindentprefix\fR is set, \fIstring\fR is used to mark indented lines
2219 from messages included with \fB~m\fR. The default is a TAB character.
2228 When the \fBmailbox\fR is empty, truncate it to zero length instead of removing
2229 it. Disabled by default.
2235 \fB\fBiprompt=\fR\fIstring\fR\fR
2238 The specified prompt string is displayed before each line on input is requested
2239 when sending a message.
2245 \fB\fBkeepsave\fR\fR
2248 Keep messages that have been saved in other files in the \fBmailbox\fR instead
2249 of deleting them. Disabled by default.
2255 \fB\fBmakeremote\fR\fR
2258 When replying to all recipients of a message, if an address does not include a
2259 machine name, it is assumed to be relative to the sender of the message.
2260 Normally not needed when dealing with hosts that support RFC822.
2269 If your login appears as a recipient, do not delete it from the list. Disabled
2276 \fB\fBmustbang\fR\fR
2279 Force all mail addresses to be in bang format.
2288 When responding to a message that was originally sent to several recipients,
2289 the other recipient addresses are normally forced to be relative to the
2290 originating author's machine for the response. This flag disables alteration of
2291 the recipients' addresses, improving efficiency in a network where all machines
2292 can send directly to all other machines (that is, one hop away). Disabled by
2299 \fB\fBoutfolder\fR\fR
2302 Locate the files used to record outgoing messages in the directory specified by
2303 the \fBfolder\fR variable unless the path name is absolute. Disabled by
2304 default. See \fBfolder\fR above and the \fBS\fRave, \fBC\fRopy, \fBfo\fRllowup,
2305 and \fBF\fRollowup commands.
2314 Used with the \fBpi\fRpe command to insert a form feed after each message sent
2315 through the pipe. Disabled by default.
2321 \fB\fBpipeignore\fR\fR
2324 Omit ignored header when outputting to the \fBpipe\fR command. Although
2325 disabled by default, \fBpipeignore\fR is frequently set in the system startup
2326 file. See \fBStarting Mail\fR in USAGE above.
2332 \fB\fBpostmark\fR\fR
2335 Your "real name" to be included in the From line of messages you send. By
2336 default this is derived from the comment field in your \fBpasswd\fR(4) file
2343 \fB\fBprompt=\fR\fIstring\fR\fR
2346 Set the \fIcommand mode\fR prompt to \fIstring\fR. Default is "\fB? \fR",
2347 unless the \fBbsdcompat\fR variable is set, then the default is "\fB&\fR".
2356 Refrain from printing the opening message and version when entering
2357 \fBmailx\fR. Disabled by default.
2363 \fB\fBrecord=\fR\fIfile\fR\fR
2366 Record all outgoing mail in \fIfile\fR. Disabled by default. See also
2367 \fBoutfolder\fR above.
2373 \fB\fBreplyall\fR\fR
2376 Reverse the effect of the \fBr\fReply and \fBR\fReply and \fBfo\fRllowup and
2377 \fBFo\fRllowup commands. Although set by default, \fBreplayall\fR is
2378 frequently unset in the system startup file. See \fBflipr\fR and \fBStarting
2379 Mail\fR in USAGE above.
2385 \fB\fBreturnaddr=\fR\fIstring\fR\fR
2388 The default sender address is that of the current user. This variable can be
2389 used to set the sender address to any arbitrary value. Set with caution.
2398 Enable saving of messages in \fBdead-letter\fR on interrupt or delivery error.
2399 See \fBDEAD\fR for a description of this file. Enabled by default.
2405 \fB\fBscreen=\fR\fInumber\fR\fR
2408 Sets the number of lines in a screen-full of headers for the \fBh\fReaders
2409 command. \fInumber\fR must be a positive number.
2411 The default is set according to baud rate or window size. With a baud rate less
2412 than \fB1200\fR, \fInumber\fR defaults to \fB5\fR, if baud rate is exactly
2413 \fB1200\fR, it defaults to \fB10\fR. If you are in a window, \fInumber\fR
2414 defaults to the default window size minus 4. Otherwise, the default is
2421 \fB\fBsendmail=\fR\fIshell-command\fR\fR
2424 Alternate command for delivering messages. \fBNote:\fR In addition to the
2425 expected list of recipients, \fBmail\fR also passes the \fB-i\fR and \fB-m\fR,
2426 flags to the command. Since these flags are not appropriate to other commands,
2427 you may have to use a shell script that strips them from the arguments list
2428 before invoking the desired command. Default is \fB/usr/bin/rmail\fR.
2434 \fB\fBsendwait\fR\fR
2437 Wait for background mailer to finish before returning. Disabled by default.
2443 \fB\fBshowname\fR\fR
2446 Causes the message header display to show the sender's real name (if known)
2447 rather than their mail address. Disabled by default, but \fBshowname\fR is set
2448 in the \fB/etc/mail/mailx.rc\fR system startup file for \fBmailx\fR.
2457 When displaying the header summary and the message is from you, print the
2458 recipient's name instead of the author's name.
2464 \fB\fBsign=\fR\fIstring\fR\fR
2467 The variable inserted into the text of a message when the \fB~a\fR (autograph)
2468 command is given. No default (see also \fB~i\fR in \fBTilde Escapes\fR).
2476 \fB\fBSign=\fR\fIstring\fR\fR
2479 The variable inserted into the text of a message when the \fB~A\fR command is
2480 given. No default (see also \fB~i\fR in \fBTilde Escapes\fR).
2486 \fB\fBtoplines=\fR\fInumber\fR\fR
2489 The number of lines of header to print with the \fBto\fRp command. Default is
2499 Invoke \fBsendmail\fR(1M) with the \fB-v\fR flag.
2505 \fB\fBtranslate\fR\fR
2508 The name of a program to translate mail addresses. The program receives mail
2509 addresses as arguments. The program produces, on the standard output, lines
2510 containing the following data, in this order:
2515 the postmark for the sender (see the postmark variable)
2521 translated mail addresses, one per line, corresponding to the program's
2522 arguments. Each translated address will replace the corresponding address in
2523 the mail message being sent.
2529 a line containing only "y" or "n". if the line contains "y" the user will be
2530 asked to confirm that the message should be sent.
2532 The translate program will be invoked for each mail message to be sent. If the
2533 program exits with a non-zero exit status, or fails to produce enough output,
2534 the message is not sent.
2537 .SS "Large File Behavior"
2539 See \fBlargefile\fR(5) for the description of the behavior of \fBmailx\fR when
2540 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
2541 .SH ENVIRONMENT VARIABLES
2543 See \fBenviron\fR(5) for descriptions of the following environment variables
2544 that affect the execution of \fBmailx\fR: \fBHOME\fR, \fBLANG\fR,
2545 \fBLC_CTYPE\fR, \fBLC_TIME\fR, \fBLC_MESSAGES\fR, \fBNLSPATH\fR, and
2553 The name of the file in which to save partial letters in case of untimely
2554 interrupt. Default is \fB$HOME/dead.letter\fR.
2563 The command to run when the \fBe\fRdit or \fB~e\fR command is used. Default is
2573 The command (and options) to use when listing the contents of the \fBfolder\fR
2574 directory. The default is \fBls\fR(1).
2583 The name of the initial mailbox file to read (in lieu of the standard system
2584 mailbox). The default is \fB/var/mail/\fIusername\fR .\fR
2593 The name of the startup file. Default is \fB$HOME/.mailrc\fR.
2599 \fB\fBMAILX_HEAD\fR\fR
2602 The specified string is included at the beginning of the body of each message
2609 \fB\fBMAILX_TAIL\fR\fR
2612 The specified string is included at the end of the body of each message that is
2622 The name of the file to save messages which have been read. The \fBex\fRit
2623 command overrides this function, as does saving the message explicitly in
2624 another file. Default is \fB$HOME/mbox\fR.
2633 The command to use as a filter for paginating output. This can also be used to
2634 specify the options to be used. Default is \fBpg\fR(1), or if the
2635 \fBbsdcompat\fR variable is set, the default is \fBmore\fR(1). See \fBInternal
2645 The name of a preferred command interpreter. Default is \fBsh\fR(1).
2654 The name of a preferred screen editor. Default is \fBvi\fR(1).
2659 When the \fB-e\fR option is specified, the following exit values are returned:
2675 Mail was not found or an error occurred.
2680 Otherwise, the following exit values are returned:
2687 Successful completion. Notice that this status implies that all messages were
2688 \fBsent\fR, but it gives no assurances that any of them were actually
2704 \fB\fB$HOME/.mailrc\fR\fR
2708 personal startup file
2714 \fB\fB$HOME/mbox\fR\fR
2718 secondary storage file
2724 \fB\fB$HOME/.Maillock\fR\fR
2728 lock file to prevent multiple writers of system mailbox
2734 \fB\fB/etc/mail/mailx.rc\fR\fR
2738 optional system startup file for \fBmailx\fR only
2744 \fB\fB/tmp/R[emqsx]*\fR\fR
2754 \fB\fB/usr/share/lib/mailx/mailx.help*\fR\fR
2764 \fB\fB/var/mail/*\fR\fR
2768 post office directory
2773 See \fBattributes\fR(5) for descriptions of the following attributes:
2781 ATTRIBUTE TYPE ATTRIBUTE VALUE
2783 Interface Stability Standard
2788 \fBbiff\fR(1B), \fBecho\fR(1), \fBed\fR(1), \fBex\fR(1), \fBfmt\fR(1),
2789 \fBlp\fR(1), \fBls\fR(1), \fBmail\fR(1), \fBmail\fR(1B), \fBmailcompat\fR(1),
2790 \fBmore\fR(1), \fBpg\fR(1), \fBsh\fR(1), \fBvacation\fR(1),
2791 \fBvi\fR(1), \fBnewaliases\fR(1M), \fBsendmail\fR(1M), \fBaliases\fR(4),
2792 \fBpasswd\fR(4), \fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5),
2796 Where \fIshell-command\fR is shown as valid, arguments are not always allowed.
2797 Experimentation is recommended.
2800 Internal variables imported from the execution environment cannot be
2804 The full internet addressing is not fully supported by \fBmailx\fR. The new
2805 standards need some time to settle down.
2808 Replies do not always generate correct return addresses. Try resending the
2809 errant reply with \fBonehop\fR set.
2812 \fBmailx\fR does not lock your record file. So, if you use a record file and
2813 send two or more messages simultaneously, lines from the messages may be
2814 interleaved in the record file.
2817 The format for the \fBalias\fR command is a space-separated list of recipients,
2818 while the format for an alias in either the \fB\&.forward\fR or
2819 \fB/etc/aliases\fR is a comma-separated list.
2822 To read mail on a workstation running Solaris 1.\fIx\fR when your mail server
2823 is running Solaris 2.\fIx\fR, first execute the \fBmailcompat\fR(1) program.