Self-Hosted Mail Server: mailcow
The community runs its own mail for irregulars.io on mailcow. This page is the
runbook for anyone who wants to do the same: what to have in place before you
install, how to run it day to day, and what has gone wrong for us. If you’re still
deciding whether to self-host at all, start with
Running your own email.
What runs today
Section titled “What runs today”| Layer | Service | Notes |
|---|---|---|
Mailboxes for irregulars.io | mailcow (Postfix, Dovecot, Rspamd, ClamAV, SOGo) | Docker Compose on the community’s Proxmox host. Built to host partner organisations’ domains as separate tenants. |
| Inbound MX | mailcow | Mail ports on a dedicated public IP. Mail can’t go through Cloudflare’s proxy or a tunnel. |
| Outbound from people | Amazon SES SMTP relay (smarthost) | mailcow relays every outgoing message through SES (Brevo until 2026-10-20). See why. |
| Webmail | Roundcube at https://mail.irregulars.io | Published through a Cloudflare Tunnel. |
| Mail clients | imap.irregulars.io (993), smtp.irregulars.io (587 or 465) | Mailbox password, or a mailcow app password per client. |
Aliases on simplymail.org | SimpleLogin | Its own MX. See Self-Hosted SimpleLogin. |
| Mail from apps | Cloudflare Email Sending on mail.irregulars.io | Workers send through the send_email binding; GitLab uses Email Sending’s SMTP endpoint. See App and transactional mail. |
| DNS | Cloudflare | Mail hostnames are DNS-only (grey cloud). Web UIs go through the tunnel. |
mail.irregulars.io does two jobs: it’s the Roundcube web address (proxied, HTTP
only) and the Email Sending subdomain. They don’t clash, because Email Sending
keeps its bounce MX and SPF on cf-bounce.mail.irregulars.io and its DKIM key under
its own selector. Nothing needs an MX record on the proxied name itself.
How a message moves
Section titled “How a message moves”To you@irregulars.io sender's server → MX (mailcow Postfix) → Rspamd + ClamAV → Dovecot mailbox
To an alias@simplymail.org sender's server → SimpleLogin MX → alias lookup → the owner's real mailbox owner on irregulars.io → handed to mailcow over an internal network owner anywhere else → out through Amazon SES
From a person mail client or Roundcube → mailcow submission (587/465) → Amazon SES → recipient
From an app Cloudflare Worker or GitLab → Cloudflare Email Sending → recipientBefore you install
Section titled “Before you install”| Need | Why |
|---|---|
| 6 GiB RAM + 1 GiB swap (mailcow’s documented minimum), 20 GiB disk before mail, x86_64 or ARM64 | ClamAV and full-text search are the hungry parts; mailcow documents switching them off on small hosts. |
| A static public IP with port 25 open in both directions | Many residential and cloud providers block port 25. Ask before you build. |
| A PTR (reverse DNS) record for that IP, matching your HELO name | Receivers check forward-confirmed reverse DNS. Only whoever owns the IP block can set the PTR, usually your ISP. |
| An IP that isn’t on a policy blocklist (for example Spamhaus PBL) | Residential ranges are listed by design. |
| Time for patching, backups and monitoring | Mail is the service people notice first when it breaks. |
mailcow listens on 25, 465, 587, 143, 993, 110, 995 and 4190, plus 80/443 for the web interface. Close POP3 if nobody uses it.
Why outbound goes through a relay
Section titled “Why outbound goes through a relay”Our mail IPs have no PTR record. The PTR zone belongs to the ISP, and without it direct delivery failed: large receivers want forward-confirmed reverse DNS, and mail sent straight from the IP was rejected against the Spamhaus PBL. So mailcow hands every outgoing message to a smarthost, which delivers it from warm, correctly configured IPs. Ours is Amazon SES since 2026-10-20; before that it was Brevo, until we found it adding tracking to relayed mail (lesson 16).
What to do in your own setup:
- Ask your provider for a PTR first, set to the name your server uses in its
HELO/EHLO greeting, and make sure that name has an A record pointing back at the
IP. Check the greeting with
openssl s_client -starttls smtp -connect <mx>:25: the220banner should show that name. - No PTR, or a cold IP? Use a smarthost (Amazon SES, Brevo, Postmark, Mailgun…). Even with a PTR, a brand-new IP has no reputation, so a relay is cheap insurance for a small community.
With a relay, the envelope sender (Return-Path) is the relay’s own bounce domain, so
SPF passes for the relay but doesn’t align with your From:. DMARC passes on your
DKIM signature instead. That makes DKIM the record you can’t get wrong; the
details are in Email DNS and authentication.
Running mailcow behind a Cloudflare Tunnel
Section titled “Running mailcow behind a Cloudflare Tunnel”mailcow’s defaults assume it owns ports 80/443 and gets its own Let’s Encrypt certificate. We publish the web interface through a tunnel instead, so:
mailcow.conf setting | Value | Why |
|---|---|---|
HTTP_BIND / HTTPS_BIND | 127.0.0.1 (on spare ports) | The web UI is reachable only through the tunnel. |
SKIP_LETS_ENCRYPT | y | Cloudflare terminates TLS for the web UI. |
Mail port binds (SMTP_PORT etc.) | <public mail IP>:25, :465, :587, :993, :4190… | Mail can’t go through a tunnel, so the mail ports bind the public IP directly. |
Certificates for mail. Mail clients and other servers connect straight to the
mail ports, so they need a real certificate even though the web UI doesn’t. We issue
one with acme.sh using a DNS-01 challenge (a Cloudflare API token scoped to one zone,
Zone:DNS:Edit + Zone:Read), covering smtp, imap, autodiscover and
autoconfig. acme.sh’s --install-cert hook copies it into mailcow and reloads
Postfix, Dovecot and nginx. Monitor the certificate the server actually serves, not
just the file: ours expired once before the renewal job was fixed.
Firewall. If your Docker host’s DOCKER-USER chain ends in DROP, published mail
ports on a public IP stay unreachable until you allow them with conntrack matches
(-m conntrack --ctorigdst <mail-ip> --ctorigdstport 25 -j ACCEPT, one per port),
because Docker’s DNAT runs before the filter. Persist the rules.
Running it
Section titled “Running it”Adding a domain (a tenant)
Section titled “Adding a domain (a tenant)”- Add the domain (Configuration → Mail setup → Domains), with quotas and limits.
- Generate its DKIM key (Configuration → ARC/DKIM keys, 2048-bit). Only the super-admin can do this; a delegated domain admin can’t.
- Assign the relay host to the domain and run the check above.
- Publish DNS at the domain’s DNS provider: MX, SPF, the DKIM TXT, DMARC, and
optionally
autodiscover/autoconfig. What each record should contain is in Email DNS and authentication. - Create a domain admin scoped to that one domain, so the organisation manages its own mailboxes and aliases without seeing other tenants.
All tenants share the outbound path. With a relay, one tenant’s complaint rate affects everyone (Brevo’s sub-accounts, which would separate them, are an Enterprise feature). With Amazon SES, each tenant domain must also be verified in SES before it can send. Plan for that before you host an organisation that sends a lot, or move to direct delivery (smarthost or direct?).
Admin access
Section titled “Admin access”- Serve the admin paths (
/admin,/domainadmin,/rspamd) on a separate hostname behind an identity-aware proxy, and have nginx refuse them on the public mailbox hostname. Mailbox users only need the root login page. - Turn on 2FA (WebAuthn first, or TOTP) for the super-admin and every domain admin.
- API keys: read-only where possible, restricted to source IPs, one per purpose, never “skip IP check”. Drive the API from the host, not through the tunnel.
Backups
Section titled “Backups”./helper-scripts/backup_and_restore.sh backup allwrites mailboxes, the database, Rspamd and Postfix data. Run it nightly.- Keep an encrypted copy off the host (we use restic, with a second copy on another machine), and keep the repository password in a password manager, not only on the server.
- Practise a restore: restore into a scratch directory, check the files, and know
the
backup_and_restore.sh restoresteps before you need them.
Upgrades
Section titled “Upgrades”mailcow releases monthly; apply security releases within days.
- Read the release notes for every version between yours and the target.
- Back up (
backup_and_restore.sh backup all), and prefetch the images (./update.sh --prefetch) so the downtime is short. - Run
./update.sh. - Check egress first (see lesson 8): every container running, Unbound healthy.
- Run the relay check, confirm
postconf -h mynetworkslists only mailcow’s own network, and send a test message out and in. - If you’ve restricted Sieve extensions in
data/conf/dovecot/extra.conf, confirm withdoveconf plugin/sieve_extensionsthat the restriction survived.
Rollback: docker compose down, check out the previous tag, restore from the
pre-upgrade backup, docker compose up -d.
Alerts
Section titled “Alerts”- Set
WATCHDOG_NOTIFY_EMAILinmailcow.conf. Left empty, mailcow’s watchdog detects failures and tells nobody. - Monitor the served certificate’s expiry, the deferred queue, and whether DMARC and TLS-RPT reports actually arrive. The full list is in Email deliverability and monitoring.
Webmail
Section titled “Webmail”Roundcube serves mail.irregulars.io. mailcow also bundles SOGo, which adds
calendars, contacts and ActiveSync.
How the Roundcube container is set up:
- It reaches mailcow over its own small Docker network that allows only IMAP, submission and ManageSieve. It never uses the public mail IP, and it is not on mailcow’s internal network (see lesson 4).
- It connects by the names on mailcow’s certificate, mapped to mailcow’s
addresses on that network with
extra_hosts, so TLS is verified like any other mail client. - It has no internet access. The image is built with the spell-check dictionary
already installed: the stock entrypoint installs dictionaries with
apt-getat every start, which can’t work without egress. - Server-side filters (Settings → Filters) work through Dovecot’s ManageSieve.
Patch webmail quickly. CISA’s Known Exploited Vulnerabilities catalogue lists several Roundcube CVEs. Apply security releases within days, and rebuild the container rather than just restarting it.
| Webmail | Status in 2026 | Good for | Watch out for |
|---|---|---|---|
| Roundcube 1.7 (what we run) | Active, monthly security releases | Fast mail UI, Sieve filters, plugins | Frequent target; patch quickly |
| SOGo (bundled with mailcow) | Active | Calendars, contacts, ActiveSync | Heavier UI |
| SnappyMail | No release since 2024-10 | Light, modern UI | Stalled project |
| Cypht | Maintenance mode | Aggregating several accounts | Rough UX |
| No webmail | — | Smallest attack surface | Mail clients only |
Choosing a mail server (2026 comparison)
Section titled “Choosing a mail server (2026 comparison)”| Project | Language | What’s in the box | RAM (rough) | SSO | Spam filtering | Notes |
|---|---|---|---|---|---|---|
| mailcow (what we run) | PHP, many containers | Postfix, Dovecot, Rspamd, ClamAV, SOGo; admin UI | 6 GiB + 1 GiB swap (documented minimum) | Native OIDC login (Authentik works) | Rspamd | Delegated domain admins, a relay host per domain, monthly releases. Still ships Dovecot 2.3 (see below). |
| Stalwart | Rust, one binary | SMTP, IMAP, JMAP, Sieve, CalDAV, CardDAV | ~150 MB | Native OIDC directory, app passwords | Built in | We ran it in May and June 2026. Pre-1.0 with breaking changes; multi-tenancy is Enterprise-only. Worth re-evaluating at 1.0. |
| Mailu | Python, many containers | Postfix, Dovecot, Rspamd, Roundcube | ~1 GB | OIDC through a proxy, or LDAP | Rspamd | Modular; no DAV. Two critical advisories in 2026 (a header-auth bypass in July, an XSS in September): patch promptly. |
| Mox | Go, one binary | SMTP, IMAP, JMAP, webmail | ~80 MB | Not yet | Built in | Modern protocol support (MTA-STS, DANE). Young project, mostly one maintainer. |
| docker-mailserver | Shell, Postfix, Dovecot | Postfix, Dovecot, Rspamd | ~500 MB | LDAP | Rspamd | No admin UI, no webmail. Fewest moving parts. |
| iRedMail | Mixed | Postfix, Dovecot, Rspamd, Roundcube | ~1.5 GB | LDAP, OIDC through a proxy | Rspamd | Host installer, not containers. |
| Poste.io | Mixed | Haraka, Dovecot, Rspamd | ~500 MB | LDAP | Rspamd | Our choice in 2022–2023 (archived notes). |
| Maddy | Go | SMTP, IMAP (beta) | ~50 MB | LDAP | Custom | Small user base. A critical advisory in October 2026: auth.plain_separate accepted any password when no pass directive was configured. |
Dovecot 2.3 in mailcow. Dovecot 2.3’s active support ended on 2025-01-24; it now gets only critical security fixes, and its last release was 2.3.21.1 (August 2024). mailcow release 2026-09a still ships it, and the move to Dovecot 2.4 hasn’t shipped yet. If you choose mailcow now, follow that migration and keep the IMAP attack surface small (app passwords, rate limits, only the Sieve extensions people use).
Why we moved from Stalwart to mailcow
Section titled “Why we moved from Stalwart to mailcow”- Tenants. We wanted to host partner organizations’ domains with their own admins. Stalwart puts tenants and tenant admins behind its Enterprise licence; mailcow has delegated domain admins built in.
- Groupware. mailcow bundles SOGo with CalDAV, CardDAV and ActiveSync, plus Rspamd and ClamAV, in one supported stack.
- Mail clients. Stalwart 0.15 used Authentik as its only directory, so Apple Mail and other password-based clients needed a custom proxy to log in. Two attempts at the 0.16 upgrade, which would have fixed that, failed: 0.16 needs a fresh install, and its setup wizard didn’t save the admin account. mailcow has app passwords natively.
What we gave up: Stalwart’s tiny footprint and its single binary. mailcow runs about 18 containers.
SSO and mail clients
Section titled “SSO and mail clients”Mainstream mail clients (Apple Mail, Outlook, Thunderbird) don’t do OAuth with a self-hosted identity provider. There are three common patterns:
- App passwords. People sign in to the web interfaces with their normal login, and create a separate password for each mail client. A leaked app password exposes one client, and each can be revoked on its own. mailcow and Stalwart 0.16 both support this.
- The mail server’s own OIDC login. mailcow can use Authentik as an identity provider for its web login and create mailboxes on first login. Mail clients still need app passwords, because Dovecot doesn’t accept OIDC for password logins.
- LDAP from the identity provider. Authentik’s LDAP outpost lets mail clients use the same password as everything else. The catch: LDAP can’t enforce MFA, so a mail client becomes a way around the MFA that the web login requires.
What we do: mailboxes are local mailcow accounts. People use their mailbox password in webmail, and app passwords in mail clients. mailcow’s OIDC login is available if we decide to switch it on later.
Cloudflare and your mail server
Section titled “Cloudflare and your mail server”Cloudflare doesn’t host mailboxes. Its Email Service has two parts:
Email Routing (inbound forwarding to another inbox or a Worker) and Email
Sending (outbound mail from apps). A domain’s MX can point at Cloudflare or at
your mail server, not both, so self-hosted mailboxes mean taking the MX away from
Email Routing. We turned it off for irregulars.io in May 2026. Sending app mail
through Email Sending on a subdomain works fine alongside mailcow; see
App and transactional mail.
DNS for mail hostnames: never proxied
Section titled “DNS for mail hostnames: never proxied”Cloudflare’s proxy carries HTTP only. SMTP and IMAP through it fail at once, so
every name that mail clients or other servers connect to (mx, smtp, imap) must
be a DNS-only A record (grey cloud). Web names such as the webmail address can stay
proxied. The dashboard creates new records as proxied; the API doesn’t. Check after
every change:
dig +short A smtp.yourdomain.example# Must be your mail server's IP. A 104.21.* or 172.67.* answer means the record is proxied.For DNS-01 certificates, use an API token scoped to one zone (Zone:DNS:Edit plus
Zone:Read), never the account-wide Global API Key.
Lessons learned
Section titled “Lessons learned”1. Multi-homed hosts need policy routing
Section titled “1. Multi-homed hosts need policy routing”If a host has two uplinks on one interface (for example a residential line and a
business IP block), the default route usually points at only one of them. A
container bound to an IP from the other uplink receives connections fine, but
its replies leave through the wrong gateway and are dropped. The symptom is
silent: no RCPT TO from real senders, while tests from the host itself work.
Fix it with policy routing keyed on the Docker bridge (input interface), not the source IP: the kernel picks the return route before NAT rewrites the source. Make the rules a boot-time service that re-reads bridge names, because they change when a network is recreated.
# On the host: which way does a reply to a remote mail server go?ip route get <remote-mta-ip> from <container-ip> iif <docker-bridge>2. Cloudflare Email Routing rules outlive “disabled”
Section titled “2. Cloudflare Email Routing rules outlive “disabled””Turning Email Routing off for a zone doesn’t delete its forwarding rules. They stay enabled in the API and keep catching mail from senders that cached the old MX (Apple’s servers cache MX records for days past their TTL). After any MX move, list the rules and delete the ones you don’t want:
ZONE=<zone-id>curl -sS -H "Authorization: Bearer $CF_API_TOKEN" \ "https://api.cloudflare.com/client/v4/zones/$ZONE/email/routing/rules?per_page=50" \ | jq '.result[] | {tag, enabled, matchers, actions}'
curl -sS -X DELETE -H "Authorization: Bearer $CF_API_TOKEN" \ "https://api.cloudflare.com/client/v4/zones/$ZONE/email/routing/rules/$TAG"The catch-all rule can’t be deleted through the API. Check that it’s disabled with
the action drop.
3. A healthy container can be attached to no network
Section titled “3. A healthy container can be attached to no network”A mail container once reported healthy for days while attached to no Docker network: its health check probed itself on localhost, so nothing noticed that no published port worked. Recreating the container (not restarting it) re-attached it. Health checks prove a process is alive, not that users can reach it; test from outside.
4. Never attach other containers to the mail server’s own network
Section titled “4. Never attach other containers to the mail server’s own network”Containers on the same host as the mail server (the alias service, webmail, an AI
assistant) usually can’t reach it through its public IP: the hairpin path fails while
outside clients work. The tempting fix is to join them to mailcow’s internal Docker
network. Don’t. Postfix trusts its own subnet (mynetworks), so anything attached
there can relay mail without logging in, as any address you host.
- Give each client container its own small network, shared only with the mailcow
containers it needs (Postfix, Dovecot), and keep that subnet out of
mynetworks. - Allow only the ports it uses (for example 993 and 587 for webmail, 25 for an alias service delivering like any MX). If your host bridges traffic past iptables, filter it with an nftables bridge table.
- For logins with TLS, map the names on mailcow’s certificate to its address on that
network with
extra_hosts. Don’t switch certificate checks off. - After every change,
postconf -h mynetworksin the Postfix container must list only loopback and mailcow’s own network.
5. A directory that calls your identity provider makes every login slow
Section titled “5. A directory that calls your identity provider makes every login slow”A mail server that validates each login against an OIDC provider is only as fast as that provider. Under Stalwart 0.15, every new IMAP session cost a round trip to Authentik through the tunnel (130–185 ms), and a one-minute idle timeout meant webmail paid it on almost every click. Longer IMAP idle timeouts hid it; directory caching fixes it.
6. An entrypoint that installs packages breaks without egress
Section titled “6. An entrypoint that installs packages breaks without egress”Some images install optional packages at every start. Roundcube’s installs
spell-check dictionaries with apt-get when they’re configured. In a container
with no internet access, that step fails and the web server never starts. Build
the packages into the image instead.
7. Moving a mail server isn’t done at the MX record
Section titled “7. Moving a mail server isn’t done at the MX record”Retiring the old stack also means its tunnel routes, DNS records, identity-provider applications (which may hold users’ refresh tokens), firewall rules, scheduled jobs and data on disk. Make a checklist when you cut over, and archive the data encrypted before deleting it.
8. An upgrade can drop the mail network’s NAT rule
Section titled “8. An upgrade can drop the mail network’s NAT rule”- Symptom: after
update.sh, Unbound is unhealthy and Postfix, Rspamd and nginx sit inCreatedforever. The web UI and mail are down. - Cause:
update.shrunsdocker compose down. The mailcow network came back without Docker’s MASQUERADE rule, so containers had no egress, Unbound’s health check (which needs the internet) failed, and everything waiting on Unbound never started. Foreign containers attached to the network were the likely trigger. - Fix: restore the NAT rule for mailcow’s subnet and flush Unbound’s caches
(
unbound-control flush_infra all). Don’t skip the Unbound health check; it’s telling the truth. - Detect: check egress and container health straight after every upgrade.
9. The relay assignment vanished
Section titled “9. The relay assignment vanished”- Symptom: nothing obvious. Some outbound mail bounced.
- Cause: mailcow’s relay host entry disappeared and the domain fell back to direct delivery from an IP with no PTR, which receivers rejected.
- Fix: re-add the relay host and reassign it to each domain.
- Detect: the
postmapcheck in the relay caution, after every upgrade and on a schedule; and look forrelay=lines that aren’t your smarthost in the Postfix log.
10. Webmail’s SQLite database corrupted silently
Section titled “10. Webmail’s SQLite database corrupted silently”- Symptom: Roundcube showed “Internal Error” for days before anyone reported it.
- Cause: its SQLite database was corrupt.
- Fix: rebuild it (users and identities are recreated on login). Use a real database server, or at least back up the SQLite file.
- Detect: monitor the webmail login page’s HTTP status, not just the container.
11. Host alert mail bounced for months
Section titled “11. Host alert mail bounced for months”- Symptom: the hypervisor’s alert emails never arrived; nobody noticed, because no alerts arrived.
- Cause: the host’s Postfix relay login couldn’t work:
libsasl2-moduleswasn’t installed and the SASL password file was empty. - Fix: install the SASL modules, give the host its own send-only mailbox, and relay through the mail server’s submission port.
- Detect: send a test alert end to end after any change, and periodically.
12. Nobody was reading the DMARC and TLS reports
Section titled “12. Nobody was reading the DMARC and TLS reports”- Symptom: “no DMARC failures” for months.
- Cause: the
ruaaddress in the DMARC and TLS-RPT records had no mailbox or alias on the mail server, so reports fell into a catch-all nobody read. - Fix: create the report mailbox (or an alias to a person), and process the reports with a parser.
- Detect: confirm that at least one report arrives within a few days of publishing the record. No reports means the pipeline is broken, not that everything is fine.
13. One SPF typo authorised nothing
Section titled “13. One SPF typo authorised nothing”- Symptom: none visible. DMARC kept passing.
- Cause: the SPF record included
_spf.brevo.com, which publishesv=spf1 -all, so the include authorised no IPs. Brevo’s sending ranges are inspf.brevo.com. DMARC passed only because DKIM aligned. - Fix: use the include your provider documents, and check what it expands to:
dig +short TXT spf.brevo.com. - Detect: expand every
include:in your SPF record after any change.
14. Binding ports to an IP doesn’t decide where outbound mail comes from
Section titled “14. Binding ports to an IP doesn’t decide where outbound mail comes from”- Symptom: none, until you try to deliver directly. Your SPF record and the IP you asked a provider to give a PTR record both name the mail server’s dedicated address, but receivers see a different one.
- Cause: publishing ports on a specific IP (
46.x.x.x:25:25) only controls inbound traffic. Outbound connections from a Docker network leave throughMASQUERADE, which uses the primary address of the outgoing interface, usually the host’s first IP. On a host with several public IPs, the mail server’s outbound mail quietly leaves from the host’s own address. - Fix: add an explicit source NAT rule for the mail server’s network (
-s <mail-net> -o <uplink> -j SNAT --to-source <mail-ip>, placed before Docker’sMASQUERADE), and make sure the PTR record, the SMTP greeting name and SPF all describe that address. Persist the rule with the rest of your firewall. - Detect: capture the first packet of a real outbound connection and read its source
address:
tcpdump -n -i <uplink> 'tcp dst port 25 and tcp[tcpflags] & tcp-syn != 0'. With a smarthost, watch for the relay’s port (587) instead.
15. The watchdog had nobody to tell
Section titled “15. The watchdog had nobody to tell”- Symptom: no alert emails, ever.
- Cause: two things. mailcow ships
WATCHDOG_NOTIFY_EMAILcommented out, so nobody was set to receive alerts. Once it was set, the watchdog delivered straight to the domain’s MX through the public IP. That connection came back in through the Docker gateway, which is deliberately left out of Postfix’s trusted networks, so postscreen dropped it (HANGUP … in tests before SMTP handshake). - Fix: set the address, and in
docker-compose.override.ymlmap the MX hostname to Postfix’s internal address for the watchdog container only (extra_hosts). Keep the gateway out ofmynetworks. - Detect: recreate the watchdog with
WATCHDOG_NOTIFY_START=yand check that the startup notice arrives. Then send its alerts somewhere that doesn’t depend on the mail server too (a webhook to a push service), because a broken mail server can’t email you about itself.
16. A relay can rewrite your mail
Section titled “16. A relay can rewrite your mail”- Symptom: none that anyone reported. Mail arrived, DMARC passed.
- Cause: our smarthost (Brevo) treated everything it relayed like a marketing campaign: every link in the HTML part of person-to-person mail and of alias forwards was rewritten to a tracking domain, two tracking images were added, and its own unsubscribe headers appeared. Turning that off wasn’t possible on our plan.
- Fix: we moved to a relay that passes messages through unchanged (Amazon SES; see App and transactional mail).
- Detect: before trusting any relay, send an HTML message with a link through it to a mailbox you control, then compare the received links, images and headers with what you sent. Plain-text tests won’t show it.
History
Section titled “History”- 2022–2023: Poste.io (archived notes).
- May 2026: Stalwart 0.15 on a dedicated public IP, with Authentik as its directory, a standalone SOGo for webmail and a custom proxy so Apple Mail could use app passwords. A Google Cloud relay carried inbound mail until 2026-06-06.
- 2026-06-13: cutover to mailcow. Mailboxes started fresh; old mail wasn’t
copied across. Roundcube became the webmail at
mail.irregulars.io. - 2026-10-18: the Stalwart stack (Stalwart, the standalone SOGo and the auth proxy) was removed from the host. Roundcube, SimpleLogin and the assistant moved onto their own filtered networks with verified TLS.
- 2026-10-20: the email pages on this wiki were reorganised into an overview, a DNS guide, an app-mail guide and a deliverability guide; SPF advice corrected. The same day outbound mail (mailcow and SimpleLogin) moved from Brevo to Amazon SES.
Related
Section titled “Related”- Running your own email: the overview and decision guide.
- Email DNS and authentication: MX, PTR, SPF, DKIM, DMARC, MTA-STS and TLS-RPT.
- App and transactional mail: Cloudflare Email Routing and Email Sending, Amazon SES and Brevo as relays, and abuse prevention.
- Email deliverability and monitoring: the checklist and troubleshooting by symptom.
- Self-Hosted SimpleLogin: the alias service
on
simplymail.org, and how it delivers into mailcow. - Cloudflare: DNS, Tunnel and Workers basics.
- Authentik Installation: the identity provider.
- Self-Host Cloudflare Tunnels: how the webmail is published without exposing the origin.
References
Section titled “References”- mailcow documentation and its system requirements
- mailcow releases
- Authentik: mailcow integration
- Dovecot support status
- Roundcube releases
- CISA Known Exploited Vulnerabilities catalogue
- Stalwart releases
- Stalwart Enterprise features
- Mailu security advisories
- Maddy security advisories
- Mox
- Cloudflare Email Service docs
- Privacy Guides: self-hosting email