Commit Graph
3615 Commits
Author SHA1 Message Date
dependabot[bot] 1d5e722c35 build(deps): bump docker/login-action from 3 to 4
Bumps [docker/login-action](https://github.com/docker/login-action) from 3 to 4.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-28 07:33:59 +00:00
dependabot[bot] 125b38cd45 build(deps): bump docker/build-push-action from 6 to 7
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6 to 7.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-28 07:33:37 +00:00
Wez Furlong a3801e8973 docs: changelog for recent connection failure summary changes 2026-03-28 07:29:20 +00:00
Wez Furlong ee637fb51d docs: changelog entry about recent mailparsing changes 2026-03-28 07:20:35 +00:00
Wez Furlong 937611feb9 rfc5321: improve handling of quoted local parts in envelope addresses
This commit refactors the EnvelopeAddress types(!) so that the brains
of them are centralized in the rfc5321 crate, removes the one from
the log-types crate, and replaces the internals of the one in the
message crate with the rfc5321 implementation.

This revised implementation accommodates quoted local parts more
consistently and exposes the local part via a normalizing accessor which
is in turn used when comparing addresses for equality.

This means that `"foo"@` and `foo@` now compare the same, and if you
have setup a maildir that generates per-user maildirs, we'll use the
normalized form of the local part rather than whatever is on the
incoming address.

Another side effect of this commit is that we can now accept exotic
quoted addresses like `"info@"@example.com` without falsely complaining
about having too many `@` signs in the address.

closes:  https://github.com/KumoCorp/kumomta/issues/495
2026-03-28 07:20:35 +00:00
Wez Furlong b679166fe2 smtp_server: Fix handling invalid EnvelopeAddress in MAIL or RCPT commands
We were propagating the parse error as a server error and mapping it
to the 421 technical difficulties response instead of returning
the appropriate syntax error response defined by SMTP.

refs: https://github.com/KumoCorp/kumomta/issues/495
2026-03-28 07:20:35 +00:00
Wez Furlong d1f7201d58 mailparsing: remove deprecation from Header::get_raw_value_string
This was just a temporary measure while refactoring for
binary support, so that I could stay on top of legacy
callers.

The remaining callers now all legitimately need to process
str values, so that's fine.
2026-03-28 07:20:35 +00:00
Wez Furlong fa33990106 dkim: enable signing legacy 8-bit content
This is really what all of the recent binary message commits
have been all about, allowing us to parse and sign legacy 8-bit japanese
content.
2026-03-28 07:20:34 +00:00
Wez Furlong edd7eb9ebb server-common: try to be more faithful when logging bytes
Previously, we'd use a lossy conversion that would replace
funky sequences with the unicode replacement character.

This commit will instead print the bad bytes as hex-escaped characters.

This can be useful when troubleshooting things in tests; this commit
also turns up info logging for the lua test runner so that we can see
that, although nothing else in this commit actually calls that.
I did use it while troubleshooting things just now though, so it is
generally useful.
2026-03-28 07:20:34 +00:00
Wez Furlong 8cb8b3fa7e new: kumo.encode.charset_decode/kumo.encode.charset_encode
These are more immediately useful to me for writing tests, but are
generally useful when you have a policy that might need to to deal
with legacy encoding schemes more directly.
2026-03-28 07:20:34 +00:00
Wez Furlong b3477dee4d kumo-template: fixup deprecated call
Somewhere in this stack minijinja got updated and has deprecated a
function; switch to the recommended thing.
2026-03-28 07:20:33 +00:00
Wez Furlong c358fc77aa mailparsing and mod-mimepart: support setting binary unstructured
Allow setting binary values for a number of headers via the mod-mimepart
lua module.
2026-03-28 07:20:33 +00:00
Wez Furlong a006c8ffa0 fixup test_latin.lua test expectations
Our behavior has changed so it is acceptable to change the test
expectations.

We now return the binary bytes as-is for non-conforming inputs,
rather than attempting an implicit and lossy UTF-8 conversion.
2026-03-28 07:20:33 +00:00
Wez Furlong fdca5e6e2c kumo-wrap: fixup handling of trailing whitespace
When I updated this crate for binary inputs, I switched from
str::split_ascii_whitespace() to slice::split(u8::is_ascii_whitespace).

This subtly alters the semantics; the former will not yield an empty
word in the trailing whitespace case, while the latter does.

Handle this by explicitly skipping an empty word.

This fixes up one of our lua test cases for wrapping long headers with
trailing whitespace.
2026-03-28 07:20:33 +00:00
Wez Furlong 3469734b00 fixup test expectation
We improved the error message, fixup the test to match
2026-03-28 07:20:32 +00:00
Wez Furlong 9edcdde67e mailparsing: fix failing test
The .to_string conversions were breaking the latin1 fix test
2026-03-28 07:20:32 +00:00
Wez Furlong da60dc5370 mailparsing: switch parser input to byte slices
There's a bit of fuss around migrating the `char` nom parsing function
to `tag`, which is required for operating on bytes.  We need to jump
through some hoops in order to be able to show what tag was expected
if there is a mismatch.  That improves the output of our parse error
type to have less redundant information, so overall I'd say that
that is a plus.

A number of 8-bit related tests now fail and some continue to fail
from an earlier commit in this refactoring series.  We can now
start to tackle whether those need to be adjusted to the amended
API surface, or whether we need to add some supporting context
for those, on a case by case basis in follow-up commits.
2026-03-28 07:20:32 +00:00
Wez Furlong 07e9be9966 mailparsing: refactor another String -> BString 2026-03-28 07:20:31 +00:00
Wez Furlong 56f3535a85 mailparsing: refactor: parsing functions return BString
This is ostensibly "just" making the nom parsing functions return
BString instead of String, but the fan-out makes the commit much larger,
as a number of surfaces (eg: as_unstructured) have now changed types.
2026-03-28 07:20:31 +00:00
Wez Furlong 0cfd886ee0 mailparsing: refactor: Mailbox::name to Option<BString> 2026-03-28 07:20:31 +00:00
Wez Furlong 1e99d430e4 mailparsing: qp_encode now accepts bytes 2026-03-28 07:20:30 +00:00
Wez Furlong 4ede478688 mailparsing: refactor: MimeParameters -> BString 2026-03-28 07:20:30 +00:00
Wez Furlong 7642c7ee0c mailparsing: Address::Group::name -> BString 2026-03-28 07:20:30 +00:00
Wez Furlong 4fcbb725b3 mailparsing: refactor: cleanup deprecated nom::tuple
This is no longer needed on the newer version of nom
2026-03-28 07:20:30 +00:00
Wez Furlong e77579ad1e mailparsing: refactor: more BString 2026-03-28 07:20:29 +00:00
Wez Furlong c5129fb314 mailparsing: *-Results: refactor method/result -> BString 2026-03-28 07:20:29 +00:00
Wez Furlong 59784b9ab6 mailparsing: refactor serv_id fields String -> BString 2026-03-28 07:20:29 +00:00
Wez Furlong cf86e54a6f mailparsing: refactor: AddrSpec fields to BString
This just changes the types of the fields, with minimal fanout.
2026-03-28 07:20:28 +00:00
Wez Furlong 8a0d6c100e mailparsing: upgrade nom to 8.0 2026-03-28 07:20:28 +00:00
Wez Furlong 5f191700ae dkim: upgrade nom to 8.0 2026-03-28 07:20:28 +00:00
Wez Furlong c8ddb085bb bstr: enable serde support 2026-03-28 07:20:28 +00:00
Wez Furlong 863c323c3a deps: upgrade nom to latest 7.x release 2026-03-28 07:20:27 +00:00
Wez Furlong 4b84181479 SharedString: remove deref to str, deal with fanout
Removes the deref to str as this is now a fallible operation that
can panic.

Process the fanout of this change, which is dealing with more
possibility that things might be binary in more places.

There are some transitional APIs introduced as deprecated so that I'm
nagged to remove them already: I want to get the bulk of the code aware
of the possibility of binary sorted before I tackle adjusting the
message parser for that, so that that particular commit is more
self-contained.
2026-03-28 07:20:27 +00:00
Wez Furlong 5a72795376 refactor: conceptually enable mimepart construction from binary
Enable constructing or replacing the body portion of a mime
part with binary content.
2026-03-28 07:20:27 +00:00
Wez Furlong 16f019794e kumo-wrap: enable operating on bytes 2026-03-28 07:20:26 +00:00
Wez Furlong 1ac2f0ee5b mailparsing: refactor SharedString for binary data
This is a step towards allowing non-UTF-8 data to be tracked
in the SharedString type.

It is not complete; some tests now panic with UTF-8 input where
they would previously implicitly perform a lossy conversion.
That will be resolved in subsequent commit(s).
2026-03-28 07:20:26 +00:00
Wez Furlong 084389b7ae dkim: remove implicit policy status for mismatching From/Signing domains
It was pointed out that we had this policy and that it wasn't part of
the spec.

That behavior was imported along with the crate when we forked it from
the cloudflare implementation.

Let's remove it; folks that need it can use a couple of lines of lua to
recreate it if they need it.
2026-03-28 07:20:08 +00:00
Wez Furlong 959928a540 summarize when connection errors are due to unplumbed ip on proxy
This is similar the prior two commits; this one summarizes the case
where socks5 is in use and the bind(2) fails on the proxy server,
indicating unplumbed addresses on the server.

We cannot do the equivalent with HA proxy as its protocol has
no provision for this sort of feedback.
2026-03-28 07:20:07 +00:00
Wez Furlong 36014efd85 summarize when connection failures are due to proxy issues
Following from prior commit, if we failed to connect to a proxy,
summarize that in the resulting transfient failure reason.
2026-03-28 07:20:07 +00:00
Wez Furlong cfaea43cab summarize when connection failures are due to unplumbed ips
Similar to how we summarize and inform when all connection errors
are due to broken TLS, recognize and inform when all connection
errors are due to a source_address that cannot be bound due to
the address not being plumbed on the system.  This does not
include other reasons that `bind(2)` can fail, just the case
where the address is not present.

Add an integration test to capture the error message for
that situation, for easier future reference.
2026-03-28 07:20:07 +00:00
Wez Furlong ffe960e8ea tests: capture what happens if we can't connect to ha proxy
This commit doesn't change any behavior, just captures the
current behavior if an ha proxy server is not reachable.
2026-03-28 07:20:06 +00:00
Mike Hillyer 8d2966727b Link tweak. 2026-03-27 12:50:40 -04:00
Mike Hillyer 6ac3df137d Updating API index in refman to reflect changes to ACL. 2026-03-27 12:48:28 -04:00
Mike Hillyer 44273ed1d1 Update FUNDING.yml 2026-03-16 15:05:50 -04:00
dependabot[bot] 1761afd307 build(deps): bump docker/setup-buildx-action from 3 to 4
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-16 14:40:58 +00:00
dependabot[bot] 448d3d7e55 build(deps): bump quinn-proto from 0.11.13 to 0.11.14
Bumps [quinn-proto](https://github.com/quinn-rs/quinn) from 0.11.13 to 0.11.14.
- [Release notes](https://github.com/quinn-rs/quinn/releases)
- [Commits](https://github.com/quinn-rs/quinn/compare/quinn-proto-0.11.13...quinn-proto-0.11.14)

---
updated-dependencies:
- dependency-name: quinn-proto
  dependency-version: 0.11.14
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-16 14:40:39 +00:00
Wez Furlong d48ad3cb5b mod-serde: sort pretty-printed json object keys
This makes things a bit easier for human consumption, especially
for the `resolve-shaping-domain` utility.
2026-03-16 08:35:00 +00:00
Wez Furlong 4bd063f246 resolve-xxx: allow use with http:// special tsa/xfer queues
These utilities would simplistically assume that the input domain
was always a valid DNS name, which is true for the majority of
things, but our internal webhook, TSA and xfer queue names include
http URLs and would choke these utilities.

We now fall back to using the input "domain" if the MX resolution
attempt throws an error; the error is typically a failure to parse
rather than something like NXDOMAIN which is generally returned as an
empty result.
2026-03-16 08:20:47 +00:00
Wez Furlong c0440ea138 rfc3464: fix issue with addresses enclosed in <>
This is a follow on from the previous commit; apparently some sites
will enclose addresses in <> even though this is not covered in the
RFC.

Let's cut the address parsing over to the SMTP parser rather than
the mail header parser, as they have rather different semantics
and both ARF and OOB are SMTP-centric.
2026-03-16 08:06:35 +00:00
Wez Furlong 813c7935d6 rfc5965: fix an issue with addressed enclosed in <>
We had a report that the enclosing <> were being passed through
to the JsonLogRecord in some log hook flows, which meant that
we'd try to parse them as EnvelopeAddresses and fail.
2026-03-13 10:36:36 +00:00