220 Commits

Author SHA1 Message Date
Wez Furlong 29e4ec312d provide helpful reminder that bouncing is async
closes: https://github.com/KumoCorp/kumomta/issues/191
2024-05-30 16:46:03 -07:00
Wez Furlong 03dfa7e870 docs: changelog for https://github.com/KumoCorp/kumomta/pull/179 2024-05-17 07:49:48 -07:00
Wez Furlong a55f726471 docs: utopia openapi doc description updates
The auto-generator changed how it splits the brief/full description
up when rendering it into the openapi spec.
2024-05-17 07:44:39 -07:00
Wez Furlong 4dad617d14 remove EgressPathConfig::suspended logic
When this was added, it was to enable TSA daemon to express
and convey that a given path should be suspended.

The implementation was objectively unpleasant, turning the
fast path of egress source assignment from a simple single
iteration of the weighted round robin logic to N (where N
is the number of sources in a pool) iterations to try
and figure out if a suspension is active.

Now that we have TSA subscriptions that update the admin
suspension information in realtime, we can now simply
rely on that source of information.

This commit removes the logic associated with the deprecated
suspended flag and tidies up the code, making that fast
path a little more fast, and making the code a bit easier
to reason about.
2024-05-02 06:18:14 -07:00
Wez Furlong 9e95303e6b add kumo.available_parallelism()
This can be helpful for writing configuration files for systems
that scale to the available compute resources.
2024-04-29 08:23:27 -07:00
Wez Furlong 3261d1517f redis: add connect_timeout option
closes: https://github.com/KumoCorp/kumomta/issues/168
2024-04-19 12:33:23 -07:00
Wez Furlong b4aa4a38ec http: allow controlling some timeout and diagnostics on the client
Adds a couple of options that provide more control over the default
timeouts and logging.

These are exposed to the shaping helper as `publish_timeout`,
`publish_pool_idle_timeout` and `publish_connection_verbose`.
2024-04-19 07:44:19 -07:00
Wez Furlong 898ed52410 add msg:append_text_html and msg:append_text_html
These can be used to insert tracking pixels/links.

closes: https://github.com/KumoCorp/kumomta/issues/120
2024-03-31 14:04:46 -07:00
Wez Furlong 1fb712e2bf Add msg:set_data()
This method allows replacing the message payload arbitrarily.
This is a building block for more advanced and convenient
modification operations.

refs: https://github.com/KumoCorp/kumomta/issues/117
refs: https://github.com/KumoCorp/kumomta/issues/120
2024-03-31 06:57:59 -07:00
Wez Furlong e94506fd96 Add new Rejection log event
We skip logging the 421 we generate while shutting down because
it feels a bit redundant; you'll see the server shutting down
in the journal anyway.

refs: https://github.com/KumoCorp/kumomta/issues/88
2024-03-29 16:37:37 -07:00
Wez Furlong 3207c45f3d expose inject_v1 API via lua
closes: https://github.com/KumoCorp/kumomta/issues/102
2024-03-29 09:06:54 -07:00
Wez Furlong 755eb848e2 add glob, read_dir
closes: https://github.com/KumoCorp/kumomta/issues/161
2024-03-29 08:25:51 -07:00
Wez Furlong 0c5794ba31 TSA: Add SuspendTenant, SuspendCampaign
refs: https://github.com/KumoCorp/kumomta/issues/113
2024-03-28 13:08:45 -07:00
Wez Furlong e41b4297ea tsa: hook up websocket suspension stream
This commit connects the new websocket based suspension feed
up to shaping.lua. This allows ready-q suspensions to be
enacted in realtime, as well as sets things up to support
scheduled queue suspensions in a later commit.

refs: https://github.com/KumoCorp/kumomta/issues/113
2024-03-28 07:14:36 -07:00
Wez Furlong 39de0e33a6 Expose suspension API to lua
This is very similar to the HTTP suspension API, with the
difference that the suspend method returns just the uuid rather
than the entire suspension object.

refs: https://github.com/KumoCorp/kumomta/issues/113
2024-03-28 07:14:35 -07:00
Wez Furlong be80391239 add kumo.http.connect_websocket
refs: https://github.com/KumoCorp/kumomta/issues/113
2024-03-28 07:14:35 -07:00
Wez Furlong 6003976a10 new: kumo.spawn_task function
This function will spawn a new thread that runs a tokio
localset, which in turn will trigger the specified event
and run it.

On it's own it doesn't do a lot, but it provides a way
to perform background tasks in lua.

```lua
kumo.on('init', function()
  kumo.spawn_task {
    event_name = 'my.task',
    args = { 'hello', 'there' },
  }
end)

kumo.on('my.task', function(args)
  -- Prints: `I am the task.  ["hello","there"]`
  print('I am the task.', kumo.json_encode(args))
end)
```
2024-03-28 07:14:35 -07:00
Wez Furlong a209a470ff docs: clarify how to access headers in logging templates 2024-03-22 08:08:14 -07:00
Wez Furlong 5596d7cf99 http_listener: allow configuring max request size 2024-03-17 09:35:02 -07:00
Tom Mairs d285a7f71a Update timeout defaults 2024-03-15 15:18:06 -06:00
Wez Furlong 5a1999a1b1 Add kumo.make_throttle and throttle_insert_ready_queue event
These allow performing arbitrary rate limiting operations
at both reception time and when messages are moved from the
scheduled queue and into the ready queue.

refs:  https://github.com/KumoCorp/kumomta/issues/149
2024-03-15 12:21:57 -07:00
Wez Furlong a16a886f0e add requeue_message event
In the end I decided to implicitly make the message due for immediate
delivery in the case where the queue was changed; I couldn't think
of a good reason not to do that, and it simplifies the implementation
both of the event internals for anyone implementing the event
themselves in their lua policy.

