-->
Previous Table of Contents Next


What Do I Do with My Messages?

After you read a message, the shell presents you with a different prompt:


     &

asking for a response related to the mail program. There are many actions you can take at this point; the handiest options are listed in Table 9.1.

Table 9.1 A Selection of Mail Commands
Command Result

Return Prints next message.
- Prints previous message.
d Deletes current message.
dN Deletes message N.
dp Deletes current message and goes to the next message.
dq Deletes current message and quit.
u N Undeletes message N.
s filename Saves message to filename; if filename is not specified, message is saved to $HOME/mbox.
w filename Saves message without header information to filename; if filename is not specified, message is saved to $HOME/mbox.
? Lists mail commands.

Saving Messages

As we saw in Table 9.1, saving a message is simply a matter of typing:


     ? s filename

If you don’t get many messages, it’s no big deal to save them all to the same file. But if you get a lot of messages on many topics, it’s a good idea to introduce some organization to your mail habits.

Let’s say you’re working on a project with user erc, and you want to keep all of his mail messages in the same file. You do so with the s option at the ? prompt:


     ? s erc

where erc is the name of the file containing his mail messages. When you do this the first time, the shell creates a file named erc. Subsequent uses will append mail messages to the existing erc file.

To read this file, use mail with the -f option:


     gilbert:/$ mail -f erc

Don’t make the mistake of assuming your electronic mail messages are private. Because mail messages normally appear in unencrypted text files, anyone with superuser privileges, such as your system administrator, can read your mail.

Few businesses have policies regarding the privacy of electronic mail communications. When in doubt, assume that your boss can read your mail.

Other Mail Packages

As you can tell, mail sports an exceedingly primitive interface. Over the years, a crop of new mail programs have appeared, some commercial software and some free, each of which aims at making life easier for the user. Some of the free ones are included with Linux.

Xmh is an X Window front end to mh, as shown in Figure 9.4.


Figure 9.4  Xmh in action.

Pine is another popular electronic-mail program, shown in Figure 9.5.


Figure 9.5  Pine in action.

Finally, there’s elm, which is one of our favorites. Elm stands for electronic mail and it works by providing an easy-to-use interface over the standard mail program.

The basic elm screen looks like that shown in Figure 9.6.


Figure 9.6  The elm mail program.

You can use the arrow keys on your keyboard to select a message. Pressing Return reads the message. Elm is so simple, fast and easy that we think you’ll soon be a convert. The online help, available by typing a question mark (?), should get you going in no time. (Like many users, we’re often too busy to read the manual. In fact, we’ve never read the elm manual—the program is that easy.)

If you’ve been observant, you’ve noticed that all the programs shown in this section work from the same mail file. This is no accident; to prevent multiple mail files from popping up all over your Linux system (as well as the entire UNIX system, if you’re networked), the mail packages work from the same incoming-mail file.

Linux also supports a series of commands that allow MIME attachments to mail messages, which is a very popular way to attach files to mail messages in a manner that almost any other Internet e-mail user can understand.


Previous Table of Contents Next