Qmail Quickstarter: Install, Set Up and Run your own Email Server

Qmail Quickstarter: Install, Set Up and Run your own Email Server
Formats: PDF, PacktLib, ePub and Mobi formats
Print + free eBook + free PacktLib access to the book:    Print cover: $24.99
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Qmail Basics
  • Storing and retrieving of emails
  • Virtualisation
  • Filtering Spam
  • Hosting Multiple Domains, Encryption, and Mailing Lists


Book Details

Language : English
Paperback : 152 pages [ 235mm x 191mm ]
Release Date : June 2007
ISBN : 1847191150
ISBN 13 : 9781847191151
Author(s) : Kyle Wheeler
Topics and Technologies : All Books, Other, Free eBooks, Linux Servers, Networking & Telephony

Table of Contents

Chapter 1: Basic Qmail
Chapter 2: Getting Email into the Queue
Chapter 3: Getting Email Out of the Queue
Chapter 4: Storing and Retrieving Email
Chapter 5: Virtualization
Chapter 6: Filtering
Chapter 7: Advanced Features
Chapter 8: Administration, Optimization, and Monitoring
  • Chapter 1: Basic Qmail
    • The Minimum Qmail System
      • Compiling and Installing
        • Preparing the System
        • Compiling and Installing the Necessary Binaries
        • Creating the Basic Configuration Files
        • Creating the Necessary Minimum Account Aliases
        • Default Mail Delivery
      • Basic Configuration
      • Simple Execution
        • qmail-start
        • qmail-smtpd
    • Administrative Conveniences
      • About Patches
      • ucspi-tcp and daemontools
        • Installation
      • Using tcpserver
      • Using svscan
      • Logging
    • The Overall Structure of Qmail
    • Summary
  • Chapter 2: Getting Email into the Queue
    • qmail-queue and the Qmail Queue
    • The qmail-inject and sendmail Interfaces
    • qmail-smtpd and the QMAILQUEUE Patch
      • Accepting or Rejecting Email
      • RELAYCLIENT and Authentication
        • tcprules
        • POP-before-SMTP
        • SMTP-AUTH
      • The QMAILQUEUE Patch
    • Other Mail Protocols
      • Quick Mail Transfer Protocol (QMTP)
      • Old-Fashioned Mail Injection Protocol (OFMIP)
    • Summary
  • Chapter 3: Getting Email Out of the Queue
    • qmail-send and the Qmail Queue
    • Delivering Email Locally
      • The Default
      • .qmail Files
        • Forwards
        • Maildirs and mboxes
        • Pipes and Programs
      • Supporting .forward Files
    • Users
      • The virtualdomains File
      • Defined Users: The users/assign File
      • Aliases
      • Extensions
    • Delivering Email Remotely
      • How It Normally Works
      • Static Routes
      • Authentication
    • Summary
  • Chapter 4: Storing and Retrieving Email
    • Popular Storage Formats
      • Reliability
      • Speed
        • Reading
        • Marking
        • Deleting
        • Delivery
        • Searching
      • On-Disk Efficiency
    • The POP3 and IMAP Protocols
      • Protocol and Server Selection
      • qmail-pop3d Server Setup
        • The Checkpassword Interface
        • Installing the checkpassword Program
        • Running with tcpserver
    • Webmail
    • Summary
  • Chapter 5: Virtualization
    • Generic Virtualization Framework
      • Power of the virtualdomains File
      • Basic Virtual Domains
      • The Path of an Email
      • Non-Virtual Non-System Users
    • User-Management Problem in Assisted Virtual Domains
      • Popular Solutions: vpopmail and VMailMgr
      • Consequences for Other Services
    • Good Reasons to Use Multiple Installations
      • How to Set Up Multiple Qmail Installations
      • Hiding Multiple Queues from the User
    • Summary
  • Chapter 6: Filtering
    • Basic Filtering Architecture
    • Sending Mail Without a Queue
    • Blocking Viruses
      • Heavyweight Filtering
      • Lightweight Filtering
    • Stopping Spam from Getting In
      • Sender Validation
        • SPF
        • DomainKeys
      • Identifying Spam
        • Lightweight
        • Heavyweight
        • Quarantines and Challenges
        • Mistakes
    • Stopping Spam from Getting Out
      • Sender Restrictions
      • Bounce-Back Spam
        • Recipient Validation
        • Recipient Validation is Insufficient
    • Summary
  • Chapter 7: Advanced Features
    • SSL Encryption
      • Patch vs. Wrapper
      • When Receiving Email
      • When Sending Email
    • Mailing Lists
      • Lightweight vs. Heavyweight
      • Speed vs. Size
        • Member Management
        • Efficiency under Load
      • Variable Envelope Return Path
      • Integration with Qmail
      • Web Interface
    • Summary
  • Chapter 8: Administration, Optimization, and Monitoring
    • The Log Files
      • The Basic qmail-smtpd Log
        • Expanding the qmail-smtpd Log
      • The Basic qmail-send Log
    • Basic Analysis
      • qmailanalog
      • Identifying Problems
    • Making It Faster
      • Calculating Your Limits
      • Finding Bottlenecks
        • Concurrency
        • Resource Starvation
        • DNS
        • Filesystem
      • Silly Qmail Syndrome
    • Summary

