Replaces the dkim result types from this crate with
AuthenticationResults which contain the additional
data required to construct high-quality Authentication-Result
headers.
refs: https://github.com/KumoCorp/kumomta/issues/82
When the client used the (inefficient!) multi-stage variant
of AUTH PLAIN, we didn't send the 334 response, so both
parties sat waiting for each other and eventually timed out.
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
arc4random is on fedora38, but not rhel/centos/rocky/ubuntu lts
Just pretend we don't have it on all systems so we use the fallback.
remove some openssl assumptions that were true for fedora but not ubuntu 20
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
If init fails, we log an error message immediately, then proceed
to shut down the server, which then prints a succint "Error:
Initialization raised an error" message.
It can be easy to overlook the error context and conclude that
there is none.
This commit will now re-display the error message at the bottom,
so that it is printed out twice.
For example:
```
./target/debug/kumod --policy /tmp/bad.lua
2023-08-31T17:20:46.569685Z INFO localset-0 kumo_server_common::http_server: http listener on 0.0.0.0:8000
2023-08-31T17:20:46.570330Z INFO localset-0 kumo_server_common::http_server: https listener on 0.0.0.0:8001
2023-08-31T17:20:46.570761Z INFO localset-0 kumod::smtp_server: smtp listener on 0.0.0.0:2025
2023-08-31T17:20:46.621327Z ERROR localset-0 kumo_server_common::start: problem initializing: callback error
stack traceback:
[C]: in function 'kumo.on'
[string "/tmp/bad.lua"]:86: in function <[string "/tmp/bad.lua"]:6>
caused by: Attempting to register an event handler via `kumo.on('get_listener_domain', ...)` from within the event handler 'init'. You must move your event handler registration so that it is setup directly when the policy is loaded in order for it to consistently trigger and handle events.
2023-08-31T17:20:46.621437Z INFO localset-0 kumo_server_common::start: initialization complete
2023-08-31T17:20:46.621581Z INFO localset-0 kumod::smtp_server: smtp listener on 0.0.0.0:2025 -> stopping
2023-08-31T17:20:46.622242Z INFO main kumo_server_common::start: Shutdown completed OK!
Error: Initialization raised an error: callback error
stack traceback:
[C]: in function 'kumo.on'
[string "/tmp/bad.lua"]:86: in function <[string "/tmp/bad.lua"]:6>
caused by: Attempting to register an event handler via `kumo.on('get_listener_domain', ...)` from within the event handler 'init'. You must move your event handler registration so that it is setup directly when the policy is loaded in order for it to consistently trigger and handle events.
```
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.