You are previewing Qmail Quickstarter.
O'Reilly logo
Qmail Quickstarter

Book Description

A fast-paced and easy-to-follow, step-by-step guide that gets you up and running quickly

  • Qmail Basics

  • Storing and retrieving of emails

  • Virtualisation

  • Filtering Spam

  • Hosting Multiple Domains, Encryption, and Mailing Lists

  • 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.

    Table of Contents

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