Kyle Wheeler

Kyle Wheeler is a PhD candidate in the Computer Science and Engineering Department at the University of Notre Dame, Indiana. Having co-authored papers both nationally and internationally, he received an M.S.C.S.E. from Notre Dame in 2005 and expects to receive his doctorate in the field of scalable computing in 2008. As part of his PhD research, he interned at Sandia National Laboratories from 2006 through 2007. Kyle began setting up and maintaining qmail-based email servers working for NetSeats Inc. in 2000. Since then, his client base has expanded to include the Philadelphia chapter of Notre Dame Alumni, the Church of the Epiphany in the Archdiocese of Louisville, and several other groups, both large and small. He is also a frequent contributor to the qmail mailing list, which supports qmail users and administrators internationally.

Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


- 1 submitted: last submission 17 Sep 2012

page 17 Others 03 Apr 09
In order to be able to correctly compile the installation of ucspt-tcp and<br />daemontools programs (only for Unix systems), you need to tweak the error.h file (in<br />daemontools in the src directory)<br />comment out "/* extern int errno; */"<br />add "#include<br />Another way to address this issue would be to change the conf-cc files to read: <br />gcc -include /usr/include/errno.h

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Qmail Quickstarter: Install, Set Up and Run your own Email Server +    Cacti 0.8 Network Monitoring =
50% Off
the second eBook
Price for both: $15.75

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  •     Installing, configuring, and compiling qmail
  •     Getting emails in and out of the queue, along with storing, retrieving, and authenticating them
  •     Virtualisation of domains and user management, filtering spam, and other advanced features like SSL encryption and mailing lists

Chapter 1: Basic Qmail: This chapter explains compiling, installing, and configuring a basic qmail system. Finally, it shows the best practices for using qmail.

Chapter 2: Getting Email into the Queue: This chapter covers the ways of getting email into the on-disk queue. It also covers authentication and other mail protocols.

Chapter 3: Getting Email Out of the Queue: This chapter discusses delivering email both locally and remotely along with the various kinds of users that qmail supports.

Chapter 4: Storing and Retrieving Email: This chapter provides a comparative analysis of storage formats of qmail with respect to popular formats, reliability, and speed of storing and retrieving emails.

Chapter 5: Virtualization: This chapter explains a generic virtualization framework and its virtual domains where user management and popular solutions will be handled. In the last section, multiple installations and their pros and cons are explained.

Chapter 6: Filtering: As the name suggests, this chapter discusses blocking viruses and also preventing spam from getting out.

Chapter 7: Advanced: This chapter discusses advanced features like SSL Encryption and mailing lists.

Chapter 8: Administration, Optimizing, and Monitoring: This chapter discusses the log files, their format, and problems associated with them. Finally, there are tips to make your qmail faster.

In Detail

This book starts with setting up a qmail server and takes you through virtualization, filtering, and other advanced features like hosting multiple domains, mailing lists, and SSL Encryption. Finally, it discusses the log files and how to make qmail work faster.

Qmail is a secure, reliable, efficient, simple message transfer agent. It is designed for typical Internet-connected UNIX hosts. Qmail is the second most common SMTP server on the Internet, and has by far the fastest growth of any SMTP server. Qmail's straight-paper-path philosophy guarantees that a message, once accepted into the system, will never be lost. Qmail also optionally supports maildir, a new, super-reliable user mailbox format.

This book is a quick starter for people who want to set up a mail server using qmail. It also discusses advanced features, like hosting multiple domains, in detail. By bringing together material that might take days to find online it will be a real timesaver for Sysadmins.


This book gives practical examples that system administrators can use right away, but it also explains the basics behind every example clearly.

Who this book is for

This book is targeted at System Administrators familiar with Linux/UNIX and DNS servers who need to set up qmail.

Buy Qmail Quickstarter: Install, Set Up and Run your own Email Server


Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software