Electronic mail has been an important part of the UNIX System from the beginning. UNIX was developed by AT&T, and an important goal was to make electronic communication as simple, transparent, and universal as telephony.
The UNIX System includes a rich set of tools for getting, sending, and managing mail. This chapter provides basic information on how to use e-mail effectively on your UNIX or Linux system. It describes the options you have for sending and receiving mail, explains how to use the most common mail programs, and has instructions on configuring these programs to match your specific needs.
There are two types of mail software. The first type includes the programs that handle the interactions between users and the mail system. These are the programs you use to read, send, and manage mail. This type of program is sometimes called a mail user agent (MUA), or a mail client.
The second type of mail software consists of the programs that take care of routing and moving messages between systems, and getting messages to the recipient’s mailbox. These are referred to as mail transport agents (MTAs).
This chapter is concerned with mail clients. Some mail clients have MTAs built in, so that they can communicate directly with the Internet. This allows them to send and receive remote mail. Other MTAs, such as sendmail, are discussed in Chapter 17.
In Chapter 2, you saw how to use mailx to view your mail. That was local mail, the mail that was sent to you on the system you were logged in to. Every UNIX system allows users to send and receive local mail. Your address for local mail is your username. Depending on how your system is connected to the Internet, you may have an e-mail address like corwin@amber.university.edu (where amber.university.edu is the hostname of your system) that allows you to exchange mail with people who are not on your system.
Remote mail is mail that is sent to an address on some other system. e.g., you may have an account with an ISP such as Comcast, AT&T, or Earthlink. In this case, your e-mail address would look something like gandalf@duckpond.net (where duckpond.net is the address for your ISP). Some UNIX mail programs allow you to download your mail from a remote server.
Webmail accounts allow you to access your e-mail over the web. This allows you to read your mail on any computer that has an Internet connection and a web browser. If you often use several different computers, webmail can be very convenient, since you can read your mail on any machine without setting up a mail client and without downloading all your messages. Popular webmail services include Google’s Gmail service, MSN Hotmail, and Yahoo! Mail
This chapter describes how to set up the UNIX mail programs to send and receive both local and remote mail. You do not need any special mail programs to view webmail on a UNIX system. Instead, see Chapter 10 for information about web browsers.
The UNIX mail programs can be classified by the type of user interface they provide.
Programs with command-line user interfaces These include the mail, mailx, and Mail commands. Because they lack important features like the ability to easily include attachments in e-mail, command-line mail programs are rarely chosen as a user’s primary mail client.
Screen-oriented programs The two primary screen-oriented mail clients are mutt and pine. Unlike the command-line programs, they allow you to move around in menus, compose mail with an editor, and include attachments in your e-mail. If you are not using a graphical interface like the X Window System, then you will probably want to use one of these programs for your mail. In addition, these programs are easier to configure for managing your local mail than the graphical applications described next.
Programs with graphical user interfaces (GUIs) These include a large number of third-party mail programs that run on X or other windowing systems. Currently, Thunderbird, KMail, and Evolution are some of the most popular graphical mail programs. If you are familiar with a program like Microsoft Outlook, you will find these applications fairly easy to use.
If you are using a graphical interface and you need to manage large amounts of e-mail, you will probably want to use one of these programs. They are also typically easier to configure for working with remote mail than the screen-oriented mail readers.
There are many e-mail clients available for UNIX. (You can even use emacs as a mail client, although not many people do.) Table 8–1 lists the major UNIX mail programs.
Command-Line Mail Clients | |
---|---|
Name | Notes |
| Most basic UNIX mail command. On some systems, mail is a link to one of the following two programs. |
mailx | An enhanced version of the mail command. Standard on Solaris, HP-UX, and other SVR4-based systems. |
| An enhanced version of mail. Standard on BSD and Linux systems. |
Screen-Oriented Mail Clients | |
Name | Notes |
elm | Older screen-oriented mail client that has been largely replaced by mutt. |
pine | Perhaps the most common screen-oriented mail client. Relatively easy to use. http://www.washington.edu/pine/ |
mutt | Popular screen-oriented mail client. Unlike pine, mutt uses your preferred editor (vi or emacs) for composing mail by default. http://www.mutt.org/ |
Graphical Mail Clients | |
Name | Notes |
Thunderbird | Currently the most popular graphical mail client for UNIX. Thunderbird is developed by Mozilla, along with the Firefox web browser. http://www.mozilla.com/thunderbird/ |
KMail | The KDE mail client. http://kmail.kde.org/ |
Evolution | The GNOME mail client. Includes a calendar and other organizational tools. http://www.gnome.org/projects/evolution/ |
Sylpheed | A comparatively lightweight e-mail client. Can run on Windows and Mac OS X. http://sylpheed.good-day.net/en/ |