On this page
Day 11 - KM0 Email in production
@km0digital.com mail with Postfix, Dovecot, Rspamd, and Roundcube on mail.km0digital.com; MX/SPF/DKIM/DMARC DNS, OpenCloud relay, and phase 1b plans.
Introduction
Day 9 shipped pricing, legal, OpenCloud registration, and conversion polish. We did not publish a day 10 entry (internal mail deployment without an article). On 14 June 2026 we turned on KM0 Email: @km0digital.com mailboxes, webmail at mail.km0digital.com, and SMTP relay for OpenCloud notifications.
KM0 no longer relies on Gmail or external APIs for operational mail on the domain, and opens the path to registration verification, idea alerts, and marketing on the same infrastructure.
Summary
Day milestones
- Stack: AMVARA-CONSULTING/km0-mail repo with Postfix, Dovecot, Rspamd, Roundcube, and PostgreSQL (Docker Compose).
- Hostname:
mail.km0digital.comon the same VPS as OpenCloud (116.202.10.106). - Webmail: Nginx + Let's Encrypt to Roundcube on loopback
:8080. - Operations:
postmaster@andnoreply@mailboxes; CLI./scripts/km0-mail-admin. - Security: Rspamd + DKIM signing; fail2ban
km0-mailjail; UFW 25, 587, 993. - OpenCloud: local Postfix relay (
host.docker.internal:587, no auth) with sendernoreply@km0digital.com.
KM0 Email
Architecture and flow
Internet (MX @ → mail.km0digital.com)
↓
Postfix (:25 / :587 submission)
↓
Rspamd (anti-spam, DKIM signing)
↓
Dovecot (:993 IMAPS) → Maildir
↓
Roundcube (webmail, loopback :8080 → Nginx TLS)- Inbound: Postfix accepts mail for
@km0digital.comand delivers to Maildir via Dovecot LMTP. - Outbound: authenticated clients (587) and internal relay from OpenCloud without Docker-network credentials.
- Webmail: Roundcube talks to Dovecot; public access only via HTTPS on the mail subdomain.
- Admin:
km0-mail-admin create-mailbox,alias,set-passworddocumented in the km0-mail runbook. - Reference issue: km0-mail #1 (Redmine #7605).
DNS
Deliverability
Without correct records mail lands in spam or bounces. The full checklist lives in docs/joker-dns-checklist.md in the km0-mail repo.
- MX:
@→mail.km0digital.com. - SPF: TXT record authorising the KM0 outbound server.
- DKIM: selector
mail._domainkeywith public key in DNS. - DMARC: policy
p=nonewith reports topostmaster@km0digital.com. - PTR: Hetzner points to
mail.km0digital.com(consistent with HELO/EHLO).
OpenCloud
Phase 1 integration (partial)
OpenCloud (notifications)
↓
host.docker.internal:587 (Postfix relay, no auth)
↓
Postfix → Rspamd → Internet outbound
Sender: noreply@km0digital.com- km0-opencloud:
SMTP_*variables in.envandextra_hostsin compose to reach host Postfix. - Scope: cloud notifications already leave via KM0 Email; registration email verification remains pending (phase 1b).
- LDAP: no unification in phase 1;
mail_accounts.opencloud_uuidcolumn reserved for later.
Product
Decisions today
- Pricing: mail included de facto in the KM0 offer; executive pricing decision later.
- Scale: target >1000 mailboxes before year end.
- Legal: /legal/ and /security/ pages do not yet cover
mail.km0digital.com(separate issue). - Services: Email card on the home page stays disabled until phase 1b (separate issue).
Roadmap
Phase 1b pending
The following is planned but not implemented yet in this release:
- register-api: email verification via local Postfix (replace Gmail/external).
- km0-web
scripts/notify-idea-email.sh: local relay (today AutoMail API). - Marketing / tmp: local SMTP for campaigns and temporary environments.
- Legal and security on km0-web: cover
mail.km0digital.com. - Email block in services: enable active card on the landing.
- Backup: maildir cron documented in runbook.
- Phase 2: ClamAV, LDAP unification, automated provisioning.
Verification
Check day 11
- Webmail: open mail.km0digital.com and verify TLS certificate.
- MX:
dig +short MX km0digital.comshould resolve tomail.km0digital.com. - SPF:
dig +short TXT km0digital.comincludes an SPF record. - DKIM:
dig +short TXT mail._domainkey.km0digital.comreturns the public key. - DMARC:
dig +short TXT _dmarc.km0digital.comshows policy and reporting. - PTR:
dig +short -x 116.202.10.106matches the mail server hostname. - Checklist: follow joker-dns-checklist.md step by step.
- OpenCloud: trigger a test notification and verify sender
noreply@km0digital.com.
Series
Next entry
Day 12 covers the client talk on UX; day 13 covers meet 6: visibility, associations (PTAs, neighbours), and commercial next steps. Meanwhile, try the webmail or see pricing. Questions: contact.
More from the blog
- Day 20 - Tutorials by product: Cloud and Mail, step by step We reorganized the tutorials by product and added simple KM0 Mail guides: create an account, sign in, and use your own domain.
- Day 19 - KM0 Mail: native sign-in, self-service registration, and your own domains KM0 Mail no longer relies on external redirects: native login, one-minute registration, and self-managed custom domains from webmail.