Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 10:14
· 72 commits to main since this release
54e2d26

Breaking: upgrade

2.0.0 does not read a 1.x data directory. A data directory with iglo-email.db at its root is refused at start: the server prints one line naming the directory and exits with status 1, and writes nothing to it. Nothing converts the old layout (D142). To move a 1.x install to 2.0.0:

  1. Take a backup with the 1.x executable (iglo.email backup) and keep the old data directory.
  2. Either start 2.0.0 on an empty data directory, with IGLO_EMAIL_ADMIN_USER and IGLO_EMAIL_ADMIN_PASSWORD set for the first start, and re-create the data through the API, CSV import or MCP;
  3. or restore the 1.x backup as the primary project: with the server stopped, copy it (the iglo-email.db with its uploads) into projects/main/ of an empty data directory and start with the admin variables set, which adopts it as the primary project (Operations, "Restore details"). Like every restored backup it starts held: release it with iglo.email backup --release-hold --consent-reconciled --project main once consent is reconciled (without --project the command releases only instance.db and the project stays held).
  4. Enter the instance settings again (SMTP, send rate, bounce processing, security, media storage, admin appearance) on the instance's Settings page: they now live in instance.db, and a restored project database does not carry them.

See Upgrades in the operations guide.

New features

  • Several projects per instance (D142). One process serves several projects. Each project is its own SQLite database under data/projects/<slug>/ with its own subscribers, lists, campaigns, templates, users, API credentials and MCP endpoint, served on its own hostname. A single-project install is the primary project main on the --root-url host, as before.
  • Host routing and extra hostnames (D151, D157). A request's Host (lowercased, without the port; X-Forwarded-Host is ignored) picks the project. A project has one main hostname and optional extra hostnames, so mail already sent from an old hostname keeps working while the old name is listed. An API credential works only on its own project's host; the same user:token on another project's host is 401.
  • The instance admin and one admin account (D153). The admin account set by IGLO_EMAIL_ADMIN_* lives in instance.db and is copied into every project as a Super Admin. Signing in at /admin/instance/login on the instance host opens any project through a short-lived handoff link, with no second sign-in. A password or TOTP change made in any project, on the instance Account page or with reset-password/reset-totp applies everywhere. Inside a project the admin's copy cannot be renamed, demoted, disabled or deleted, and other users and API credentials cannot change its password or email.
  • Instance and project settings (D154). Settings that exist once per process (SMTP, messaging.max_send_rate, the Amazon SES API keys, bounce processing and its providers, trusted proxies, session length, OIDC, the webhook private-address block, maintenance, slow-query caching, media storage, the admin appearance) are instance settings on /admin/instance/settings and /api/instance/settings. The rest stay per project.
  • The dispatcher and the effective rate (D155, D161). One dispatcher paces every send of every project at the instance's rate: transactional mail first, then marketing, then campaigns, round-robin across projects within each class. The effective rate is the lower of messaging.max_send_rate and SES's MaxSendRate when SES API keys are saved.
  • SES account reading (D159). With ses.api_region, ses.api_access_key_id and ses.api_secret_access_key set (read-only IAM credentials for GetAccount), the instance reads the account's send rate and 24-hour quota and refreshes it. "Check SES account" on the instance settings page shows the values or AWS's error.
  • Quota guard (D161). When SES reports at most max(2% of the 24-hour quota, rate × 60) sends left, marketing and campaign sends stop being started until a newer reading is above that line. Transactional mail is not held. The start and end are logged as attention lines. There is no guard without SES keys or for an account with no daily limit.
  • Capacity forecast (D159). GET /api/sending/capacity (at, count, campaign_id; permission campaigns:get) says whether the busiest 24 hours around a planned send fit the SES quota, counting every project's sends, campaigns and schedules. MCP tool get_sending_capacity; the MCP instructions say to check capacity before scheduling a large campaign.
  • Forecast on the campaign page (D159). A saved draft, paused or scheduled campaign shows whether it fits the quota at the form's send time, and the confirmation says so when it does not.
  • Sending page (D162). /admin/instance/sending shows the effective rate and its inputs, the SES account reading and its age, whether the quota guard holds, and the forecast for the last 24 hours.
  • Projects page and the project switcher (D157). /admin/instance/projects lists every project with its hostnames, queued marketing sends, running campaigns and messages sent in the last 24 hours. A project's header has a switcher to every project for the admin.
  • Logs page (D157). /admin/instance/logs merges the instance's attention lines and every project's log, labelled by source. Every stderr line now starts with [<slug>] or [instance] .
  • Creating and deleting projects at runtime (D157). The Projects page (or POST, PUT, DELETE /api/instance/projects) creates a project, edits its name and extra hostnames, and deletes it with the slug typed as confirmation. A delete stops the project's sending, lets its requests finish, and keeps a final snapshot (backups/deleted/<slug>-<time>.db and .tar). Directories under projects/ with no registered project are reported and never served.
  • Backup of the instance or one project (D158). iglo.email backup writes instance.db and every project into one directory, published only when every snapshot is complete; --project <slug> backs up one project. Restore is a file copy per database with the server stopped.
  • Restore hold per database (D158). A restored project's database holds that project's marketing sends; a restored instance.db holds every project. backup --release-hold --consent-reconciled [--project <slug>] releases one.
  • Preference center (D160). The manage page (?manage=true) offers every active public list, including ones the subscriber left, and can show profile fields defined in the project setting privacy.preference_fields (text, number, boolean, date or select; editable or read-only; at most 20). Joining a double opt-in list sends the usual opt-in mail, within the one-mail-per-address window. Blocklisted and marketing-suppressed subscribers are offered no list. Transactional manage pages show no profile fields. The unsubscribe pages link to "Manage preferences" when there is something to manage.

