Postfix Mail Server - from a basic installation to a filtered mail system
This Learning collects my Postfix notes from 2007 to 2010 in one order: a basic installation, authenticated and encrypted submission, three complete mail systems with different back ends, and the tools around the server that filter, deliver and report.
Every article ends with a section Current practice, which says what has changed since and what to do instead today.
The levels
Each level ends with a small check. There is no time limit: when you can do what the check asks, go on to the next level.
| Level | You practice | You have passed the level when |
|---|---|---|
| 1 · Install | A basic Postfix with virus scanning, and everyday queue commands | You can say what main.cf sets in the basic installation and how to look into the queue |
| 2 · Secure | SASL authentication, TLS certificates, relaying through another server | You can explain what SASL adds and what TLS adds, and why a server wants both |
| 3 · Build | Complete systems: for an ISP, with Dovecot and MailScanner, with Cyrus and MySQL | You can name, for one of the three systems, which program accepts mail, which stores it and which lets the user read it |
| 4 · Filter and observe | body_checks and header_checks, procmail and maildrop, a mail gateway, pflogsumm | You can write one header check and one procmail rule, and say where in the path of a message each one runs |
Level 1 is article 1, level 2 is article 2, level 3 is articles 3 to 5, and level 4 is articles 6 to 9.
The articles
Read them in this order. Articles 1 to 8 also exist in Slovak, the language they were written in; the (SK) link is at the top of each.
| # | Article | What it is |
|---|---|---|
| 1 | A basic installation | Level 1: installation, ClamAV, working with the queue |
| 2 | Debian 4 - Postfix + SASL + TLS | Level 2: authentication and encryption, with client setup and relaying over stunnel |
| 3 | Debian 4 - A mail server for an ISP | Level 3: a mail system for an ISP |
| 4 | Postfix + Dovecot + SquirrelMail + MailScanner + ClamAV | Level 3: a complete system with webmail and content scanning |
| 5 | Postfix + Cyrus + MySQL | Level 3: virtual domains and users in MySQL, with Cyrus |
| 6 | Body_checks and header_checks | Level 4: rejecting mail by its content |
| 7 | Notes on MDAs (procmail and maildrop) | Level 4: delivery agents and their filter languages |
| 8 | EnGarde Secure Linux - installing a mail gateway | Level 4: a filtering gateway in front of the mail server |
| 9 | Pflogsumm | Level 4: daily reports from the mail log |
What you will be able to do
- Read a Postfix configuration and say what each part is for.
- Describe the path of a message through a server with authentication, scanning and delivery.
- Compare three ways of storing users and mailboxes.
- Write simple content checks and delivery rules.
Final check
Draw the path of one incoming message through the system of article 4, from the SMTP connection to the user's mailbox, and name the program responsible at each step.