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
I had to force-push my dane branch of rust-openssl after a rebase,
which invalidated the commit ref that is included here in Cargo.lock.
Update the deps to allow folks without the stale commit ref to be able
to build.
This is useful for efficiently matching a string simultaneously against
multiple regular expressions.
The motivating use case is to use it together with the
smtp_client_rewrite_delivery_status event.
The default is 1000 which is really high. This sets it to 10,
and configures rotation of those daily, so that there should be
no more than 10 days worth of LOG files.
This code isn't currently reachable (defaults to false), but allows
for a runtime selection between rustls and openssl-based tls.
refs: https://github.com/KumoCorp/kumomta/issues/8
This was a 2-in-1 issue really.
When a message line starts with a `.` we are required to encode it
by prefixing the line with an additional `.`, aka: "dot stuffing".
In our implementation of this we would unintentionally remap CRLF
to CR, and then fail to emit CRLF.CRLF at the end of the data
that we'd planned to send.
The result of this was that we're hang waiting for the remote host
to respond to our DATA, meanwhile, it was waiting for the end of
our data. We'd sit there until either side reached their respective
timeout for the data phase.
This commit fixes up both parts of this bug.
NOTE: macos is NOT a platform supported for production use!
This commit just enables basic build and test to facilitate
offline work when I'm travelling with a mac laptop.
There are important systems functions that are not implemented
in the macOS build.
It compiles, but is otherwise completely untested as of yet.
Usage:
```lua
local producer = kumo.kafka.build_producer {
["bootstrap.servers"] = "localhost:9092",
}
producer:send {
topic = "my.topic",
payload = "my payload",
-- how long to keep trying to submit to kafka
-- before a lua error will be raised.
-- This is the default.
timeout = "1 minute",
}
```
refs: https://github.com/KumoCorp/kumomta/issues/32
Adds a lua function (needs docs) to do basic configuration of
unbound, and a feature for dns-resolver that is really just to
make it more convenient for me to test and compare the two
resolvers via:
cargo nextest run -p dns-resolver --features live-dns-tests
vs:
cargo nextest run -p dns-resolver --features live-dns-tests,default-unbound
Switch to using ArcSwap to manage owning the resolver; that makes
it a bit cheaper than the rwlock we were using before, and also
allows sharing out a reference to the resolver for use by other
crates that don't really need to take a direct dep on this one.