Commit Graph

20 Commits

Author SHA1 Message Date
Kailash Nadh 6cf43ea674 Add generic HTTP postback `Messenger` support.
This is a major feature that builds upon the `Messenger` interface
that has been in listmonk since its inception (with SMTP as the only
messenger). This commit introduces a new Messenger implementation, an
HTTP "postback", that can post campaign messages as a standard JSON
payload to arbitrary HTTP servers. These servers can in turn push them
to FCM, SMS, or any or any such upstream, enabling listmonk to be a
generic campaign messenger for any type of communication, not just
e-mails.

Postback HTTP endpoints can be defined in settings and they can be
selected on campaigns.
2020-10-10 18:52:08 +05:30
Kailash Nadh b822955ac9 Add BasicAuth to admin endpoints.
This removes the Nginx dependency for protecting admin pages.
BasicAuth is configured in config.toml. This is a "temporary"
setup until a full fledged auth mechanism is added.
2020-08-08 13:11:49 +05:30
Kailash Nadh 5fb7c6cfb0 Add support for automatic, idempotent DB migrations
- 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.
2020-08-03 19:02:23 +05:30
Kailash Nadh 942eb7c3d8 Add settings UI and "hot reload" support to the app.
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.
2020-07-21 00:23:57 +05:30
Kailash Nadh 18329ff052 Add TLS to SMTP config 2020-05-17 21:07:48 +05:30
Kailash Nadh 9d3ca357f6 Integrate new SMTP pool lib 2020-05-16 23:25:37 +05:30
jaredfolkins 11c7c60455 enhc: add plain text email body along with HTML, add option in
config.toml
2020-04-14 11:19:34 -07:00
Kailash Nadh 71803ab1af Add support for loading custom static files with `--static-dir`
- Removed duplicate copies of static files in `static/public/`
2020-03-14 21:07:14 +05:30
Kailash Nadh 83d888a30b Update and cleanup deps 2020-03-08 16:03:57 +05:30
Kailash Nadh 892d5d2a20 Remove 'govalidator' package dependecy 2020-03-08 13:03:38 +05:30
Kailash Nadh 8853809713 Refactor and cleanup initialization.
- Clean up main.go (by moving init to init.go) and improve
  composition comprehension.
- Refactor app context and init struct and field names.
- Update package dependencies in initialisation.
2020-03-08 00:06:48 +05:30
Kailash Nadh 276942ab91 Replace outdated UUID lib 2020-03-07 20:37:48 +05:30
Kailash Nadh 9a88c2ed7b Add support for custom SMTP HELO hostname (for FQDNS) 2020-02-06 15:39:43 +05:30
Karan Sharma e5c3196b31 feat: Add blobstore package
This commit introduces a `blobstore` package and refactors the existing
upload mechanism. Upload is now handled by `providers` and the two
bundled providers are `S3` and `Filesystem`. `app.Blobstore` initialises
the correct provider based on the configuration and handles `Put`,
`Delete` and `Get` operations.
2019-10-31 11:25:31 +05:30
Kailash Nadh 3b7902802e Add data privacy export / wipe features (aimed at GDPR compliance).
- Toggle options to enable self-service data export and wipe
  options on the public unsubscription page. Subscribers can get
  a copy of all data on them e-mailed to them as JSON, or
  instantly wipe all their data.
- Refactor "unsubscribe" pages and URIs to "subscription".
- Add export icon to subscriber admin view.
2019-07-21 19:21:23 +05:30
Kailash Nadh 0e116a2286 Update dependencies 2019-07-05 14:18:50 +05:30
Kailash Nadh 61c2a728ca Upgrade to stuffbin v1.0.0 2019-07-05 14:08:48 +05:30
Kailash Nadh fe4f39f65d Replace viper with koanf 2019-06-26 16:53:23 +05:30
Vivek R 08b9d153da fix: update echo framewor to fix commit hash mismatch 2019-05-27 17:10:02 +05:30
Joe Paul 4ef5a3a042 chore: Go modules and add readme 2019-02-01 11:13:37 +05:30