Skip to content
The Academy · Intermediate

Dovecot: IMAP/POP3 at Production Scale

12-module Dovecot course: IMAP/POP3 internals, mdbox vs Maildir, SQL/LDAP auth, Sieve, quotas, replication, director clustering, FTS, and forensics.

12
Modules
25
Lessons
8h
Estimated

Curriculum

12 modules, 25 lessons

Follow them in order or jump to the one you need. Each lesson is its own page, with the next one waiting at the end.

Module 013 lessons

Dovecot Architecture

What Dovecot is, how it fits into a mail stack, and why it's the IMAP/POP3 standard.

  1. 01What Dovecot does (and doesn't)Dovecot stores and serves mail; it doesn't send between servers
  2. 02Process model and master/worker designMaster/worker design isolates crashes per process
  3. 03Where everything livesPut all overrides in /etc/dovecot/local.conf, which survives upgrades
Module 022 lessons

Installation & Mail Storage Formats

Install Dovecot and choose between Maildir, mdbox, and sdbox.

  1. 04Installing Dovecot on Debian/UbuntuInstall per-protocol packages, since they're modular
  2. 05Maildir vs mdbox vs sdboxMaildir is the safest default; mdbox is faster and saves disk
Module 032 lessons

Authentication (PAM, SQL, LDAP, passwd-file)

Configure where Dovecot looks up user credentials and metadata.

  1. 06Auth flow and userdb vs passdbpassdb checks password; userdb provides UID/GID/home/quota
  2. 07Three common auth backendspasswd-file is great for <50 users; SQL scales to thousands
Module 042 lessons

SSL/TLS, Certificates, and Ports

Configure modern TLS, Let's Encrypt automation, and the right port for each protocol.

  1. 08Modern TLS settingsTLSv1.2+ only; never TLS 1.0/1.1
  2. 09Let's Encrypt auto-renewal hookRenewal-hooks/deploy/ runs only on actual cert renewal, which keeps it efficient
Module 052 lessons

IMAP, POP3, ManageSieve & Submission

Per-protocol tuning and what each one's for.

  1. 10Tuning IMAP for big foldersIndexes on fast SSD + mailboxes on bulk = best price/performance
  2. 11POP3 etiquette and Submission (SMTP)Don't mix POP3 and IMAP on the same mailbox without pop3_no_flag_updates
Module 062 lessons

Sieve Filtering & Server-Side Rules

Write powerful filters in Sieve that work across every device.

  1. 12Sieve basics and Dovecot extensionsSieve is the standard and works server-side across every client
  2. 13Global vs per-user Sieve scriptssieve_before runs globally before user rules, so Junk routing belongs here
Module 072 lessons

Quotas, Namespaces & Shared Folders

Disk-space enforcement, public folders, and team mailboxes.

  1. 14Quota plugin and warningsPer-user quotas come from userdb, default from plugin config
  2. 15Shared mailboxes and public namespacesPublic namespace = company-wide folders everyone sees
Module 082 lessons

Replication & Multi-Master Setups

Active/active mailbox replication with dsync.

  1. 16How dsync replication worksdsync replicates IMAP state, not bytes, so flags and GUIDs stay coherent
  2. 17Configuring two-node replicationA shared doveadm_password gates both nodes; keep it long
Module 092 lessons

Performance Tuning & Indexes

Where to spend SSD, when to use Solr, and what limits actually matter.

  1. 18Index, cache, and storage placementPut indexes on NVMe: it's the biggest single performance win
  2. 19Full-text search with SolrFTS turns IMAP SEARCH BODY from O(n) to O(log n)
Module 102 lessons

Director, Proxying & Horizontal Scaling

Keep one user pinned to one backend with the Dovecot director.

  1. 20Why you need a directorRound-robin LB breaks IMAP; director pins users to a backend
  2. 21Director configurationdirector_user_expire controls how sticky a mapping is, and 15 min is sane
Module 112 lessons

Security Hardening & Audit Logging

Beyond TLS: rate limits, mailbox quotas, login alerts, audit trails.

  1. 22Anvil and connection limitsmail_max_userip_connections = 20 is a great default safety net
  2. 23Login logging and audit trailsmail_log plugin gives you the audit trail compliance requires
Module 122 lessons

Troubleshooting, Forensics & Common Errors

How to diagnose Dovecot when something stops working.

  1. 24The five-minute diagnostic ritualdoveconf -n + tail log + grep user = 90% of diagnoses in 2 minutes
  2. 25Top 10 errors and their fixesUIDVALIDITY changes always mean trouble, so investigate immediately
Pulse · cold-email sending

Sending infrastructure that is yours alone.

Every domain gets its own MX host, IP, DKIM selector and certificate. Take it managed, and we run it for you, or buy a licence and run it on your own servers.

# on a fresh Ubuntu server
$ cd pulse && sudo ./install.sh
→ docker compose up · kumomta · stalwart · caddy
→ dashboard ready on https://pulse.yourdomain.com
$

Also from us:Beat: monitoring that tells you the fixConsulting: $65/hr, no retainer