Email is one of the most popular services on the Internet. Everyone likes the convenience of being able to communicate without having to play the game of 'phone tag,' in which two people leave telephone messages for each other without successfully making contact. When you send an email message, it waits in the recipient's mailbox to be read at the recipient's convenience.
Email started as a simple mechanism in which messages were copied to a user's mailbox file. That simple mechanism is still used. In Red Hat Linux, your mail messages are stored in the /var/spool/mail directory, in a text file with the same name as your user name.
Messages are addressed to a user name. That means if John Doe logs in with the user name jdoe, email to him is addressed to jdoe. The only other piece of information needed to identify the recipient uniquely is the fully qualified domain name of the recipient's system. Thus, if John Doe's system is named someplace.com, his complete email address becomes firstname.lastname@example.org. Given that address, anyone on the Internet can send email to John Doe.
Red Hat Linux comes with all the software you need to set up and use email on your Linux system. The following sections guide you through various aspects of setting up and using email on your Red Hat Linux system.
To set up and use email on your Red Hat Linux PC, you need two types of mail software:
Mail User Agent (MUA)-This software enables you to read your mail messages, write replies, and compose new messages. Typically, the mail-user agent retrieves messages from the mail server by using the POP3 or IMAP4 protocol. POP3 is the Post Office Protocol Version 3, and IMAP4 is the Internet Message Access Protocol Version 4. Red Hat Linux comes with mail-user agents such as pine and Ximian Evolution. Mozilla also includes a mail-user agent and a newsreader, besides the Web browser.
Mail Transport Agent (MTA)-This software actually sends and receives mail messages. The exact method used for mail transport depends on the underlying network. In TCP/IP networks, the mail-transport agent delivers mail using the Simple Mail Transfer Protocol (SMTP). Red Hat Linux includes sendmail, a powerful and popular mail-transport agent for TCP/IP networks.
Figure 15-1 shows how the MUAs and MTAs work with one another when Alice sends an email message to Bob.
The scenario in Figure 15-1 is typical of email exchanges. Alice and Bob both connect to the Internet through an ISP and get and send their email through their ISPs. When Alice types a message and sends it, her mail user agent (MUA) sends the message to her ISP's mail transfer agent (MTA) using the Simple Mail Transfer Protocol (SMTP). The sending MTA then sends that message to the receiving MTA-Bob's ISP's MTA-using SMTP. When Bob connects to the Internet, his MUA downloads the message from his ISP's MTA using the POP3 (or IMAP4) protocol. That's the way mail moves around the Internet-from sending MUA to sending MTA to receiving MTA to receiving MUA.
This chapter shows you how to use a predefined sendmail configuration file to get email going on your system. sendmail, however, is a very complex mail system. sendmail, 3rd Edition by Bryan Costales with Eric Allman (O'Reilly & Associates, December 2002) will help you learn to configure sendmail.
You should also visit http://www.sendmail.org/ and http://www.sendmail.net/ for a thorough description of sendmail features and configuration examples.
For answers to commonly asked questions about sendmail or to ask a question yourself, visit the newsgroup comp.mail.sendmail (see Chapter 16 for more on reading newsgroups and posting articles to them).