`cargo build --release` will build all packages with the full
combination of enabled features, resulting in executables such as `kcli`
getting linked with rocksdb and openssl.
When we build packages we want to avoid that. In the CI we were running
`cargo nextest run --release` thinking that it would avoid recompiling
some deps and that we could reuse those "release" binaries in the final
package without recompiling. That isn't true, so let's just run the
tests in debug mode (should be slightly faster to build), then build
the individual executables in release mode, so that we get slimmer
executables.
We'll see how this works for rocky, then apply similar changes to
the rest of CI.
This helps to remove "false" deps on things like openssl; now that
is linked in only to those components that need it (eg: things that
use unbound for dnssec, or the smtp client for DANE).
This makes the binaries other than kumod (which still has max deps)
a few MB smaller; not a massive win, but nice all the same.
This uses alpine to build and the docker scratch image for installation,
resulting in an image of 150MB in size, compared to the 251MB size of
our current ubuntu based image.
I think we can shrink things down a bit more; for example, the kcli
utility pulls in the message crate for some of its types, but ends up
linking in openssl and other deps. Splitting out the types into a
message-types crate might help to reduce the size of that executable.
Similarly, the other executables seem to have more stuff linked in
than is strictly needed.
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
The version header from this old format is actually not at all
compatible with a strict reading of rfc5965 which allows only for
integer version fields; it is defined as `[1-9][0-9]*` which has
no room for decimal points.
Relax the field to accept an arbitrary string.
If Arrival-Date is not found, try pulling the equivalent information
from the historic Received-Date field.
Previously, we'd just generate an attempt to index `nil` error
message, and the result would be a 421 technical difficulties.
Promote this to a 522 with an explanation about the missing
From header.