You can receive and read your incoming email by using the mail command again.
Here's a sample mail session (text in bold is what you would enter):
Mail version 5.6 6/1/95. Type ? for help.
"/var/spool/mail/hermie": 1 message 1 new
>N 1 [email protected] Mon Feb 10 14:58 "Gone Fishing"
>N 2 [email protected] Mon Feb 10 15:37 "Make Money Fast!"
N 3 [email protected] Mon Feb 10 15:37 "Tennis, Anyone?"
& 1
Message 1:
Date: Mon, 10 Feb 1997 14:58:12 -0500
From: [email protected]
To: [email protected]
Subject: Gone Fishing
I've decided to kick back this afternoon and go fishing.
So if this crazy Linux system rolls over and dies,
I suggest you do likewise.
& q
Saved 1 message in /home/hermie/mbox
Held 2 messages in /var/mail/spool/hermie
Let's look at what just happened. After you entered the mail command, the system informed you of the version of the mail program that is running and told you how to get help for it.
The next line tells you that there is one new message in your mailbox, and that your incoming mail is stored in the file /var/spool/mail/hermie. (Each user on the system has a mail file in the /var/spool/mail directory.) When new mail arrives, Linux tacks it onto the end of the recipient's mail file.
Note: You should never directly edit your mail file--always use mail or another email program to handle your mail. (If you're editing your mail file when a new message arrives, it will be lost.) But it's quite all right to scan your mail file with grep or some other utility that doesn't try to modify it. (You might want to apply grep to your mail to find a particular string, such as the email address of a person who has corresponded with you.)
The next line,
>N 1 [email protected] Mon Feb 10 14:58 "Gone Fishing"
is referred to as a header line, and it tells you a number of things. The > tells you which message is the current one--the one you're working with.
The N 1 indicates that you're dealing with message 1 and that it's flagged as a new message. (Later, the flag could be U for unread or O for an old message.) The rest of the line tells you who the message is from, when it was sent, and the Subject line.
The ampersand (&) on the following line is the mail prompt. In this example, we entered a 1 to display the first message, and the message text is shown on the lines that follow. Unfortunately, we can't tell from the context whether to roll over and die or just go fishing.
Previous Lesson: Sending Email
Next Lesson: Other Mail Commands
Comments - most recent first
|
|
||