The following is taken from the mail manual pages. These are the configuration variables that you can set or unset in your .mailrc file. The mail program assumes your .mailrc is in your main directory unless you state otherwise in your .login file.
Examples on setting these variables:
prompt% cat .mailrc
set askcc <-- will give you a Cc: prompt after message is entered
set crt=25 <-- message text longer than 25 lines will be piped
through "more".
set indentprefix=">" <-- when you quote other peoples mail (using the
tilde escapes ~m or ~f), use ">" as the
indent character.
Mail Variables
The following variables can be initialized within the
.mailrc file, or set and altered interactively using the set
command. They can also be imported from the environment (in
which case their values cannot be changed within mail). The
unset command clears variables. The set command can also be
used to clear a variable by prefixing the word no to the
name of the variable to clear.
Variables for which values are normally supplied are indi-
cated with an equal-sign (=). The equal-sign is required by
the set command, and there can be no spaces between the
variable-name, equal-sign, and value, using set to assign a
value.
allnet All network names whose last component (login
name) match are treated as identical. This
causes the message list specifications to
behave similarly. Default is noallnet. See
also the alternates command and the metoo
variable.
alwaysignore Ignore header fields with ignore everywhere,
not just during print or type. Affects the
save, Save, copy, Copy, top, pipe, and write
commands, and the ~m and ~f tilde escapes.
append Upon termination, append messages to the end
of the mbox file instead of prepending them.
Default is noappend but append is set in the
global start-up file (which can be suppressed
with the -n command line option).
askcc Prompt for the Cc list after message is
entered. Default is noaskcc.
asksub Prompt for subject if it is not specified on
the command line with the -s option. Enabled
by default.
autoprint Enable automatic printing of messages after
delete and undelete commands. Default is
noautoprint.
bang Enable the special-casing of exclamation
points (!) in shell escape command lines as in
vi(1). Default is nobang.
cmd=shell-command
Set the default command for the pipe command.
No default value.
conv=conversion
Convert uucp addresses to the address style
specified by conversion, which can be either:
internet
This requires a mail delivery program
conforming to the RFC822 standard for
electronic mail addressing.
optimize
Remove loops in uucp(1C) address paths
(typically generated by the reply com-
mand). No rerouting is performed; mail
has no knowledge of UUCP routes or con-
nections.
Conversion is disabled by default. See also
sendmail(8) and the -U command line option.
crt=number Pipe messages having more than number lines
through the command specified by the value of
the PAGER variable (more by default). Dis-
abled by default.
DEAD=filename
The name of the file in which to save partial
letters in case of untimely interrupt or
delivery errors. Default is the file
dead.letter in your home directory.
debug Enable verbose diagnostics for debugging.
Messages are not delivered. Default is node-
bug.
dot Take a period on a line by itself during input
from a terminal as EOF. Default is nodot but
dot is set in the global start-up file (which
can be suppressed with the -n command line
option).
editheaders Include message headers in the text to be
edited by the ~e and ~v commands.
EDITOR=shell-command
The command to run when the edit or ~e command
is used. Default is ex(1).
escape=c Substitute c for the ~ escape character.
folder=directory
The directory for saving standard mail files.
User specified file names beginning with a
plus (+) are expanded by preceding the
filename with this directory name to obtain
the real filename. If directory does not
start with a slash (/), the value of HOME is
prepended to it. There is no default for the
folder variable. See also outfolder below.
header Enable printing of the header summary when
entering mail. Enabled by default.
hold Preserve all messages that are read in the
system mailbox instead of putting them in the
standard mbox save file. Default is nohold
for mail and hold for mailtool(1).
ignore Ignore interrupts while entering messages.
Handy for noisy dial-up lines. Default is
noignore.
ignoreeof Ignore EOF during message input. Input must
be terminated by a period (`.') on a line by
itself or by the `~.' command. Default is
noignoreeof. See also dot above.
indentprefix=string
When indentprefix is set, string is used to
mark indented lines from messages included
with ~m. The default is a TAB character.
keep When the system mailbox is empty, truncate it
to zero length instead of removing it. Dis-
abled by default.
keepsave Keep messages that have been saved in other
files in the system mailbox instead of delet-
ing them. Default is nokeepsave.
LISTER=shell-command
The command (and options) to use when listing
the files in the folder directory. The
default is ls(1V).
MBOX=filename
The name of the file to save messages which
have been read. The xit command overrides
this variable, as does saving the message
explicitly to another file. Default is the
file mbox in your home directory.
metoo If your login appears as a recipient, do not
delete it from the list. Default is nometoo.
no When used as a prefix to a variable name, has
the effect of unsetting the variable.
onehop When responding to a message that was origi-
nally sent to several recipients, the other
recipient addresses are normally forced to be
relative to the originating author's machine
for the response. This flag disables altera-
tion of the recipients' addresses, improving
efficiency in a network where all machines can
send directly to all other machines (that is,
one "hop" away).
outfolder Locate the files used to record outgoing mes-
sages in the directory specified by the folder
variable unless the pathname is absolute.
Default is nooutfolder. See folder above and
the Save, Copy, followup, and Followup com-
mands.
page Used with the pipe command to insert a form
feed after each message sent through the pipe.
Default is nopage.
PAGER=shell-command
The command to use as a filter for paginating
output, along with any options to be used.
Default is more(1).
prompt=string Set the command mode prompt to string.
Default is `&'.
quiet Refrain from printing the opening message and
version when entering mail. Default is
noquiet.
record=filename
Record all outgoing mail in filename. Dis-
abled by default. See also the variable out-
folder.
replyall Reverse the effect of the reply and Reply
commands.
save Enable saving of messages in the dead.letter
file on interrupt or delivery error. See DEAD
for a description of this file. Enabled by
default.
screen=number Set the number of lines in a screen-full of
headers for the headers command.
sendmail=shell-command
Alternate command for delivering messages.
Note: in addition to the expected list of
recipients, mail also passes the -i and -m,
flags to the command. Since these flags are
not appropriate to other commands, you may
have to use a shell script that strips them
from the arguments list before invoking the
desired command.
sendwait Wait for background mailer to finish before
returning. Default is nosendwait.
SHELL=shell-command
The name of a preferred command interpreter.
Typically inherited from the environment, the
shell is normally the one you always use.
Otherwise defaults to sh(1).
showto When displaying the header summary and the
message is from you, print the recipient's
name instead of the author's name.
sign=autograph
The autograph text inserted into the message
when the ~a (autograph) command is given. No
default (see also the ~i tilde escape).
Sign=autograph
The autograph text inserted into the message
when the ~A command is given. No default (see
also the ~i tilde escape).
toplines=number
The number of lines of header to print with
the top command. Default is 5.
verbose Invoke sendmail with the -v flag.
VISUAL=shell-command
The name of a preferred screen editor.
Default is vi.