What Listmonk Does
- Subscriber Management: Import, segment, and manage subscriber lists with custom attributes
- Campaign Creation: Rich HTML email editor with template support and media management
- Transactional Email: API for sending transactional emails (welcome, reset, notifications)
- Analytics: Open rates, click rates, bounce tracking, and campaign performance metrics
- List Segmentation: Dynamic segments based on subscriber attributes and engagement
- Double Opt-in: Configurable double opt-in with customizable confirmation emails
- Template System: Go template engine for dynamic, personalized email content
- Multi-list: Manage multiple independent mailing lists from one instance
- SMTP Integration: Works with any SMTP provider (SES, Postmark, SendGrid, self-hosted)
- API: Full REST API for programmatic subscriber and campaign management
Architecture
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Admin UI │────▶│ Listmonk │────▶│ PostgreSQL │
│ (React) │ │ Server (Go) │ │ (Subscribers│
└──────────────┘ └──────┬───────┘ │ & Campaigns)│
│ └──────────────┘
┌──────┴───────┐
│ SMTP Server │
│ (SES/SMTP) │
└──────────────┘Self-Hosting
Docker Compose (Recommended)
services:
listmonk:
image: listmonk/listmonk:latest
ports:
- "9000:9000"
environment:
TZ: Asia/Shanghai
volumes:
- ./config.toml:/listmonk/config.toml
depends_on:
- db
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: listmonk
POSTGRES_PASSWORD: listmonk
POSTGRES_DB: listmonk
volumes:
- pg-data:/var/lib/postgresql/data
volumes:
pg-data:SMTP Configuration
# config.toml
[smtp]
host = "email-smtp.us-east-1.amazonaws.com"
port = 587
auth_protocol = "login"
username = "YOUR_SES_KEY"
password = "YOUR_SES_SECRET"
tls_type = "STARTTLS"
max_conns = 10
idle_timeout = "15s"
wait_timeout = "5s"Recommended SMTP providers:
- Amazon SES: $0.10/1000 emails (cheapest at scale)
- Postmark: $1.25/1000 emails (best deliverability)
- SendGrid: 100/day free, then $0.50/1000
- Self-hosted: Postfix/Haraka (free but requires IP reputation management)
Key Features
Campaign Templates
<!-- Use Go template syntax -->
<h1>Hello {{ .Subscriber.FirstName }}!</h1>
{{ if eq .Subscriber.Attribs.plan "pro" }}
<p>As a Pro subscriber, you get early access to...</p>
{{ else }}
<p>Upgrade to Pro for exclusive content...</p>
{{ end }}
<a href="{{ .TrackLink "https://example.com/offer" }}">
Check out our latest offer
</a>
<p>Unsubscribe: {{ .UnsubscribeURL }}</p>REST API
# Add subscriber
curl -X POST http://localhost:9000/api/subscribers
-u "admin:admin"
-H "Content-Type: application/json"
-d '{"email": "user@example.com", "name": "John", "lists": [1], "attribs": {"plan": "free"}}'
# Send transactional email
curl -X POST http://localhost:9000/api/tx
-u "admin:admin"
-H "Content-Type: application/json"
-d '{"subscriber_email": "user@example.com", "template_id": 1, "data": {"order_id": "12345"}}'
# Create campaign
curl -X POST http://localhost:9000/api/campaigns
-u "admin:admin"
-H "Content-Type: application/json"
-d '{"name": "Weekly Update", "subject": "This Week in Tech", "lists": [1], "type": "regular", "content_type": "richtext", "body": "<h1>Hello!</h1>"}'Subscriber Import
Import from CSV with custom attribute mapping:
email,name,plan,signup_date
john@example.com,John Doe,pro,2024-01-15
jane@example.com,Jane Smith,free,2024-02-20Supports importing hundreds of thousands of subscribers in seconds.
Listmonk vs Alternatives
| Feature | Listmonk | Mailchimp | ConvertKit | Buttondown |
|---|---|---|---|---|
| Open Source | Yes (AGPL-3.0) | No | No | No |
| Self-hosted | Yes | No | No | No |
| Cost per 10K subs | $0 (+ SMTP) | $78/mo | $119/mo | $39/mo |
| Transactional | Yes | Separate (Mandrill) | No | No |
| Performance | Millions of subs | Unlimited | 500K limit | 100K limit |
| Template engine | Go templates | Drag & drop | Visual | Markdown |
| API | Full REST | Full REST | Full REST | Full REST |
常见问题
Q: Listmonk 的邮件送达率如何? A: 送达率取决于你的 SMTP 提供商和域名配置(SPF、DKIM、DMARC),不取决于 Listmonk 本身。使用 Amazon SES 或 Postmark 等专业服务可以达到 95%+ 送达率。
Q: 能处理多少订阅者? A: 单实例 Listmonk 可以轻松管理数百万订阅者。Go 编写的后端极其高效,发送速度主要受 SMTP 限制而非 Listmonk 本身。
Q: 支持邮件自动化序列吗? A: Listmonk 目前主要支持一次性和定时发送的 Campaign。自动化邮件序列(如欢迎邮件序列)可以通过 API + 外部调度器实现。原生自动化功能在开发路线图中。
来源与致谢
- GitHub: knadh/listmonk — 19.5K+ ⭐ | AGPL-3.0
- 官网: listmonk.app