Product

Mailio: Email Hosting as a Service, Built on Mailcow

Running email infrastructure is hard. Mailcow makes it possible to self-host. Mailio wraps Mailcow with a billing layer, a self-service UI, and automated provisioning — so any managed service provider can offer email hosting without touching server configuration.

Eren Bostan July 22, 2024 5 min read

Email is infrastructure. It runs in the background, it's expected to always work, and when it doesn't, everything stops. Building email hosting on top of commodity platforms — Google Workspace, Microsoft 365 — is simple enough, but it means accepting pricing, terms, and data residency decisions you don't control. Running your own email infrastructure means dealing with Postfix, Dovecot, rspamd, and a stack of configuration that changes every time RFC requirements or spam filtering standards shift.

Mailcow solves the infrastructure layer. It's a well-maintained, Docker-based open-source mail server stack that handles the hard parts: SMTP, IMAP, spam filtering, DKIM signing, DMARC, and a usable admin interface. Mailio wraps Mailcow with the business layer that Mailcow doesn't include: subscription management, automated user provisioning, a self-service customer portal, and the billing plumbing that makes it a sellable service rather than a self-hosted tool.

What Mailio Does

Mailio is a SaaS layer for email hosting businesses — managed service providers, agencies, or any organization that wants to offer email hosting to their clients without building the billing and provisioning infrastructure themselves.

A customer signs up, chooses a plan, and gets access to a self-service portal. From that portal they can add custom domains (with DNS verification via TXT records), create mailboxes, set storage quotas, configure email aliases with forwarding rules, and retrieve connection details for their email clients — IMAP, SMTP, POP3 server addresses and ports. The portal also provides webmail access via SOGo and Roundcube through a single sign-on integration, so customers who don't want to configure a local email client can use the browser instead.

Every operation the customer performs in the portal translates into an API call to the Mailcow backend. Mailio acts as a controlled gateway to Mailcow — it enforces plan limits (maximum domains, mailboxes, aliases, total storage) before any Mailcow API call is made. A customer on a Starter plan cannot create a fourth domain; the attempt is rejected at the Mailio layer, not at Mailcow.

Billing and Dunning

Subscription management runs through Laravel Cashier and Stripe. The standard subscription lifecycle — creation, plan changes, cancellation, reactivation — is handled by Cashier. On top of that, Mailio adds a dunning system: a scheduler-based sequence of retry attempts and escalating notification emails when a payment fails.

The subscription state has operational consequences. When a subscription is cancelled or payment fails past the grace period, Mailio automatically deactivates the customer's mailboxes in Mailcow — they still exist and can be reactivated, but mail stops being delivered. When a subscription is reactivated (payment recovered or plan resumed), the mailboxes are re-enabled automatically. No manual intervention is required on either side.

DNS and Domain Verification

When a customer adds a domain, Mailio generates the required DNS records: MX, SPF, DKIM, and DMARC. The verification flow requires the customer to add a specific TXT record to their domain's DNS. Mailio checks for that TXT record, and only after successful verification does it provision the domain in Mailcow and make mailboxes under it available.

The generated DNS instructions are displayed in the portal in a format that matches the common DNS management interface layouts — one record per row, with the exact values to copy, and notes about which fields map to which DNS configuration fields in common registrars. This reduces the support surface for the most common setup question: "what DNS records do I need?"

The Admin Panel

The admin interface manages the operator side: company accounts, subscription states, plan configurations, invoice management including refunds, system notification logs, and announcements. Plan configuration is flexible — each plan is defined with numeric limits for domains, mailboxes, aliases, and storage, plus a feature flag set for capabilities available at that tier.

Mailio is live at mailio.talivio.com. It's designed to run as a white-label service — an MSP can deploy their own instance of Mailio against their own Mailcow server, with their own branding, and offer email hosting to their clients without any Talivio branding visible to end users.

#Mailio #Email #Mailcow #Hosting #SaaS
EB
Eren Bostan
Co-Founder & Developer, Talivio Technology OÜ

More from the Blog