Commit Graph
3665 Commits
Author SHA1 Message Date
Wez Furlong fe54ebfa52 rfc5321: change protocol parser from pest -> nom
This gives us more flexibility in how we can build our parser,
and is significantly easier to maintain.

Part of this change is allowing the command parser to recognize
the starting command verb in an otherwise failed command line
parse; the intent is to provide slightly better error codes
where SMTP defines them when we encounter such a thing.

This commit doesn't do that; it's already pretty huge.
2026-04-08 14:12:58 +01:00
Wez Furlong 41e67a4762 tailer: fixup checkpoint name, default batch size
The recent refactoring meant that the tailer binary was writing
checkpoints with a double . prefix rather than a single .

The batch size could do with being a bit larger by default,
although it doesn't make a huge difference with this use case.
2026-04-07 13:52:19 +01:00
Wez Furlong 8ebef09606 normalizer: add {duration} placeholders 2026-04-07 10:05:56 +01:00
Wez Furlong 44df25efa1 rustfmt 2026-04-07 10:05:45 +01:00
Wez Furlong 40eb8081cf normalizer: expand dictionary of smtp words a bit 2026-04-07 07:40:08 +01:00
Wez Furlong 4b16873934 kumod: improve ctrl-c handling in --script mode
This commit makes ctrl-c more responsive when running a long
running --script, such as a log tailer script
2026-04-07 07:03:05 +01:00
Wez Furlong a800f49d7d docs: changelog for https://github.com/KumoCorp/kumomta/pull/497 2026-04-04 19:55:43 +01:00
kayozaki dc1cf4a93a Adding kumo.fs.stat to get file/dir meta data (#497) 2026-04-04 19:52:12 +01:00
Wez Furlong 7cf2e04bee docs: changelog for kumo.jsonl 2026-04-04 12:26:05 +01:00
Wez Furlong 7d89393b8c docs: Add webhook processing examples using kumo.jsonl 2026-04-04 12:09:36 +01:00
Wez Furlong 9a77373136 add batched webhook examples using kumo.jsonl 2026-04-04 11:45:42 +01:00
Wez Furlong eebfd3aa56 kumo.jsonl: add some basic docs 2026-04-04 11:14:48 +01:00
Wez Furlong 35ce0674fb kumo-log-tailer -> kumo-jsonl 2026-04-04 10:45:36 +01:00
Wez Furlong c7d743e20a log-tailer: rename the lua module to kumo.jsonl 2026-04-04 10:43:18 +01:00
Wez Furlong 8f0524d128 log-tailer: expose writer to lua 2026-04-04 10:39:23 +01:00
Wez Furlong db388e702c log-tailer: add a writer as well 2026-04-04 10:25:59 +01:00
Wez Furlong 57a6828427 log-tailer: allow using <close> on the tailer 2026-04-04 08:41:22 +01:00
Wez Furlong 273f79a58f log-tailer: make checkpoint writes atomic 2026-04-04 08:19:26 +01:00
Wez Furlong dfd902d477 log-tailer: expose multi tailer to lua, add lua tests 2026-04-04 08:04:54 +01:00
Wez Furlong e317dd46d1 log-tailer: add multi-consumer mode 2026-04-04 07:40:24 +01:00
Wez Furlong f8e45ed934 log-tailer: make checkpointing explicit 2026-04-04 07:02:37 +01:00
Wez Furlong 7b9c3964fe kumo-log-tailer: expand tests 2026-04-04 06:30:50 +01:00
Wez Furlong 5d7db7b197 kumo-log-tailer: rustfmt 2026-04-03 23:08:38 +01:00
Wez Furlong d7ec4b965a kumo-log-tailer: add filter capability 2026-04-03 23:06:03 +01:00
Wez Furlong 761ffe9904 kumo-log-tailer: store json values in batch rather than raw lines
This will enable some filtering in a subsequent commit.
2026-04-03 22:47:59 +01:00
Wez Furlong 6bd7b07400 kumo-log-tailer: expand test coverage 2026-04-03 22:36:10 +01:00
Wez Furlong c05dfa194a kumo-log-tailer: improve LogBatch
Allow it to span multiple segments (especially short ones!)

Improve how we track the source file/line info to make it more
efficient.
2026-04-03 22:32:02 +01:00
Wez Furlong 3d45100b27 kumo-log-tailer: track file/line info in LogBatch
this enables better error reporting if something breaks
2026-04-03 22:08:13 +01:00
Wez Furlong 7892be19f7 kumo-log-tailer: parse records as json before returning :batches() 2026-04-03 20:14:04 +01:00
Wez Furlong 8836f8f330 kumo-log-tailer: add lua bindings 2026-04-03 20:01:25 +01:00
Wez Furlong 8b641f6f57 tailer: switch to new kumo-log-tailer backend 2026-04-03 19:28:13 +01:00
Wez Furlong 6318b0c04e Add kumo-log-tailer crate 2026-04-03 19:15:38 +01:00
Wez Furlong baa95fbbb0 log_hooks: add optional pre-filter function
This is useful if your hooks have interior logic to decide to
filter out a given record.  For example, you might have multiple
hook endpoints but only messages with certain headers/metadata
should be routed to any one of them for a specific event.

Without the ability to pre-filter, we need to pay the cost of
spooling the event speculatively, and then skipping it when
processing logging for the (hopefully!) batch.

Using pre-filter you can cut out that overhead.

This is not yet documented; we're getting this in to get
some feedback before we finalize this interface.
2026-04-03 09:50:13 +01:00
Wez Furlong 8e1bce3110 remove stray debug logging 2026-04-03 08:48:07 +01:00
Wez Furlong bc4e3d4207 fixup parse_envelope_address for the postmaster@domain case
I noticed that `kumod --validate` on a policy using the dkim
helper would fail to parse the `postmaster@example.com` addresses
passed to make_message.

This commit resolves this issue; it doesn't go in the changelog
because this behavior has not yet been shipped in a stable release
and was only very recently introduced around the binary mime
changes.
2026-04-02 09:23:54 +01:00
Wez Furlong 6479810368 queue helper: add invalidate_with_epoch option to queue_helper_data cache 2026-04-02 08:55:13 +01:00
Wez Furlong 43dfae466c docs: restore and correct changelog for #496
This got lost during merge conflict resolution, as well as
incorrectly indicated that it applied to rustls in the original
draft, when it was in fact only applicable to openssl.
2026-04-02 05:28:10 +01:00
Harsh Jha f08b184037 feat: pre-define to_header substitution in HTTP injection API
Pre-populate a `to_header` template substitution with the default
formatted `To` header for each recipient. Users can reference it via
`{{ to_header }}` and override it per-recipient in substitutions.

closes: https://github.com/KumoCorp/kumomta/pull/501
2026-04-01 08:17:12 +01:00
Wez Furlong 0ed20697a2 deps: update async-nats
This resolves a dependabot issue around the rustls-webpki crate
version that was previously used just by this crate.
2026-04-01 07:34:19 +01:00
Wez Furlong b68f8245f4 docs: changelog for #496 2026-04-01 07:22:07 +01:00
kayozaki 4215ec757e load intermediate cert (#496)
* load intermediate cert
* using rcgen to sign with intermediate cert, update unit test
2026-03-31 23:20:07 -07:00
kay ozaki 77a8e951c5 mod-string: add ends_with, starts_with
closes: https://github.com/KumoCorp/kumomta/pull/498
2026-03-31 15:23:49 +01:00
Wez Furlong 875d596f86 mailparsing: remove implicit lossy MimePart::to_message_string()
This was causing some problems with legacy shift_jis content,
so replace it with a binary preserving equivalent, and fixup
the call sites to use the renamed `to_message_bytes` method
instead.
2026-03-31 14:53:40 +01:00
Wez Furlong ea786a2585 deps: upgrade testcontainers
This resolves a minor (to us) dependabot alert for a dep that is used
only when we build and run integration tests.
2026-03-31 11:37:14 +01:00
Wez Furlong 787ee3f766 introduce kumo-counter-series crate
This crate implements an in memory ring-buffer based counter series.

It is intended to be used for bounded (and ideally small!) counter time
series.

The idea is that this should be the backing store employed by the
proposed https://github.com/KumoCorp/kumomta/pull/470

closes: https://github.com/KumoCorp/kumomta/pull/475
2026-03-31 11:30:28 +01:00
Wez Furlong 0d4c078672 refactor: move tag from mailparsing to nom_utils 2026-03-31 11:16:11 +01:00
Wez Furlong 9c2fb0f183 refactor: extract nom_utils to its own crate 2026-03-31 11:16:11 +01:00
sophiajt 0c8cf54e05 fix broken test on macOS 2026-03-31 05:25:02 +01:00
sophiajt 13fb415034 fix build on macOS 2026-03-30 09:26:44 +01:00
Wez Furlong 89b5efbb4c message: simplify EnvelopeAddress's Debug impl
Just render the address in <> to keep it more compact and readable.
This is most visible in the MAIL FROM and RCPT TO responses
when talking to the smtp server.
2026-03-28 10:43:32 +00:00