-->
Previous Table of Contents Next


Chapter 33
Using Electronic Mail

by Steve Burnett

In this chapter
Understanding E-Mail
Sending E-Mail with mail
Reading Your Mail
Printing Mail Messages
Getting Help with mail
Saving E-Mail to Files with mail
Deleting and Undeleting Messages with mail
Replying to E-Mail with mail
Routing Mail to Others
Customizing Your mail Environment
Quitting the mail Program
Using the elm Mailer
Using the Mutt E-Mail Client

Electronic mail, or e-mail, seems to have taken the world by storm. Millions of computer users worldwide have access to electronic mail. A large number of commercial networks or Internet service providers (ISPs) can give you or your organization access to electronic mail around the world.

Understanding E-Mail

E-mail is any program that users on a single computer system or a network of systems use to send and receive electronic messages. At a minimum, you provide the program with the address of the recipient and the message you want to send. The address includes the login name of the person who is to receive the mail. If that user is on another system in a network, the address also includes a means of identifying the target computer system. You either prepare the message while you’re using your e-mail program, or you prepare it beforehand by using a text editor such as vi.


See “Using vi,” p. 181

Using electronic mail has several advantages:

  You can send reports, data, and documents that can reach their destination in a matter of seconds or minutes.
  You don’t have to worry about interrupting someone when you send a message, nor are you necessarily interrupted when you receive messages—that’s handled by the computer system.
  You don’t need to play phone tag or make an appointment to communicate with someone.
  You can send and receive at a convenient time.

When you send e-mail, it’s up to the computer system to make the delivery, which can involve putting your message out on a network to be delivered at some other site. At this point, you say that the mail has been sent. Soon after that, the message arrives at the recipient’s machine.

If the sender and the receiver are on the same computer system, the sending and receiving all takes place on one machine. The e-mail system on the target computer verifies that the addressee exists, and the message is added to a file that holds all the e-mail for that user (if no network is involved, the local computer system verifies the addressee). The mail-storage file is called the user’s system mailbox and usually has the same name as the user who’s receiving the mail. For example, if your login name is george, your system mailbox is the file named george in the directory /var/spool/mail. When the message has been “delivered” to the mailbox, you say that the mail has been received.


NOTE:  There’s a common kind of e-mail, called Post Office Protocol (POP) mail, where e-mail is stored on a remote system and is then retrieved as you read mail. This chapter assumes that you’re running a full mail system on your Linux computer, complete with the sendmail program, which handles the background jobs of sending and receiving e-mail.

Figure 33.1 shows the relationship between sending and receiving e-mail.


FIG. 33.1  Sending and receiving e-mail.

Does the Mail Always Get Through?

When you send e-mail, you may see a message on-screen that says Mail Sent! This means that the mail has been sent—not that it has been received or delivered. Usually, your e-mail system will notify you if your message can’t be delivered.

E-mail messages may not go through for several reasons. If mail is going out to a network, the network address may be correct but the name of the user on that network may not be correct. Or perhaps the complete address is correct, but because of problems with permissions or quotas, the message couldn’t be placed in the user’s system mailbox. In both cases, the mail was sent but was undeliverable. Another scenario is that the e-mail was delivered but the user’s mailbox was corrupted or destroyed. A final possibility is that the recipient ignores e-mail or doesn’t log in for several days, weeks, or more.

Your computer system notifies you when you have mail. When you read your e-mail, you can treat it on a message-by-message basis. Some of the things you can do with your mail are the following:

  Delete individual messages after you read them—or without bothering to read them (using e-mail doesn’t mean that you won’t get junk mail).
  Keep some messages in the system mailbox.
  Keep some messages in a personal mailbox.
  Keep other messages in individual files or folders.
  Reply directly to the sender of a message.
  Do a “group reply” to a group of users who all received the same message.
  Forward mail to others.
  Print your mail.

It’s up to you to manage your mail so that it doesn’t take up any more disk space than necessary. You most certainly don’t have to save every piece of e-mail you get. You’ll also see that it’s easier to read your incoming mail if you regularly delete or remove messages from your system mailbox.

Several different e-mail programs are available for Linux, including e-mail programs that are integrated with Web browsers such as Netscape. The most common e-mail interface, available on virtually every UNIX environment, is mail. With the mail program, you can do the following:

  Manage and view your e-mail.
  Include a subject header on e-mail you send.
  Include a cc header for sending copies of e-mail to others.
  Forward e-mail to others.
  Set up mailing lists.

This section shows examples of mail. Later in the chapter, you’re introduced to another mail program for Linux—the elm mailer.


Previous Table of Contents Next