Listmonk — Mailing List Operations
Overview
Almanack uses Listmonk (self-hosted) for its mailing list, with PurelyMail for outbound SMTP delivery.
Access
- Admin UI:
http://<tailscale-host>:9000(Tailscale only) - Public API: https://list.almnck.com/api/public/subscription
- Data:
/var/local/listmonk/on production host
Commands
make list-count # Show confirmed subscriber count
make list-export # Export names and emails to stdout
make list-backup # Download Postgres dump to db-backups/
Configuration
SMTP (PurelyMail)
Configured in Listmonk admin → Settings → SMTP:
| Field | Value |
|---|---|
| Host | smtp.purelymail.com |
| Port | 587 |
| Auth | LOGIN |
| TLS | STARTTLS |
| From | list@almnck.com |
Secrets
- DB password:
/var/local/listmonk/secrets/db_password - Listmonk env:
/var/local/listmonk/.env - SMTP credentials: configured in Listmonk admin UI
Backup & Restore
Backup
make list-backup
# → db-backups/listmonk-YYYY-MM-DDTHH.sql.gz
Restore
# Stop Listmonk
ssh "$PROD_HOST" 'cd ~ && podman-compose stop listmonk'
# Restore
gunzip -c db-backups/listmonk-XXXX.sql.gz | \
ssh "$PROD_HOST" 'podman exec -i almanack-listmonk-db-1 psql -U listmonk -d listmonk'
# Restart
ssh "$PROD_HOST" 'cd ~ && podman-compose start listmonk'
Margin Box
The subscribe margin box is at editorial/margin-boxes/subscribe/.
It has an interactive JS module that replaces the static content
with an inline form, pre-filled with the reader’s identity name.
The list UUID must be set in two places:
- editorial/margin-boxes/subscribe/assets/code.js
- editorial/pages/subscribe/page.md
Public Page Styling
Listmonk’s subscriber-facing pages (opt-in confirmation, unsubscribe, preference management) are styled to match the Almanack aesthetic using a custom public template.
Template Source
assets/system/listmonk-public-template.html
A self-contained Go HTML template with inline CSS. Uses the Almanack illuminated manuscript palette, serif typography (EB Garamond body, IM Fell English SC display), and the triple-rule masthead ornament. Fonts are loaded from Google Fonts CDN to avoid CORS issues.
Deploying the Template
- Open Listmonk admin → Settings → Appearance
- Paste the contents of
assets/system/listmonk-public-template.htmlinto the Public template field - Save
Caddy Routes
The docker-compose exposes these Listmonk paths publicly:
| Route | Purpose |
|---|---|
/api/public/* |
Public subscription API |
/subscription/* |
Subscriber-facing pages |
Everything else returns 404. The public template inlines all CSS so it doesn’t depend on Listmonk’s default stylesheet or static assets.
Abuse Prevention
| Layer | Mechanism |
|---|---|
| Caddy | 5 req/min/IP rate limit on subscription endpoint |
| Form | Hidden honeypot field |
| JS | 30s button debounce after submit |
| Listmonk | Double opt-in email |
| Admin | Tailscale-only access |