Creation of Postfix Mail Server Based on Virtual Users and Domains

 

 

 

 

By

Dr. Hidaia Mahmood Alassouli

Hidaia_alassouli@hotmail.com

 


Creation of Mail Server Based On Virtual Users and Domains

 

 

 

Supervised by:

Dr. Hidaia Alassouli

 

 

Student Name

Khumalo, Khumbulani V.

 

 

 

 

Abstract

It is common these days for a single system to host many domains, for example uniswa.com and mtn.com or acme .com may run on a single host machine, but behave as if they were on three different hosts. A system usually has a canonical domain, it has its usual or local domain name, and additional domains are configured as virtual domains.

The purpose behind this work is to create a mail server solution based on Postfix that is based on virtual users and domains, i..e. users and domains that are in a MySQL database. The goal is to have completely virtual users and domains. bob@uniswa.com != bob@acme.com. This means creating a separate name spaces for reach domain.

It will also demonstrate the installation and configuration of Courier-Imap (IMAP/POP3), so it can authenticate against the same MySQL database Postfix uses. The resulting postfix server is capable of quota which is not built into Postfix by default; the project will demonstrate how to patch postfix appropriately. Passwords are stored in encrypted form in the database. The work also covers the installation of Mail Scanner, SpamAssassin and ClamAv so that emails will be scanned for spams and viruses. The administration of MySQL database can be done through a web based tool Postfixadmin or can be done manually in the MySQL shell. Postfixadmin is a web based management tool created for Postfix that handles Postfix style virtual domains and users that are stored in MySQL. The squirrelmail web based email client is installed, in order to check emails from anywhere in world via internet. All installations were done in Fedora 5 Linux machine.

 

 

 

 

 

 

 

 


Table of contents

1. Introduction

2. Description of the Project      

2.1 Main Objectives

2.2 System Overview

2.3 Main Server Components

3. Main installation and configuration of the mail server packages

3.1 Installing Postfix

3.2 Initial Configuration of Postfix

3.3 Installing MySQL packages

3.4 Creating MySQL Tables

3.5 Populating database with some data

3.6 Creating Postfix-MySQl Configuration Files

3.7 Creating Virtual User and Virtual Directory

3.8 Configuring Postfix with MySQL maps

3.9 Installing Courier-IMAP and Courier-authlib6

3.10 Courier-IMAP Configuration19

3.11 Configuring Postfixadmin

3.12 Configuring Squirrelmail

3.13 Installing and Configuring MailScanner, ClamAV and SpamAssassin

4 Testing the configuration

5 Conclusion

 

1. Introduction:

The purpose behind this project is to create a mail server solution based on Postfix that is based on virtual users and domains, i..e. users and domains that are in a MySQL database. It will also demonstrate the installation and configuration of Courier-Imap (IMAP/POP3), so it can authenticate against the same MySQL database Postfix uses. The resulting postfix server is capable of quota which is not built into Postfix by default; the project will demonstrate how to patch postfix appropriately. Passwords are stored in encrypted form in the database. The project also covers the installation of Mail Scanner, SpamAssassin and ClamAV so that emails will be scanned for spams and viruses. The administration of MySQL database can be done through a web based tool Postfixadmin or can be done manually in the MySQL shell. Postfixadmin is a web based management tool created for Postfix that handles Postfix style virtual domains and users that are stored in MySQL. The squirrelmail web based email client is installed, in order to check emails from anywhere in world via internet. All installations were done in Fedora 5 machine.