[Return to Library] [Contents] [Previous Chapter] [Next Chapter] [Index] [Help]


D    Customizing Your mailx Session

You can customize your mailx session permanently by including in your .mailrc file any of the settings described in Table D-1. See the unset command in Appendix F for information about temporary settings.

Table D-1: Variables for Customizing Your mailx Session

Variable Type Description
allnet Binary All network names with the same login name are treated the same.
append Binary Saves messages in your mbox file in the order of arrival; the earliest message is the first message in the file. When this variable is unset, messages are saved in reverse order; the first message in the file is the most recent. The mailx program runs faster if append is set.
ask Binary Prompts you for a subject line when you send a message. Enter a blank line to send a message with no subject.
askcc Binary Prompts you for carbon-copy recipients for each message you send.
autoprint Binary Automatically displays the next message when you delete the current message. When autoprint is unset, mailx does not display the next message when you delete a message. In either case, the next message becomes your new current message.
bang String Enables the special-case treatment of the exclamation point (!) in escape command lines as in vi.
cmd String Allows the user to specify the default command to be used when using the vertical bar or pipe ( | ) command.
conv String Allows the user to specify how to convert UUCP style addresses for sendmail.
crt Numeric For use with a video display (CRT) terminal. Reads your mail one screenful at a time using the more program. The value tells mailx how many lines of the message to display before invoking the pager. For example:

set crt=20

DEAD String Allows the user to specify a different location for dead.letter. A dead letter will be written to $HOME/dead.letter by default.
debug Binary Displays debugging information.
dot Binary Interprets a period on a line by itself to be the end of a message. Do not unset dot and also set ignoreeof.
EDITOR String Specifies the pathname for the text editor to be used when you use the edit command or the ~e escape. For example:
set EDITOR=/usr/ucb/ex

If your terminal is a CRT terminal, you can specify a screen editor for this variable. See the VISUAL variable later in this table.
escape String Allows you to specify the escape character (the character that starts an escape command when you are in the middle of writing a message). The default is the tilde (~). You must specify a single character.
excode String Allows the user to specify the locale to be used when doing character conversion on outgoing mail messages.
folder String Specifies the directory for storing mail folders. A name beginning with a slash, such as /usr/users/hale, is an absolute pathname. A name without an initial slash is a pathname relative to your home directory. For example, the command set folder=folder indicates the directory /usr/users/hale/folder.
header Binary Prints the message header of messages when mailx is invoked.
hold Binary Prevents messages from being moved to your mbox file after you read them. Messages you have read are held in your system mailbox.
ignore Binary Ignores Ctrl/c interrupts, echoing them as "at" signs (@). Note that this variable is different from the ignore command described in Appendix F.
ignoreeof Binary Ignores Ctrl/d as the end of an outgoing message. Do not set ignoreeof and also unset dot.
indentprefix String Allows the user to specify a string to be inserted at the beginning of each line of text of a mail message that was included using the ~m command.
keep Binary Allows mailx to truncate your system mailbox instead of deleting it when it is empty. This is useful if you have set special permissions on your system mailbox for security reasons. If keep is unset, your system mailbox is deleted when it becomes empty; the next time it is created, you must reestablish your desired permissions.
keepsave Binary Prevents deletion of saved messages when you quit mail. Normally, the mailx program marks messages when you save them in other files or folders, and then deletes them from your system mailbox when you leave mailx. Setting keepsave makes mailx leave these messages in your system mailbox.
lang String Allows the user to specify the locale to be used for displaying the mail message.
LISTER String Allows the user to specify the command used by the folders commands.
MBOX String Allows the user to specify the location for the mbox folder. The mbox folder will normally be located in $HOME/mbox.
metoo Binary Includes you in the list of recipients when you send mail to an alias of which you are a member. If metoo is unset, you will not receive copies of messages sent to aliases of which you are a member.
noheader Binary Inhibits display of the header and version identification when you invoke mailx.
nosave Binary Prevents mailx from saving aborted messages as dead.letter in your home directory.
onehop Binary When responding to a message which contains other recipients, sometimes the addresses of the recipients are relative to the originator's address. The onehop option forces the delivery to not follow the path by which the message arrived and deliver it directly, thereby improving performance.
outfolder Binary Causes mailx to save outgoing mail messages in the directory specified in folder.
page Binary Causes a form feed to be inserted between messages that are processed by the pipe ( | ) command.
PAGER String Allows the user to specify the paging program of their choice to be used when displaying their messages. For example:

PAGER=/usr/bin/more or PAGER=/usr/bin/pg

prompt String Allows the user to change the mailx prompt when mailx is invoked. For example:

prompt=>>>

quiet Binary Supresses printing the version when first invoked and the message number when you use the type command.
record String Specifies the name of a file into which mailx will save copies of all outgoing messages.
Replayall Binary Reverses the function of the reply and Reply commands.
save Binary Allows the user to save mail messages into dead.letter.
sendwait Binary Causes mailx to wait until the message has been processed by the mailer. This option can cause some performance degradation from the users point of view since the user will have to wait until the message has been delivered.
SHELL String Allows the user to specify the shell to use when invoking the ~ or ~! commands.
screen Numeric Specifies the number of messages to be displayed in one screenful when you enter the headers command.
sendmail String Specifies the pathname of the program to use to send mail messages. If this variable is not specified, mailx uses the default delivery system. See your system administrator for information about alternate delivery systems.
showto Binary Displays the recipient's name instead of the author's name in message headers.
sign String Allows the user to specify a string to be inserted in the mail message when using the ~a command.
Sign String Allows the user to specify a string to be inserted in the mail message when using the ~A command.
toplines Numeric Specifies the number of lines the top command prints; the default is 5.
verbose Binary Invokes top in verbose mode; mailx then announces expansion of aliases as messages are sent.
VISUAL String Specifies the pathname for the screen editor that will be used when you use the visual command or the ~v escape. For example:
set VISUAL=/usr/ucb/vi

If your only terminal is a CRT, you can specify a screen editor for the EDITOR variable, too; then either edit (~e) or visual (~v) will invoke the same editor.

The following example shows the use of the verbose variable, discussed in the previous table, that causes mailx to display expansion of aliases as messages are sent:

set verbose
mail eve
Subject:  Meeting this afternoon
Enter message. Use Ctrl/d to terminate the letter.
Just a reminder, we're meeting at 2.
[Ctrl/d]

Cc:
/usr/users/debra/.forward: line 0: debra...
forwarding to debra@orange
debra... Connecting to .local...
debra... Sent