FREE EBOOKS
Free Network Tools

Free ebook "The qmail Handbook" Sample Chapter

The qmail Handbook
Free download Chapter 1: Introducing qmail
Download chapter

The qmail Handbook is designed to guide system and mail administrators of all skill levels through the installation, configuration, and maintenance of the qmail server. Author Dave Sill, a long-time qmail user, system administrator, and technical support agent (as well as the author of the popular online tutorial "Life with qmail"), provides you with the practical tools to work with this popular mail server.

Sill begins with a discussion of qmail's architecture and features, and then delves into a thorough investigation of the installation and configuration processes. You'll learn how to install qmail on several operating systems, and gain valuable insight into proper configuartion, testing procedures, and performance tuning. You'll also learn how to administer users and mail, install filters, and oversee daily qmail operation and maintenance. Throughout, Sill focuses on topics essential to all mail administrators, elaborating on such subjects as configuring mailing list managers, controlling spam, secure networking, scanning for viruses, hosting virtual domains and users, and creating dial-up clients.

The qmail Handbook is the ultimate resource for administrators and developers needing to master the functionality of this powerful software.

< < prev next > >

Introducing qmail

ANDY WANTS TO SEND AN e-mail message to his friend Josh. He opens his mail client, clicks on New Mail, enters Josh's address in the To field, fills in the Subject field with a short description of the message, and types the message into the large editing area of the form. When he's done, he clicks on the Send button. As far as he's concerned, the message is sent, but behind the scenes, complicated machinery whirs to life. A thousand tiny steps will be executed on Andy's behalf by processes on various systems between Andy and Josh-who could be in the same room or half a world away.

The Internet Message Transfer Agent (MTA) is the key player in the behind the-scenes e-mail infrastructure-it's the machinery that moves e-mail from the sender's system to the recipient's system.

Before the Internet explosion in the early 1990s, one MTA, Sendmail, was responsible for delivering almost all of the mail. But Sendmail was designed for an Internet unlike the modern Internet. At the time Sendmail was created, there were only a handful of systems on the entire Internet, and most of the people online knew each other. It was a friendly, cooperative community that consisted mostly of the people who wrote the software that made the Internet work or managed the hardware that it connected. Security was not a major concern: There was not much that needed protection, and there were few potential "bad guys" from which to be protected.

The modern Internet is very different. It's millions of times larger, so knowing all the other administrators and users is impossible. In fact, it's accessible by anyone with access to a public library. Billions of dollars in business and consumer commerce takes place annually over the Internet. Large corporations exist whose entire business model relies on their Internet presence. As such, the stakes are high, and it's no longer possible to treat security casually. On top of all this, servers are being subjected to staggering loads-a typical mail server today might send more messages in one day than a mail server ten years ago sent in one year.

The Sendmail developers have worked hard over the years to enhance its security and performance, but there's only so much that can be done without a fundamental redesign. In 1995, Daniel J. Bernstein, then a mathematics graduate student at the University of California, Berkeley, began designing and implementing an MTA for the modern Internet: qmail.

While Sendmail is one huge, complex program that performs its various functions as the superuser (the all-powerful Unix root account), qmail is a suite of small, focused programs that run under different accounts and don't trust each other's input to be correct.

While Sendmail plods through a list of recipients delivering one message at a time, qmail spawns twenty or more deliveries at a time. And because qmail's processes are much smaller than Sendmail's, it can do more work faster, with fewer system resources. Further, Sendmail can lose messages in some of its delivery modes if the system crashes at the wrong time. For reliability, speed, and simplicity, qmail has one crash-proof delivery mode.

Overview

This chapter introduces the concept of the MTA and discusses one particular MTA, qmail:

  • First, we'll examine the role of the MTA in the Internet e-mail infrastructure.
  • Next, we'll look at qmail-what it does and why you might want to use it.
  • qmail's main design goals were security, reliability, performance, and simplicity. We'll see how qmail's creator was able to achieve these goals.
  • We'll also compare qmail to other popular Unix MTAs such as Sendmail, Postfix, Courier, and Exim.
  • Next, we'll look at qmail's features, history, architecture, and distribution license.
  • Finally, we'll list various sources of information on qmail such as documentation, Web sites, and mailing-list archives. We'll also cover qmail support channels: mailing lists and hired consultants.

What Is qmail?

qmail is an Internet MTA for Unix and Unix-like operating systems. An MTA's function is twofold: to accept new messages from users and deliver them to the recipient's systems, and to accept messages from other systems, usually intended for local users.

Users don't usually interact directly with MTAs; they use Mail User Agents (MUAs)-the familiar mail programs such as Outlook Express, Eudora, Pine, or Mutt that users run on their desktop systems. Figure 1-1 shows how all of these agents interact with each other.

qmail is a drop-in replacement for the Sendmail system provided with most Unix operating systems. What that means is that the user of a system will not necessarily notice a switch from Sendmail, or some other MTA, to qmail. This does not mean that the system administrator won't see a difference. Although all MTAs perform the same functions, they differ widely in installation, configuration, and functionality. Don't assume that your ability to manage Sendmail will let you get up to speed quickly with qmail: It won't. In fact, detailed knowledge of another MTA might even slow you down because you'll be unlearning that system in addition to learning qmail.