Boletines (listmonk)
Boletines en una caja Self Host Wizard: la pieza listmonk, en news.<dominio de apps>, ingreso oidc, límite de memoria 78 MB.
De un vistazo
| Dato | Valor |
|---|---|
| Dirección | https://news.<dominio de apps> |
| Ingreso | oidc: OpenID Connect con Authelia: el ingreso de la oficina sirve también acá |
| Límite de memoria | 78 MB (ram_mb: pico medido × 1,3) |
| Base de datos | postgres |
| Necesita | lldap, authelia, postgres |
| La necesitan | nada |
| Contenedores | listmonk |
Imagen: listmonk | listmonk/listmonk:v6.2.0@sha256:f535d59e14991337a9f2d570273685378ae86b0d7698c3e00da444e3bc205286 |
| Script de configuración al arrancar | scripts/post-up.sh, cada 5m |
| Licencia (según el README) | AGPL-3.0 |
| Proyecto original (según el README) | https://listmonk.app |
Cómo activarla
thx enable agrega listmonk y todo lo que necesita al estado de la caja; después thx apply la instala. Las apps se aplican recién cuando site_domain está definido.
sudo thx enable listmonk
sudo thx apply
Notas técnicas (pieces/listmonk/README.md)
Las notas técnicas de cada pieza están en inglés, tal como están en el repositorio.
listmonk v6.2.0, AGPL-3.0. Lists, subscribers, campaigns, templates,
analytics, and public subscription and archive pages, in a single Go binary. Image
listmonk/listmonk:v6.2.0 (Alpine), pinned by index digest sha256:f535d59e…5286, which is also
latest. The index has linux/arm64 (docker buildx imagetools inspect, 2026-11-25). We pull the
upstream image unmodified and ship compose plus a post_up.
How it is wired
Login: OIDC through Authelia (
auth = "oidc").- Redirect URI
https://news.<apps_domain>/auth/oidc, scopesopenid profile email(what listmonk asks for). - The token endpoint is called with HTTP Basic (Go oauth2 auto-detect, tried first), which
matches the default
client_secret_basic. - listmonk reads the e-mail and name, and signs in the account with that e-mail, or creates
one at the first sign-in (
auto_create_users). - Login is automatic.
scripts/static/public/templates/login.html(mounted read-only at/thx-static,--static-dir; listmonk keeps its own copy of every other file) is upstream's v6.2.0 login page with the Authelia form submitting itself: openinghttps://news.<apps_domain>/adminwith an Authelia session lands in the admin with no click; without one, Authelia's form once and straight back. It does not submit when the page shows an error, when the person came from listmonk's own pages (after signing out the login page stays), or twice within a minute, so a failed sign-in shows listmonk's error instead of looping. (listmonk's sign-in starts with a POST carrying the page's nonce, so Caddy'slogin_page/login_startcannot do it.)
- Redirect URI
Roles come from post_up, not from the login. listmonk ignores the groups claim and has no login hook, so
post_upruns every 5 minutes (post_up_every). It reads LLDAP's users and groups (GraphQL as the box's read-only bind user), makes the account ahead of the first sign-in for every directory person who should have access (username = e-mail, no password: what listmonk's own auto-create makes), and converges every person who came in through Authelia (users without a listmonk password):LLDAP listmonk user role list role status adminsSuper Admin — enabled org-<org>(one or more)Org editor org-<org>(ororg-a+org-b)enabled no org No access — enabled suspended, or gone from LLDAPNo access — disabled - A person already in LLDAP at the last run has their role and lists on their first visit. Only someone added to LLDAP since then and signing in before the next run starts as "No access" (the OIDC default role), for at most 5 minutes (tested).
- listmonk loads a session's user and role from the database on every request, so a downgrade
applies at once, even in an open session (tested). Authelia's
thxpolicy already refuses a suspended person a new sign-in. - The break-glass
thxadminand API users are never touched.
Org editor:
- It may get, manage, send and analyse campaigns; get, manage and import subscribers; get templates; and get and manage media.
- Lists, and through them subscribers and campaigns, are limited to the list role: alice
(org-acme) sees only the
acmelist and cannot create a campaign onbeta's (tested). - It has no settings, users, roles, bounces or template editing.
- Per company:
post_upcreates a private, double opt-in list named after the org, plus list roleorg-<org>(get + manage). An admin can add more lists and attach them to that role by hand. - Mail: one SMTP server,
THX_SMTP_HOST:THX_SMTP_PORT, with no auth and no TLS (the hop never leaves the piece network). EHLO usesTHX_HOST, not Go's defaultlocalhost. Campaigns are sent fromNewsletter <THX_MAIL_FROM>by default. A campaign may set another from address, and stalwart's sender rules then decide. - Sending cap (
post_up, reverted if edited): at most 50 messages per 24 h sliding window, at 1 message/s on 1 worker. The box relays through the cloud provider's email service, about 3,000 e-mails a month free for everything on the box, and newsletters get about half. listmonk keeps the window in memory, so a restart starts a fresh window: it is a brake, not accounting. Raising it is an owner decision. - Public pages: Caddy proxies everything (OIDC piece). listmonk itself keeps the admin and API
behind its session, and serves the subscription form, opt-in, unsubscribe, archive and
/uploadspublicly, as it must. The public form has the altcha proof-of-work captcha on. - Break-glass admin:
thxadmin, created by the first--installwith the thx secretadmin_password.post_upsigns in as it. listmonk cannot turn the password form off while that user exists, so the login page folds it under "Administrator sign-in (only while the office sign-in is down)". - Storage: Postgres from the box (
db = "postgres"; the schema createspgcrypto, which a database owner may do).THX_DATA/uploadsholds campaign media.THX_DATA/stateholds post_up's sha256 of the OIDC client secret: the API returns secrets masked, so this hash is how post_up notices a rotated secret. - Upgrades: the container runs
--install --idempotent(schema on an empty database only), then--upgrade(the migrations of a newer pinned version), then the app.
How far org separation got
Lists, subscribers and campaigns are separated per company through list roles (tested). Templates
and media are global in listmonk: every company's editors see, and may use, every template and
uploaded image. settings (SMTP, branding, the public pages' look) are box-wide and admin-only.
team-* and org-*-admins groups are not mapped.
The first install's sample data stays: a "Default list" and an "Opt-in list" with two
@example.com subscribers, a sample campaign and templates. Only a Super Admin sees the sample
lists; delete them by hand.
Test (./test.sh)
HEAVY_CLASS=check ~/.cache/run-heavy.sh 2G pieces/listmonk/test.sh. The limit bounds only the
test process. testkit/thxtest.py is the lane stack: LLDAP, Authelia with the client as thx
generates it, Caddy with a test CA (listmonk trusts it through SSL_CERT_FILE, test-only),
Postgres, and Mailpit as stalwart. scripts/ lands 0644 as on the box.
It proves:
- The container gets healthy, and post_up prints
changed, then nothing. - The settings thx owns are live: OIDC, SMTP with the EHLO name, from address, cap, one list per org.
- In headless Chrome: alice (Authelia session) opens the admin and is in, as acme's Org editor, with no click; after signing out the login page stays and its password form is folded; ann (no session) signs in at Authelia once and lands in acme's admin.
- dan, added to LLDAP after post_up ran, signs in and gets "No access" until the next run.
- After post_up (quiet on its second run), alice sees only
acme, bob onlybeta, and boss (admins) is Super Admin and sees everything. - alice adds a subscriber and sends a campaign test mail, which arrives from
THX_MAIL_FROM. A campaign on beta's list is refused. - alice imports a 2,000-row CSV into
acme, and the list then holds 2,001 subscribers. - bob is added to
suspended: post_up disables him, and his open session sees no lists, with 403 on campaigns. - The subscription form is public, the API answers 403, and the admin redirects to the login.
- State and uploads live in
THX_DATA. - There is no OOM kill.
Measured
RAM, dev PC (amd64), measured over the whole test. Sampled from the cgroup every 0.25 s, page cache excluded. Nine runs (office3 lane, 2026-11-25):
- No limit: 36, 41, 40, 37, 38 and 36 MiB. The last three include a 2,000-row CSV import, which did not move the peak.
- Under 54m: 52 MiB. Go's GC timing varies run to run.
- Under 68m: 37 and 36 MiB.
With the headless-Chrome sign-ins and post_up making accounts ahead of the first sign-in (sso lane, 2026-11-25), one run under 68m peaked at 60 MiB.
ram_mb = 78 (60 × 1.3), with mem_limit: 78m. Every run under 68m passed with no OOM kill.
A send to a large list runs one worker in batches of 50 (the cap above), so it stays small. Re-measure on the box if the cap is raised a lot.
Known gaps
- People added to LLDAP since the last post_up wait up to 5 minutes for their lists (above).
- listmonk runs one subscriber import at a time for the whole box, and its status (file name, log) is visible to every person with import rights, other companies included.
- Bounce processing is not configured: there is no bounce mailbox. Hard bounces from the relay are not fed back.
- listmonk's logout ends the listmonk session only. The next "Log in with Self Host Wizard" goes straight through while the Authelia session lasts.