Commit graph

173 commits

Author SHA1 Message Date
Sergey Minkov
3babd9020e
parse cc and bcc from custom headers to add them on email envelope (#1865) 2024-05-18 17:49:24 +05:30
Kailash Nadh
c108486041 Fix syntax error in manager from a previous, simple looking PR merge. Huh :O 2024-05-07 11:09:29 +05:30
Jonas Sulzer
1d32d4c368
👌 IMPROVE: make RootURL available in email templates (#1812)
Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
2024-04-04 22:57:52 +05:30
Kailash Nadh
7c44eb02a4 Replace Go easyjson lib. 2024-01-27 20:59:24 +05:30
Kailash Nadh
f14df890a4 Update Go deps. 2024-01-27 20:55:50 +05:30
Kailash Nadh
5a3664aee2 Add support for caching slow queries on large databases.
- Add materialized views for list -> subscriber counts, dashboard chart,
  and dashboard aggregate stats that slow down significantly on large
  databases (with millions or tens of millions of subscribers). These
  slow queries involve full table scan COUNTS().

- Add a toggle to enable caching slow results in Settings -> Performance.

- Add support for setting a cron string that crons and periodically
  refreshes aggregated stats in materialized views.

Closes #1019.
2024-01-27 15:51:12 +05:30
Kailash Nadh
0d319ad9fd Add 'slug' (permalink) support for campaign archives. Closes #1394. 2024-01-09 23:34:08 +05:30
Kailash Nadh
3335171960 Fix (accidentally) broken migration scripts. 2024-01-06 19:55:06 +05:30
Kailash Nadh
fa2c840ddb Rename v2.6.0 migration to v3.0.0, the next major release. 2024-01-06 11:56:08 +05:30
Kailash Nadh
772476c0df Add accurate sent count, last sent subscriber tracking on campaigns.
- Sent count is no longer the batch size fetched from the DB but is
  the actual count of messages sent.
- Pausing and resuming now accurately tracks the last subscriber that
  was processed and resumes from there.
- Fix multiple concurrent campaigns blocking.

Closes #1616. Closes #905. Closes #1496. Closes #1250. Closes #1010.
2024-01-02 14:57:04 +05:30
Kailash Nadh
414c5c0c99 Refactor the core concurrent campaign manager logic.
This commit fully refactors the core campaign manager logic.
It applies a whole new approach to campaign state and lifecycle management.

- Create a new "pipeline" abstraction on top of campaign
  for state management.
- Account for every message processed and end campaigns
  based on the actual count.
- Discard in-queue messages in the pipeline of a paused
  or cancelled campaign.
2024-01-02 14:57:04 +05:30
Kailash Nadh
b2a5e37ccb Fix incorrect form messages on public re-subscription to double opt-in lists. Closes #1638. 2023-12-30 21:29:34 +05:30
Kailash Nadh
bce675870c Fix preconfirm option not working on bulk 'select all' subscriber list management. Closes #1646. 2023-12-30 20:52:14 +05:30
Kailash Nadh
0d74619cac Make providing name in subscriber creation optional and assign internally. Closes #1630. 2023-12-30 15:51:42 +05:30
Kailash Nadh
51af75cfef Add subscription status filter to subscriber list query and admin UI. 2023-12-23 16:43:28 +05:30
Kailash Nadh
01acd386f6 Add tag/type/optin filter options to lists and campaigns APIs. Closes #1631. 2023-12-23 14:45:55 +05:30
Joe Paul
be62c50b3c
feat: Add from_email to postback struct for sending tx postbacks (#1623) 2023-12-11 21:53:30 +05:30
Kailash Nadh
b6922b0629 Suppress 'no campaign' errors on pixel view registration. Closes #1588. 2023-12-07 23:35:34 +05:30
guangwu
4577868567
chore: remove refs to deprecated io/ioutil (#1593)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-11-16 13:57:00 +05:30
Kailash Nadh
c59825f3a5 Fix broken sorting (lists -> subcount, subscribers -> status) in queries. Closes #1076. 2023-11-12 10:29:32 +05:30
Robert R George
c911aeb20e
Fix attachments being omitted from postback (#1557) 2023-10-14 02:06:42 +05:30
Kailash Nadh
04e571d43a Fix file fetch in attachments failing for signed URLs. Closes #1499. 2023-09-19 15:20:27 +05:30
Kailash Nadh
8f2a08b8db Fix invalid suffix 'd' in timestring string in s3 expiry config. 2023-09-19 14:45:51 +05:30
Kailash Nadh
2b95c88188
Add Postmark bounce webhook support (refactor #1385) (#1485)
Co-authored-by: Thomas Siebers <tom@tsiebers.de>
2023-08-31 21:27:34 +05:30
Kailash Nadh
4b05ab1920 Add check for SES 'invalid domain' transient bounces. Closes #1463. 2023-08-20 09:48:21 +05:30
Kailash Nadh
ad80c716f9 Add new privacy option 'Record opt-in IP' to record IP address of optin confirmation.
- Add new 'Subscriptions' table on the subscriber list form that shows subs,
  IP, and other data.
- Add new `meta` JSONB field to `subscriber_lsts` table.

Closes #1329.
2023-07-26 23:00:32 +05:30
Kailash Nadh
5b404615fc Stop requiring a DELETE call for fresh import after finished imports. Closes #1369. 2023-06-24 11:29:18 +05:30
Yatish Mehta
530165f5ee
Fix typos in comments (#1368)
Co-authored-by: Yatish Mehta <yatish@example.com>
2023-06-20 23:40:34 +05:30
cui fliter
f94c1f34b6
fix function name in comment (#1374)
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-06-20 23:40:13 +05:30
Kailash Nadh
0b2da4c664 Add support for streaming async events via HTTP serverside events.
- `GET /api/events?type=error` opens a long-lived HTTP server side
  event connection that streams error messages.
- async (typically SMTP) errors are now streamed to the frontend and
  disaplyed as an error toast on the admin UI.
2023-05-27 15:44:59 +05:30
Kailash Nadh
d359ad27aa Refactor media management.
- Change tiled UI to table UI.
- Add support for search and pagination.
- Important: This breaks the `GET /api/media` API to introduce pagination
  fields. Media items are now moved into `{ data: results[] }`.
2023-05-21 15:19:12 +05:30
Kailash Nadh
3b9a0f782e
Add support for file attachments on campaigns (#1341)
- Adds support for arbitrary file uploads with an admin setting to select allowed file extensions.
- Adds support for attaching media (files) to campaigns.
2023-05-18 16:55:59 +05:30
Kailash Nadh
917696a543 Refactor Messenger interface.
Remove `messenger.go` and move the interface definition to `manager`
and the `Message` struct to the `models` package, removing superflous
and redundant message structs used in multiple places.
2023-05-08 22:43:25 +05:30
Kailash Nadh
9ffc912a2c Refactor media provider.
- Rename `Get()` to `GetURL()`.
- Add `GetBlob()` to retrieve the media file blobs in
  filesystem and and s3 media providers.

This enables reading media files inside listmonk paving the way to
campaign file attachments.
2023-05-08 20:28:25 +05:30
Kailash Nadh
be16297549 Fix incorrect assignment of subscriber in message struct. Closes #1307. 2023-05-06 13:41:21 +05:30
Kailash Nadh
5fc28a733c Add support for variable bounce processing actions.
- Add support for `complaint` to the SES bounce processor.
- Add support for `hard/soft` to Sendgrid bounce processor.
- Add new bounce actions `None` and `Unsubscribe`.
- Add per type (`soft/hard/complaint`) bounce rule configuration to
  admin settings UI.
- Refactor Cypress bounce tests.
2023-04-11 11:33:40 +05:30
Kailash Nadh
13ad9adb8b Upgrade koanf to v2. 2023-04-10 12:45:25 +05:30
Kailash Nadh
3baf18ea45 Add support for wildcards in the email domain blocklist.
Eg: *.example.com, *.mail.example.com etc.

Closes #1275. Closes #1276.
2023-04-09 14:04:02 +05:30
Kailash Nadh
98729f63df Refactor email domain blocklist config field in importer package. 2023-04-09 14:04:02 +05:30
Justin Beaty
476d5bebf2
Add support for publishing full content in public archive RSS feed body (#1262)
- Introduces a new option on the settings UI to optionally publish the full campaign body in
  public archive RSS feeds.

Closes #1033 

Co-authored-by: Kailash Nadh <kailash@nadh.in>
2023-04-08 09:39:10 +05:30
Kailash Nadh
b433ef68ec Fix broken SES bounce type check. 2023-04-02 20:39:01 +05:30
Kailash Nadh
152bd37c22 Fix no opt-in mails when existing subscribers subscriber to new opt-in lists. Closes #1257. 2023-03-25 21:06:59 +05:30
Kailash Nadh
55f7eca2e8
Add support for file attachments in the transactional (tx) API. (#1243)
The original PR accepts files to the `/tx` endpoints as Base64 encoded
strings in the JSON payload. This isn't ideal as the payload size
increase caused by Base64 for larger files can be significant,
in addition to the added clientside API complexity.

This PR adds supports for multipart form posts to `/tx` where the
JSON data (name: `data`) and multiple files can be posted simultaenously
(one or more `file` fields).

--- PR: #1166
* Attachment model for TxMessage
* Don't reassign values, just pass the manager.Messgage
* Read attachment info from API; create attachment Header
* Refactor tx attachments to use multipart form files. Closes #1166.
---

Co-authored-by: MatiSSL <matiss.lidaka@nic.lv>
2023-03-19 15:50:44 +05:30
Kailash Nadh
da377d83e6 Parse campaign UUID in SendGrid webhook. Closes #1177. 2023-02-26 13:06:30 +05:30
Haseeb Ahmad
755344e74b
Add check for SES bounce notif type (#1123) 2023-01-28 13:55:48 +05:30
Kailash Nadh
8985e5c24a
Add hCaptcha.com support to public subscription form. (#1152)
Bots easily bypass the simple `nonce` hack. This commit adds support
for the hcaptcha.com widget.

- New `Security` tab in the admin settings UI.
- Enable/disable CAPTCHA.
- Render CAPTCHA on the public subscription form.

Closes #1116.
2023-01-23 21:50:10 +05:30
Rohan Verma
72d22d40ef
fix: check public URL before presigned URL generation (#1148)
Fixes #1141
2023-01-16 15:49:21 +05:30
Kailash Nadh
3cfbc646e3 Add support for multiple subscribers in a single transactional message call.
This patch adds new array fields on `POST /tx`: `subscriber_emails[]`, `subscriber_ids[]`.
Either of these array fields can be sent with multiple subscribers.

The individual non-array fields `subscriber_id` and `subscriber_email` are deprecated.

Closes #994.
2022-12-25 17:32:01 +05:30
Kailash Nadh
49f20f33db Fix broken sorting in list query. Closes #1076.
- Replace "%s %s" sprintf substitution in some raw SQL queries with named
  string replace params. Eg: `%order%`.
2022-12-25 14:04:43 +05:30
Kailash Nadh
448f0e3428 Fix missing subscriber count in individual list GET API. 2022-11-27 23:07:40 +05:30