command has two distinct usages, according to whether one
wants to send or receive mail. Sending mail is simple: to send a
message to a user whose login name is, say,
then type your message. When you reach the end of the message, type
an EOT (control\-d) at the beginning of a line, which will cause
to echo \*(lqEOT\*(rq and return you to the Shell. When the user you sent mail
to next logs in, he will receive the message:
to alert him to the existence of your message.
If, while you are composing the message
you decide that you do not wish to send it after all, you can
abort the letter with a \s-2RUBOUT\s0. Typing a single \s-2RUBOUT\s0
(Interrupt -- one more to kill letter)
to save your partial letter on the file
in your home directory and abort the letter.
sent mail to someone, there is no way to undo the act, so be
The message your recipient reads will consist of the message you
typed, preceded by a line telling who sent the message (your login name)
If you want to send the same message to several other people, you can list
their login names on the command line.
Tuition fees are due next Friday. Don't forget!!
will send the reminder to sam, bob, and john.
If, when you log in, you see the message,
you can read the mail by typing simply:
will respond by typing its version number and date and then listing
the messages you have waiting. Then it will type a prompt and await
your command. The messages are assigned numbers starting with 1 \*- you
refer to the messages with these numbers.
keeps tack of which messages are
(have been sent since you last read your mail) and
(have been read by you). New messages have an
next to them in the header listing and old, but unread messages have
keeps track of new/old and read/unread messages by putting a
To look at a specific message, use the
command, which may be abbreviated to simply
For example, if you had the following messages:
N 1 root Wed Sep 21 09:21 "Tuition fees"
you could examine the first message by giving the command:
to respond with, for example:
From root Wed Sep 21 09:21:45 1978
Tuition fees are due next Wednesday. Don't forget!!
commands that operate on messages take a message number as an
command. For these commands, there is a notion of a current
message. When you enter the
program, the current message is initially the first one. Thus,
you can often omit the message number and use, for example,
to type the current message. As a further shorthand, you can type a message
by simply giving its message number. Hence,
would type the first message.
Frequently, it is useful to read the messages in your mailbox in order,
one after another. You can read the next message in
by simply typing a newline. As a special case, you can type a newline
to type the first message.
If, after typing a message, you wish to immediately send a reply,
takes a message number as an argument.
then begins a message addressed to the user who sent you the message.
You may then type in your letter in reply, followed by a <control-d>
at the beginning of a line, as before.
will type EOT, then type the ampersand prompt to indicate its readiness
to accept another command. In our example, if, after typing the
first message, you wished to reply to it, you might give the command:
Subject: Re: Tuition fees
and waiting for you to enter your letter.
You are now in the message collection mode described at the beginning
will gather up your message up to a control\-d.
Note that it copies the subject
header from the original message. This is useful in that correspondence
about a particular matter will tend to retain the same subject heading,
making it easy to recognize. If there are other header fields in
the message, the information found will also be used.
For example, if the letter had a
header listing several recipients,
would arrange to send your replay to the same people as well.
Similarly, if the original message contained a
(carbon copies to) field,
is careful, though, not too send the message to
even if you appear in the
field, unless you ask to be included explicitly. See section 4 for more
After typing in your letter, the dialog with
might look like the following:
command is especially useful for sustaining extended conversations
over the message system, with other
users receiving copies of the conversation. The
command can be abbreviated to
Sometimes you will receive a message that has been sent to
several people and wish to reply
to the person who sent it.
replies to a message, but sends a copy to the sender only.
If you wish, while reading your mail, to send a message to someone,
but not as a reply to one of your messages, you can send the message
command, which takes as arguments the names of the recipients you wish
to send to. For example, to send a message to
This is to confirm our meeting next Friday at 4.
command can be abbreviated to
Normally, each message you receive is saved in the file
in your login directory at the time you leave
however, you will not want to save a particular message you
have received because it is only of passing interest. To avoid
you can delete it using the
from saving message 1 (from root) in
In addition to not saving deleted messages,
you type them, either. The effect is to make the message disappear
altogether, along with its number. The
command can be abbreviated to simply
can be tailored to your liking with the
command has two forms, depending on whether you are setting
Binary options are either on or off. For example, the
that each time you send a message, you want it to prompt you for
a subject header, to be included in the message.
moves the messages from your system mailbox to the file
in your home directory when you leave
to keep your letters in the system mailbox instead, you can set the
Valued options are values which
uses to adapt to your tastes. For example, the
which shell you like to use, and is specified by
for example. Note that no spaces are allowed in
options appears in section 5.
Another important valued option is
If you use a fast video terminal, you will find that when you
print long messages, they fly by too quickly for you to read them.
print any message larger than a given number of lines by sending
it through the paging program
For example, most CRT users should do:
to paginate messages that will not fit on their screens.
prints a screenful of information, then types --MORE--. Type
a space to see the next screenful.
Another adaptation to user needs that
An alias is simply a name which stands for one or more
sent to an alias is really sent to the list of real users
associated with it. For example, an alias can be defined for the
members of a project, so that you can send mail to the whole project
by sending mail to just a single name. The
defines an alias. Suppose that the users in a project are
named Sam, Sally, Steve, and Susan. To define an alias called
for them, you would use the
alias project sam sally steve susan
command can also be used to provide a convenient name for someone
whose user name is inconvenient. For example, if a user named
so that you could send mail to the shorter name,
commands allow you to customize
they have the drawback that they must be retyped each time you enter
To make them more convenient to use,
always looks for two files when it is invoked. It first reads
then a user specific file,
which is found in the user's home directory.
is maintained by the system administrator and
commands that are applicable to all users of the system.
file is usually used by each user to set options the way he likes
and define individual aliases.
For example, my .mailrc file looks like this:
set ask nosave SHELL=/bin/csh
As you can see, it is possible to set many options in the
option is described in section 5.
Mail aliasing is implemented
These aliases are stored in the file /usr/lib/aliases and are
accessible to all users of the system.
The lines in /usr/lib/aliases are of
alias: name\*<1\*>, name\*<2\*>, name\*<3\*>
is the mailing list name and the
are the members of the list. Long lists can be continued onto the next
line by starting the next line with a space or tab. Remember that you
must execute the shell command
after editing /usr/lib/aliases since the delivery system
uses an indexed file created by
can be invoked with command line arguments which are people
to send the message to, or with no arguments to read mail.
flag on the command line causes
to read messages from a file other than your system mailbox.
For example, if you have a collection of messages in
commands described in this document to examine, modify, or delete
file, which will be rewritten when you leave
Since mail that you read is saved in the file
in your home directory by default, you can read
in your home directory by using simply
Normally, messages that you examine using the
command are saved in the file
in your home directory if you leave
If you wish to retain a message in your system mailbox
command accepts a list of message numbers, just like
and may be abbreviated to
Messages in your system mailbox that you do not examine are
normally retained in your system mailbox automatically.
If you wish to have such a message saved in
without reading it, you may use the
command to have them so saved. For example,
in our example would cause the second message (from sam)
is also the way to direct messages to your
When you have perused all the messages of interest, you can leave
command, which saves the messages you have typed but not
in your login directory. Deleted messages are discarded irretrievably,
and messages left untouched are preserved in your system mailbox so
that you will see them the next time you type:
command can be abbreviated to simply
If you wish for some reason to leave
quickly without altering either your system mailbox or
which will immediately return you to the Shell without changing anything.
If, instead, you want to execute a Shell command without leaving
can type the command preceded by an exclamation point, just as in the
text editor. Thus, for instance:
will print the current date without leaving
command is available to print out a brief summary of the
commands, using only the single character command abbreviations.