-->
Previous | Table of Contents | Next |
Some lines were displayed before the message itself began. This is the header informationand it can be useful. Typically, header information includes the following:
All this information is passed on with each e-mail message. The sender is always identified, making forgeries difficult. The real name that appears in the From line is taken from a field from the senders entry in the password file. The mail system uses the Return-Path or Reply-To information if you generate a reply (as discussed later in this chapter). The To line contains the address or list of addresses of the recipients of this message. (This sample message was a group message.) The sender filled in the Subject line.
Reading the Next Message
There are two ways to read the next message (the message following the current message in your mailbox). You can press <Return> or <n> to display the next message. It becomes the current message after you read it. You read the next message in the same way you read the current message. After you read the last message in the list, you see the message At EOF.
Reading Any Message
All the messages in your mailbox are numbered. You can read messages in any order by entering the message number when you see the ? prompt. For example, to read message number 2, type 2 and press <Return>. Message number 2 then becomes the current message.
When you start mail, you read messages kept in your system mailbox, which has the path /var/spool/mail/$LOGNAME. Recall from Chapter 18, Understanding Linux Shells, that LOGNAME is the shell variable that holds your login name. If you log in as bkorn, your mail is held in /var/spool/mail/bkorn. You can read mail from other files that hold complete e-mail messagesthat is, messages with the headers and text of the messages. Naturally, you must have read permission for those files.
To read messages from a file, type the command to start the e-mail program followed by -f filename, and press <Return>. For example, to read the e-mail in the file mbox, enter this command:
mail -f mbox|
You can read the mail in that file in the same way you read e-mail from your system mailbox.
NOTE: The mbox file is located in your home directory and automatically contains messages youve already read but havent deleted. These messages are saved to mbox when you exit mail.
You can send e-mail while youre using the mail program to read your messages. To do so, enter m address at the ? prompt. Follow these steps:
m ernie
Subject: Game Time
Dont forget were playing V-ball at 6:30 .
EOT ?
By using mail, you can print the current message to a printer connected to your system. First, make the message you want to print the current message. Then enter | lpr at the ? prompt. You are, in effect, piping the current message to the lpr program.
To print a collection of messages, save them in a file and then print the file. See the section Saving E-Mail to Files with mail, later in this chapter, for information on effective ways to save messages.
Previous | Table of Contents | Next |