Go to the previous, next section.

How to receive mail

To receive mail, type the following command:

mail

The mail facility responds by printing a list of letters that are in your mailbox. This list looks something like the following:

Mail version SMI 4.0 Wed Oct 23 10:38:28 PDT 1991  Type ? for help.
"/usr/spool/mail/moeh": 1 message 1 new
>N  1 moeh@rigel.cs.pdx.edu Wed Sep  1 12:31   20/643  Help 
& 

In this list, "moeh" is the login of the user who sent you mail, and the quoted section on the right is the subject of the message.

Once inside the mail facility, you can do a variety of things, including the following: scan through the subject headings of your letters, read your mail, reply to it, delete it, forward it, or save it into files. The following is a list of commands that you can give a the ampersand (&) prompt:

t
displays the current letter
n
displays the next letter
d
delete current letter
u
undeletes last (or all) letters
h
lists your letter headers
R
replies to the sender(s) only
r
replies to sender(s) and recipient(s)
q
quits out of mail and saves changes (including deleted messages)
x
quits out of mail without saving changes (doesn't delete messages)

For a more complete list of mail commands, type a question mark (?) in response to the mail facility's ampersand (&) prompt.

The mail program can be configured by editing the file .mailrc. This file will let you define aliases and customize how mail works. Below is a example .mailrc file. Please read the man page on mail to find the details of the initialization parameters.

# .mailrc -- initialization for mail(1)
#
set append 
# ask for the subject
ask 
#start using the pager if the message is bigger than 22 lines.
crt=22 
dot 
folder=Mail 
hold
set nosave 
quiet 
#Don't display some header lines
ignore received message-id status
# set up an alias
alias rms rms@gnu.ai.mit.edu 

Go to the previous, next section.