Introduction: Setting up Mail Services in Linux

The concept of this class is that you come in possessing basic Linux Sysadmin skills and leave being able to bring up your own mail services for yourself or a corporation.

We're going to begin by following a complete mail transaction: the sending of an email, its travel across the internet, its acceptance at your local Mail server, and then its download to an email program. We'll briefly discuss email concepts and terms as we go along. Next we'll go over an example mail server setup using Red Hat Linux 8.0 and its default settings. We'll end with a brief look at Sendmail and explore the mysteries of its main configuration file:

I'm assuming no prior knowledge of Mail servers or POP/IMAP services.

Why are we focusing on Red Hat?

Red Hat is the most widely used distribution in this area. It is also a widely accepted standard for corporate class servers. Red Hat version 8.0 happens to be the latest offering from Red Hat as of this writing.

The concepts and the basic steps apply to any Linux distribution when bringing up Mail services, so it should prove useful as an overview to just about anyone involved in the system side of Mail service.

Red Hat's 8.0 distribution also has a nice Sendmail install setup by default.

Why are we focusing on Sendmail?

Sendmail is the default of many distributions and is a true work-horse. It is one of the best known and widely used MTA's on the Internet. If your DNS is setup properly, then Sendmail simply works "out of the box". It is also the De-facto Mailserver: everything written for a mail system (on Unix) is written with Sendmail in mind. It is the standard MTA. Plus, I've been working with Sendmail for over 10 years and I know it inside and out.

Of course there are some disadvantages to Sendmail. It is harder to tweak and it does not handle virtual domains as well as more optimized MTA's like Postfix, Exim, or Qmail.

In fact, there are currently many better choices for an MTA than Sendmail. If I were going to setup a Mail server for a client today, I would use Postfix. Postfix is rapidly gaining popularity in Linux distributions that are designed for business use, and deservedly so. Postfix is written to be secure from the ground-up. It's also 99.9% Sendmail compliant (Sendmail's alias and supplemental configuration files will work with Postfix). Postfix, like Exim and Qmail is "optimized": it's setup to move the maximum amount of mail in the least amount of time using the least number of resources.

Still, for our purposes (learning how to setup basic mail services) We will use Sendmail. It will work just fine.


Some thoughts on Sendmail from the members of TriLUG:

  "Sendmail is like kudzu, and if you're surrounded by
   kudzu then, by God, you'd better know kudzu."
    - Paraphrased from an email by Mike Mueller

  "Sendmail setup ... seems to need advanced degrees in
   both subspace field dynamics, and Klingon."
    - Chris Knowles

  "I'm fairly sure that was created by a 
   dyslexic Welchman with a drinking problem.  ;') "
    - Kevin Flanagan

Introduction: Setting up Mail Services in Linux
Part I, The Movement of Mail Across the Internet
Part II, Setting up a Mail Server on Red Hat 8.0
Part III, The File Unmasked!