Changed behaviour and API changes

  • Settings split (D154). A project's GET /api/settings serves project keys and app.root_url only. A PUT /api/settings or PUT /api/settings/:key that names an instance key, or a name that is no setting, is 400 "Not a project setting: …" with nothing written; it used to be ignored. Instance keys change only through /api/instance/settings with the instance session.
  • Campaign pacing keys removed (D142, D155). app.concurrency, app.message_rate, app.batch_size, app.message_sliding_window, app.message_sliding_window_duration and app.message_sliding_window_rate no longer exist. A write naming one is 400. A script that set them must drop them; the dispatcher's rate replaces them.
  • Instance routes (D153, D154, D157). /admin/instance/** and /api/instance/** on the instance host and on hosts no project claims are the instance's pages and JSON routes. They take only the instance session cookie with its CSRF token, answer 401 to any Authorization header, and are not in OpenAPI or MCP. With no primary project, those hosts answer /health, redirect /admin to the Projects page, and 404 anything else.
  • SES notifications (D156). POST /webhooks/service/ses is served by the instance, not by a project, and routes each notice to the project that sent the mail by its Message-ID. A notice that matches no project is answered 200, stored nowhere and logged as an attention line. On a project's own host the path is 400 Unknown service.
  • IGLO_EMAIL_API_USER/IGLO_EMAIL_API_TOKEN seed the primary project only: an API credential belongs to one project (D151).
  • /health on the instance host answers for the instance: 503 once any project's loops have failed (D151).
  • The users API refuses changes to the admin's copy with 403, and creating a user with the admin's username with 409 (D153).
  • POST /api/tx with marketing messages waits a bounded time for a send slot when sending is busy or held, then returns with those messages queued (D155).

Fixes

  • An orderly shutdown with a send in SMTP flight no longer leaves transactional mail queued behind it for the connection marked unknown: it stays queued and is sent after the restart (B141a).

Other upgrade notes

  • Migrations run on start: project migrations 32 to 35 (the admin copy mark, removal of instance keys from project databases, a send index by kind, and a send index by start time), and instance.db's own migrations.
  • SES API keys are optional. Without them the send rate setting alone applies and there is no forecast or quota guard.
  • An external probe that used /health on the instance host now sees the instance's health.
  • A reverse proxy must pass each project's hostname through in Host.