Mail Server
Mailcow is a complete, self-hosted mail server packaged as a set of Docker containers — Postfix for sending, Dovecot for mailboxes, Rspamd for spam filtering, SOGo for webmail and groupware, plus a clean admin UI to tie it together. In the small-business stack it owns the most business-critical and, frankly, the most demanding service: email.
I run it as mailcow-dockerized on a dedicated Proxmox VM. This write-up covers why a company might run its own mail, how to deploy mailcow, the DNS and TLS that make email actually deliver, and — importantly — the responsibility that comes with operating your own mail server.
Email is the one service every business absolutely depends on, which is exactly why most outsource it to a provider. So why self-host? The same reasons that run through this whole stack: cost and control. Hosted mail is billed per mailbox per month, and every message — including sensitive internal and customer communication — lives on infrastructure someone else owns. Running your own means no per-mailbox fee, unlimited addresses and aliases, and full ownership of the data.
I will be honest about the trade, because email is the hardest thing here to run well. Deliverability is unforgiving — get your DNS or reputation wrong and your mail lands in spam or bounces. That is precisely why it belongs in a lab first: mailcow makes a genuinely hard problem approachable, but it does not make it trivial, and going in clear-eyed is the whole point of testing a solution before you rely on it.
Give mailcow its own VM — do not share it with other services. A dedicated Debian VM on Proxmox with roughly 2 vCPUs, 6 GB of RAM, and a 40 GB+ disk is a sensible starting point (Rspamd and ClamAV are the memory-hungry parts). A few prerequisites matter before you install:
mail.example.com.Install Docker Engine and the compose plugin, and set the hostname:
# Install Docker Engine + compose plugin on a fresh Debian VM
sudo apt update && sudo apt -y install curl git
curl -fsSL https://get.docker.com | sudo sh
# Set the system hostname to your mail FQDN
sudo hostnamectl set-hostname mail.example.com With Docker in place, clone mailcow, generate its configuration, and bring the stack up. The config generator asks for your mail hostname and a couple of options, then writes a mailcow.conf you can tweak before launch:
# Clone mailcow and generate the configuration
sudo git clone https://github.com/mailcow/mailcow-dockerized /opt/mailcow-dockerized
cd /opt/mailcow-dockerized
sudo ./generate_config.sh # prompts for mail.example.com
# Pull the images and start everything
sudo docker compose pull
sudo docker compose up -d That brings up the full set of containers. The admin UI is then reachable over HTTPS at your mail hostname, where you log in with the default admin account (change that password immediately).
This is the part that makes or breaks email. Mail servers judge each other on DNS records that prove you are allowed to send, so these need to be correct before you send a single message:
; Core mail DNS for example.com
@ MX 10 mail.example.com.
mail A 203.0.113.10
@ TXT "v=spf1 mx ~all"
_dmarc TXT "v=DMARC1; p=quarantine; rua=mailto:[email protected]"
; The DKIM key is generated inside mailcow and published as a TXT record The records in plain terms: MX points mail for your domain at the server; SPF declares which hosts may send for you; DKIM (generated in the mailcow UI under the domain) cryptographically signs your outbound mail; and DMARC tells receivers what to do with mail that fails those checks. Mailcow handles TLS automatically, requesting Let’s Encrypt certificates for the hostname as long as ports 80 and 443 are reachable.
From the admin UI the day-to-day setup is quick:
support@ or info@.A working mailcow gives a small business its own communications platform:
@example.com that ties the business together across every other tool in the stack.A mail server is exposed to the entire internet and carries the whole company correspondence, so it asks more of you than anything else in the stack:
Mailcow is the most demanding piece of the stack and also one of the most rewarding — a single VM gives a small business full email plus groupware on its own domain, with spam filtering that holds its own against the big providers. The catch is real: email rewards discipline around DNS, updates, and backups, and punishes neglect. Run it in a lab, learn where the sharp edges are, and it becomes a genuine alternative to paying per mailbox forever.