The opening episode of the Learn Mailserver series: the essential skills you must master before touching Postfix, Dovecot, and Roundcube, the VPS specs and domain you need to prepare, and verifying your environment through the CLI before you start installing any components.

Welcome to the Learn Mailserver series! Over the next 23 episodes we'll build a complete self-hosted mail server: Postfix as the MTA, Dovecot as the IMAP/POP3 server, and Roundcube as webmail — from zero all the way to production-grade.
Episode 0 is pure foundation. No packages are actually configured yet; we make sure you have enough skills, a capable environment, and a domain that's ready to use. The real installation begins in episode 3.
We'll cover three things: the core skills you must master, the hardware and software requirements for our lab, and the environment verification steps before you begin.
A mail server is not an "install and forget" application. It lives at the intersection of operating systems, networking, and DNS. Without the following four foundations, debugging will feel like fumbling in the dark.
Every component runs as a Linux service. At minimum, master these:
cd, ls, cp, mv, and rm.systemctl — you'll use it to check the status of Postfix, Dovecot, and friends.apt (Debian/Ubuntu) or dnf (RHEL family).journalctl, tail, and grep.Email runs on top of DNS: the destination mail server is found via the MX record, identity is verified via the TXT records SPF/DKIM/DMARC, and reputation is measured through the PTR record. You need to be comfortable adding records in your registrar's or DNS provider's panel, and verifying them with dig or host.
SMTP, IMAP, and webmail all use TLS. Learn the concept of key pairs (private key + public key), certificates, and how to get free certificates from Let's Encrypt via certbot. Episode 6 will break this down thoroughly.
You don't need to memorize the RFCs, but you must understand the big picture: SMTP for sending and receiving email between servers, IMAP/POP3 for clients retrieving email from mailboxes, plus the terms MTA, MDA, and relay. Episode 2 will map out the full architecture.
Note
Don't panic if some terms are still unfamiliar. Episode 0 introduces the map; episodes 1 through 22 will break down each concept. What you must take away from here is a basic acquaintance, not full mastery.
The good news is that a mail server doesn't need a big machine. One small VPS is more than enough for small-scale production.
| Requirement | Recommendation | Role in the Series |
|---|---|---|
| VPS/Dedicated | 2 vCPU, 2-4 GB RAM, 40-80 GB disk | Runs all components |
| OS | Debian 12 or Ubuntu 24.04 | The smoothest environment for this series |
| Domain | One domain + DNS registrar access | Example example.com throughout the series |
| DNS | A, MX, SPF, DKIM, DMARC, PTR | The foundation of deliverability |
| Database | MariaDB/PostgreSQL (optional) | Virtual users backend in episode 7 |
| TLS | Let's Encrypt + certbot | Free certificates for all services |
All components — Postfix, Dovecot, Roundcube, MariaDB, and Amavis — can run on a single VPS. That's exactly the pattern used by the most common homelab and SMB setups in the real world.
Choose a domain over which you have full control of DNS. Not a subdomain of someone else's service, and not a domain used by other people. For this series we consistently use example.com and the host mail.example.com.
Make sure the A record for mail.example.com points to your VPS's public IP. Check before moving on:
dig A mail.example.com +short
host example.comIf the output is empty, the record hasn't propagated yet or there's a typo. Fix it first — the entire lab stands on top of this address.
Your IP's reputation decides the fate of your email. Choose a VPS that provides a clean IP — meaning an IP not listed on email blacklists. Check blacklist history with online tools such as MXToolbox before ordering.
Equally important is the rDNS/PTR record: your VPS's IP must resolve back to mail.example.com. Many providers offer this feature from the panel. Verify:
dig -x 203.0.113.10 +shortReplace 203.0.113.10 with your VPS's IP. If the result isn't mail.example.com, configure it through the provider's panel. A wrong rDNS is a classic cause of email landing in spam.
Before closing the episode, make sure the essential tools are installed and SSH is working:
postconf mail_version
dovecot --version
openssl versionThe first line prints the Postfix version — 3.11.5 for the latest 2026 repositories — the second shows Dovecot CE 2.4.4, and the third the OpenSSL version. Episode 21 will discuss the meaning of these version numbers in depth.
If postconf or dovecot aren't present yet, that's fine — episodes 3 and 4 install them. What matters now: SSH into the VPS works, sudo runs, and the internet connection is stable.
Before moving to episode 1, make sure everything is green:
mail.example.com.dig A mail.example.com returns your VPS IP.sudo work on the VPS.postconf mail_version and dovecot --version can be run.If all of these pass, your environment is officially ready to be built.
Episode 0 is done. Here's what to take with you:
postconf and dovecot can be run from the terminal.Next, in episode 1 we step back for a moment to answer the most fundamental question: how email was born, where Postfix, Dovecot, and Roundcube come from, and what problems they actually solve. See you there!