Mailtrain logo

Mailtrain

Self-hosted newsletter platform with advanced automation and segmentation

Node.js-based newsletter application offering subscriber management, list segmentation, custom templates, automation, and built-in mail delivery for complete control over email campaigns.

Overview

Overview

Mailtrain v2 is a self-hosted newsletter application built on Node.js (v14+) and MySQL (v8+) or MariaDB (v10+). Designed for organizations that need full control over their email marketing infrastructure, it provides enterprise-grade features without vendor lock-in or per-subscriber pricing.

Core Capabilities

The platform delivers comprehensive subscriber list management with advanced segmentation and custom fields. Users can create email templates using MJML, build custom reports, and deploy triggered campaigns or RSS-based automation. Multi-user support includes granular permissions and hierarchical namespaces suitable for enterprise deployments.

A standout feature is the built-in Zone-MTA integration, enabling near-zero-configuration mail delivery without relying on third-party SMTP services. The architecture separates trusted (admin), sandbox (template editor), and public (subscriber) endpoints to prevent XSS attacks in multi-user environments.

Deployment

Mailtrain runs on CentOS 7, Ubuntu 18.04 LTS, or via Docker Compose. Recommended hardware includes 2 vCPUs and 4 GB RAM. Installation scripts support both public HTTPS deployments with Let's Encrypt certificates and local HTTP setups for development. The platform requires three DNS endpoints pointing to the same IP address for secure operation.

Highlights

Built-in Zone-MTA for independent mail delivery without external SMTP
Multi-user support with granular permissions and hierarchical namespaces
Advanced automation including triggered campaigns and RSS feeds
Three-endpoint architecture (trusted/sandbox/public) preventing XSS attacks

Pros

  • Complete control over email infrastructure and subscriber data
  • No per-subscriber pricing or vendor lock-in
  • Enterprise-ready with hierarchical namespaces and user permissions
  • MJML template support for responsive email design

Considerations

  • Requires server administration knowledge and infrastructure management
  • Minimum 4 GB RAM and 2 vCPU hardware requirements
  • Three separate DNS endpoints needed for secure deployment
  • Complete rewrite from v1 requires fresh installation

Managed products teams compare with

When teams consider Mailtrain, these hosted platforms usually appear on the same shortlist.

beehiiv logo

beehiiv

Newsletter platform built to help creators easily start, grow, and monetize email newsletters

Buttondown logo

Buttondown

Lightweight newsletter platform for creators with automation and paid subscriptions

Substack logo

Substack

Publishing platform for newsletters

Looking for a hosted option? These are the services engineering teams benchmark against before choosing open source.

Fit guide

Great for

  • Organizations requiring full data sovereignty and infrastructure control
  • Enterprises needing multi-tenant deployments with hierarchical permissions
  • Teams wanting to eliminate per-subscriber SaaS costs
  • Users with technical resources to manage self-hosted applications

Not ideal when

  • Non-technical users without server administration experience
  • Small projects unable to dedicate 4 GB RAM minimum
  • Teams requiring immediate deployment without DNS configuration
  • Organizations preferring managed SaaS solutions over self-hosting

How teams use it

Enterprise Multi-Brand Newsletters

Manage multiple brand newsletters with hierarchical namespaces, granular user permissions, and centralized reporting while maintaining data sovereignty.

Automated Customer Onboarding

Deploy triggered email campaigns based on subscriber actions, custom fields, and list segments without relying on external automation platforms.

RSS-to-Email Content Distribution

Automatically convert RSS feeds into formatted email campaigns, enabling consistent content delivery to subscriber lists without manual intervention.

High-Volume Sending with Built-in MTA

Send large email volumes using integrated Zone-MTA without configuring external SMTP services or paying per-email fees to third-party providers.

Tech snapshot

JavaScript85%
HTML10%
Handlebars2%
CSS1%
SCSS1%
Shell1%

Tags

email-marketingmarketing-automationmailtrain

Frequently asked questions

Can I upgrade from Mailtrain v1 to v2?

Mailtrain v2 is a complete rewrite. Back up your v1 database and use it with v2; the system should automatically upgrade the schema to the new format.

Why does Mailtrain require three DNS endpoints?

The trusted, sandbox, and public endpoints provide security isolation to prevent XSS attacks in multi-user environments. All three DNS records point to the same IP address.

What databases does Mailtrain v2 support?

Mailtrain v2 requires MySQL v8+ or MariaDB v10+. The Docker Compose setup includes MariaDB by default.

Does Mailtrain include mail delivery capabilities?

Yes, Mailtrain includes built-in Zone-MTA for near-zero-configuration mail delivery. You can also configure external SMTP services if preferred.

What are the minimum hardware requirements?

Mailtrain requires at least 2 vCPUs and 4 GB RAM. Actual requirements depend on subscriber count and sending volume.

Project at a glance

Stable
Stars
5,716
Watchers
5,716
Forks
710
LicenseGPL-3.0
Repo age9 years old
Last commit4 months ago
Self-hostingSupported
Primary languageJavaScript

Last synced yesterday