Virtual Mailserver using Postfix, OpenLDAP, and Courier HOWTO

Dave Dribin

          dave@dribin.org
        

Keith Garner

          kgarner@kgarner.com
        

Revision History
Revision 1.02002-3
Full-release. Should be mostly free of grammar, spelling, and technical errors.

This guide describes how to set up a mail server that supports multiple domains with virtual and local users using Postfix, OpenLDAP, and Courier-IMAP. It also covers many design decisions behind the technology and implementation choices.


Table of Contents
1. Introduction
1.1. Why write this document?
2. Requirements
3. System Architecture
3.1. Software Selection
3.1.1. Postfix
3.1.2. Courier-IMAP
3.1.3. OpenLDAP
3.1.4. SquirrelMail
3.2. The Big Picture
3.3. Mailbox Location
3.4. LDAP Directory Design
3.4.1. Tree Structure
3.4.2. Choosing a Schema
3.4.2.1. Courier Schema
3.4.3. Access Control
4. Implementation
4.1. Prerequisites
4.2. Preparing the Unix System
4.3. OpenLDAP
4.3.1. Configuring slapd
4.3.1.1. Adding Schemas
4.3.1.2. Adding a Database Definition
4.3.1.3. Creating the root User
4.3.1.4. Defining Indexes
4.3.1.5. Setting up Access Control
4.3.2. Creating the Directory Tree
4.3.2.1. Creating the Base Directory
4.3.2.2. Adding a Domain
4.3.2.3. Adding a User
4.4. Postfix
4.4.1. Compiling Postfix with LDAP
4.4.2. Configuring Postfix
4.4.2.1. Procmail
4.4.2.2. The transport map
4.4.2.3. Configuring LDAP sources
4.4.2.4. The virtual alias maps
4.4.2.5. The virtual accounts
4.5. Courier
4.5.1. Configuring the Authentication Daemon
4.5.2. Configuring LDAP
4.5.3. Setting up IMAP over SSL
4.6. SquirrelMail
5. Administration
5.1. Account creation notes
5.2. Account deletion notes
6. Other useful software
6.1. GQ - The Gentleman's LDAP Client
7. Thanks
8. About the authors
8.1. Dave Dribin
8.2. Keith Garner
Bibliography