Using Configuring sendmail
In this module, we will examine how electronic mail is used on UNIX machines. Specifically, we’ll examine the
sendmail program, the most widely used email agent on UNIX systems. While
sendmail can be
notoriously difficult to configure, newer versions of the program automate this process and make
to use from a system administrator’s point of view.
After completing this module, you will be able to:
- Explain the email process and the use of agents
- List the major responsibilities of the
- Describe how
sendmail uses the SMTP protocol to forward email across the Internet
- Use a .mc template file and M4 to create a
sendmail configuration file automatically
- Test a new
sendmail configuration before deploying it
nslookup to view MX records
Linux System Administration
Advantages of Email
Imagine yourself with pen and paper, writing a letter to a colleague far away. You finish the letter and sign it, reflect on what you’ve written, then put the letter into an envelope. You put your colleague’s address on the front, your return address in the lefthand corner, and a stamp in the righthand corner, and the letter is ready for mailing. Electronic mail (email for short) is prepared in much the same way, but a computer is used instead of pen and paper. The post office transports real letters in real envelopes, whereas sendmail transports electronic letters in electronic envelopes.
If your colleague (the recipient) is in the same neighborhood (on the same machine), only a single post office (sendmail running locally) is involved. If your colleague is in a distant location, the mail message will be forwarded from the local post office (sendmail running locally) to a distant one (sendmail running remotely) for delivery. Although sendmail is similar to a post office in many ways, it is superior in others:
- Delivery typically takes seconds rather than days.
- Address changes (forwarding) take effect immediately, and mail can be forwarded anywhere in the world.
- Host addresses are looked up dynamically. Therefore, machines can be moved
or renamed and email delivery will still succeed.
- Mail can be delivered through programs that access other networks (such as
Unix to Unix Communication Protocol [UUCP] and Bitnet). This would be like
the post office using United Parcel Service to deliver an overnight letter.