refs: https://github.com/KumoCorp/kumomta/issues/149
2024-03-08 13:35:06 -07:00
Wez Furlong 33c7557afb msg: add num_attempts, set_due and queue_name methods
refs: https://github.com/KumoCorp/kumomta/issues/149
2024-03-08 13:35:03 -07:00
Wez Furlong 8c43dfe209 add scheduled queue max_message_rate throttle
Needs testing, but I think this will do the job at the raw configuration
level. TSA support for adjusting this setting is a bigger endeavor and
is not included in this commit.

refs: https://github.com/KumoCorp/kumomta/issues/143
2024-03-07 11:00:18 -07:00
Wez Furlong 5bf3d4f3e0 docs: apply proper lua formatting to kafka docs 2024-02-28 09:41:20 -07:00
Mike Hillyer c62ee2f8e2 First pass Kafka Docs 2024-02-13 13:47:08 -05:00
Wez Furlong 02cd1ef7bf NEW: dkim over signing by setting over_sign = true in the signer
refs: https://github.com/KumoCorp/kumomta/issues/111
2024-01-18 12:59:41 -07:00
ncai 8954052013 add is_mx to determine if the hosts are mx records 2024-01-16 11:40:20 -07:00
Wez Furlong 580be2c4aa kumo.http: add a default 1 minute timeout to requests
Add a timeout method to control the request duration explicitly.
2024-01-13 07:08:54 -07:00
Mike Hillyer 8558ae88bc Update remaining tables with new fix. 2024-01-05 15:31:05 -05:00
Mike Hillyer 795fc9ba91 Trying another table fix 2024-01-05 15:15:11 -05:00
Mike Hillyer f45696eacc Forgot to add table fix to get_meta 2024-01-05 15:06:55 -05:00
Mike Hillyer ea2ec286b9 Fix formatting of notes. 2024-01-05 15:03:25 -05:00
Mike Hillyer 30d4a7cda9 Adding table workaround to other metadata pages. 2024-01-05 14:57:47 -05:00
Mike Hillyer 1c2fad67ea Trying one more workaround. 2024-01-05 14:54:09 -05:00
Mike Hillyer 2cde2e472d Undo column width fixing attempts. 2024-01-05 14:49:04 -05:00
Mike Hillyer c962577faa Trying another column width fix. 2024-01-05 14:29:50 -05:00
Mike Hillyer 414d5515f8 Attempt to fix column width. 2024-01-05 14:26:45 -05:00
Mike Hillyer 72492df381 Create new master metadata index page, update existing metadata pages to reflect the change. 2024-01-05 13:54:12 -05:00
Wez Furlong b1375f8e6b docs: update for latest release 2024-01-03 13:49:55 -07:00
Wez Furlong 5d206834ce docs: fixup outdated source + pool information
Some sections didn't get updated to match changes
around how pools and sources are retrieved from the
configuration.

Thanks to @farhadhf for raising this

closes: https://github.com/KumoCorp/kumomta/pull/107
2023-12-14 17:17:06 -07:00
Wez Furlong 2925c7f565 docs: add missing socks5 config to reference section 2023-12-14 17:17:06 -07:00
Mike Hillyer 95c3e3b444 Build out new page on inbound SMTP AUTH, update related documents and TOC, rename smtpauth page outbound_auth to differentiate from inbound_auth.md. Update smtp listener page to point to it, update refman auth plain page to reflect latest fields. 2023-12-07 17:00:58 -05:00
Wez Furlong cdfe11cf22 Allow simple wildcard suffixes for header names in logs
refs: https://github.com/KumoCorp/kumomta/issues/74
2023-12-04 12:10:15 -07:00
Wez Furlong ec937b52ef Allow using arbitrary bounce classification labels
refs: https://github.com/KumoCorp/kumomta/issues/98
2023-11-29 12:09:05 -07:00
Wez Furlong 8af7e85c6b docs: update version info for latest release 2023-11-29 12:08:34 -07:00
Wez Furlong c40f86e039 Add suppress-logging option to admin bounces
closes: https://github.com/KumoCorp/kumomta/issues/75
2023-11-23 08:36:07 -07:00
Wez Furlong 9282110479 docs: update openapi snapshots
Meant to include this in the previous commit!

refs: https://github.com/KumoCorp/kumomta/issues/96
2023-11-22 12:54:17 -07:00
Wez Furlong 0fc1108308 openapi: tidy up server URL and auth bits for rapidoc
refs: https://github.com/KumoCorp/kumomta/issues/96
2023-11-22 12:51:10 -07:00
Wez Furlong 0b87c020b4 add openapi.json metadata for http api
Adds `/api-docs/openapi.json` and `/rapidoc` endpoints to both
kumod and tsa-daemon.

The former exposes the subset of the API that is expressable
in the openapi schema as a json file that can be imported into
other tools.

The latter is a single-page web app that consumes the former
to provide an interactive API explorer.
We're using rapidoc for this, because I happen to think it looks
nicest and easiest to use, and we can integrate it into the docs
fairly nicely.

Which leads in nicely to say: I've integrated a read-only version
of rapidoc into the docs, and it even detects and adjusts to the
selected light/dark mode.

The `docs/update-openapi.sh` extracts the openapi.json data from
kumod and tsa-daemon and outputs to the correct place in the docs
directory structure to enable this.

refs: https://github.com/KumoCorp/kumomta/issues/96
2023-11-21 15:30:13 -07:00