Certain SMTP hosts limit the total number of messages that can be
sent within a window, for instance, X / 24 hours. The concurrency
and message rate controls can only limit that to a max of
1 messages / second, without a global cap.
This commit introduces a simple sliding window rate limit feature
that counts the number of messages sent in a specific window, and
upon reaching that limit, waits for the window to reset before
any more messages are pushed out globally across any number of
campaigns.
Context: https://github.com/knadh/listmonk/issues/119
The link_clicks.link_id table was NULLable incorrectly. Links that
do not exist should not register a tracking entry. Fix the query
and also update the schema + migration (breaking table change).
A new toggle switch in Settings -> Privacy, which is off by
default, allows campaign views (pixel) and link clicks to function
without registering the subscriber ID against view and click
events, anonymising tracking. When off, the subscriber UUIDs in
view and link tracking URLs are removed, anonymising subscriber
information from HTTP logs as well.
- On boot, the app now checks if the DB version matches its
expected version and refuses to start if there are pending
migrations to be run.
- The new `--upgrade` flag runs data migrations from the last
recorded migration (in the settings table) to the latest one
in the binary.
- Migrations are DB/arbitrary logic functions in .go files in
internal/migrations.
- All migration functions are idempotent.
- Added as a setting in the settings UI.
- Refactor Messenger.Push() method to accept messenger.Message{}
instead of a growing number of positional arguments.
This is a major breaking change that moves away from having the
entire app configuration in external TOML files to settings being
in the database with a UI to update them dynamically.
The app loads all config into memory (app settings, SMTP conf)
on boot. "Hot" replacing them is complex and it's a fair tradeoff
to instead just restart the application as it is practically
instant.
A new `settings` table stores arbitrary string keys with a JSONB
value field which happens to support arbitrary types. After every
settings update, the app gracefully releases all resources
(HTTP server, DB pool, SMTP pool etc.) and restarts itself,
occupying the same PID. If there are any running campaigns, the
auto-restart doesn't happen and the user is prompted to invoke
it manually with a one-click button once all running campaigns
have been paused.
- Fix path related issues in filesystem and S3.
- Add checks for S3 "/" path prefix.
- Add support for custom S3 domain names.
- Remove obsolete `width` and `height` columns from media table (breaking)
- Add `provider` field to media table (breaking)
- Campaigns now have a `type` property (regular, opt-in)
- Opt-in campaigns work for double opt-in lists and e-mail
subscribers who haven't confirmed their subscriptions.
- Lists UI shows a 'Send opt-in campaign' optin that
automatically creates an opt-in campaign for the list
with a default message body that can be tweaked before
sending the campaign.
- Primary usecase is to send opt-in campaigns to subscribers
who are added via bulk import.
This is a breaking change. Adds a new Postgres enum type
`campaign_type` and a new column `type` to the campaigns table.
- Lists can now be marked as single | double optin.
- Insert subscribers to double opt-in lists send out a
confirmation e-mail to the subscriber with a confirmation link.
- Add `{{ OptinURL }}` to template functions.
This is a breaking change. Adds a new field 'optin' to the lists
table and changes how campaigns behave. Campaigns on double opt-in
lists exclude subscribers who haven't explicitly confirmed subscriptions.
Changes the structure and behaviour of how notification e-mail routines,
including notif email template compilation, notification callbacks for
campaign and bulk import completions.