3830 Commits
Author SHA1 Message Date
cargo-dependency-cooldown[bot] 68da6d9b61 deps: update Cargo.lock via cooldown 2026-09-15 10:45:02 +01:00
Wez Furlong b2de451163 mailparsing: escape literal underscore in Q encoded headers
A literal underscore in a header value that needed RFC 2047 Q encoding was
emitted unescaped, so a conforming mail client decoded it back to a space
and silently corrupted the header. Underscores are now escaped as =5F, and
the Q encoder passes through only the punctuation RFC 2047 permits unencoded
in a phrase.
2026-09-10 13:58:53 +01:00
Wez Furlong 4490208918 docs: add glossary to nav 2026-09-08 07:44:47 +01:00
Wez Furlong 2303a3c038 docs: format code examples 2026-09-08 07:43:52 +01:00
Mike Hillyer 61f91a2395 Initial commit of glossary. 2026-09-01 15:31:35 -04:00
Wez Furlong 2a40536127 ci: disable workspace lints in docs docker build
This is a bit of a hack, but should hopefully fix up the doc build
2026-08-27 23:15:28 +01:00
Wez Furlong 9ff30af0a5 mod-http: fix pairs() header iteration hang
Iterating a response's headers with pairs() looped forever when a header name
repeated, which could happen for example with multiple Set-Cookie headers.
2026-08-27 18:00:41 +01:00
Wez Furlong d5461cdae4 rustfmt 2026-08-27 14:40:31 +01:00
Wez Furlong f9b50adcea clippy: forbid direct use of chrono's rfc2822 date functions
We have mailparsing wrappers that format and parse rfc2822 dates without
panicking on out-of-range values or rejecting the obsolete timezones that
real senders emit. This moves every existing caller onto those wrappers and
adds a clippy lint that requires them in place of chrono's versions.
2026-08-27 14:38:48 +01:00
Wez Furlong 352ada5042 clippy: address all current clippy issues
Migrate the clippy allowlist from the clunky list in the Makefile
to the workspace config, and ensure that all crates reference it.
2026-08-27 14:38:48 +01:00
Wez Furlong bcab083891 rfc3464: avoid panic when printing out of range dates
Fallout from the xfer far-future timestamp issue is that we could
try to produce a DSN for a message with a crazy date, which chrono's
default RFC2822 rendering gives up on with a very hostile panic.

This commit adds our own infallible rfc2822 formatter.  It is infallible
rather than fallible because dates can be formatted from inside Display
impls where the full chain may not be prepared to handle an error.
2026-08-27 14:38:47 +01:00
Wez Furlong 6994997e0d shaping: add some debug tracing
Looking into what might cause variance in a large shaping
configuration, the debug tracing is helpful to understand
what is participating and resolving.
2026-08-27 14:38:47 +01:00
cargo-dependency-cooldown[bot] 6e75304a16 deps: update Cargo.lock via cooldown 2026-08-25 13:09:09 +01:00
Wez Furlong 7f21784537 xfer: fix far-future timestamps on transferred messages
A message received via inter-node transfer, on systems hosted on AWS, could
end up with a wildly incorrect far-future timestamp. The underlying mac_address
crate would pick a NIC with the same MAC address as other AWS instances in the
cluster, and that triggered a code path where the collision resolving logic
misinterpreted the timestamp portion of the incoming spool id.

The thing that made this painful was the logic in spool_id.rs: it
misinterpreted the subsecond portion of the timestamp extracted from
the uuid, and due to the way that that field wraps, could produce wildly
inaccurate deltas with a huge multiplier.

As a belt and suspenders treatment, allow the user to influence which
MAC address is selected via the new KUMO_MAC_INTERFACE and
KUMO_MAC_ADDRESS environment variables.
2026-08-25 07:48:50 +01:00
Mike Hillyer 7cbc3601b5 Spelling Fix 2026-08-19 14:36:58 -04:00
dependabot[bot] 149acf695f build(deps): bump the github-actions group across 1 directory with 2 updates
Bumps the github-actions group with 2 updates in the / directory: [docker/login-action](https://github.com/docker/login-action) and [mozilla-actions/sccache-action](https://github.com/mozilla-actions/sccache-action).


Updates `docker/login-action` from 4.4.0 to 4.6.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v4.4.0...v4.6.0)

Updates `mozilla-actions/sccache-action` from 0.0.10 to 0.0.11
- [Release notes](https://github.com/mozilla-actions/sccache-action/releases)
- [Commits](https://github.com/mozilla-actions/sccache-action/compare/v0.0.10...v0.0.11)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: mozilla-actions/sccache-action
  dependency-version: 0.0.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-18 07:43:18 +01:00
cargo-dependency-cooldown[bot] c05c41b1a7 deps: update Cargo.lock via cooldown 2026-08-18 07:42:45 +01:00
cargo-dependency-cooldown[bot] 9e1619c1e6 deps: update Cargo.lock via cooldown 2026-08-10 14:36:52 +01:00
cargo-dependency-cooldown[bot] 3ebc1e8585 deps: update Cargo.lock via cooldown 2026-08-04 13:41:30 +01:00
Wez Furlong 08c3ace6d2 ci: update cooldown workflow to sign its commits 2026-08-04 12:09:06 +01:00
Wez Furlong bd0ef3f530 integration-tests: capture in-process tracing and fail loudly on shaping fetch errors
Install a tracing subscriber in the test process itself, routed through the
libtest capture, so diagnostics from in-process library code show up alongside
a failing test's output instead of being discarded.

Have the tsa test helper fetch shaping at Error level so a failed HTTP
fetch fails the test with the real reason, rather than being downgraded
to an empty result that caused the tsa_basic_automation test to fail.
2026-07-30 13:20:34 +01:00
Wez Furlong a641936eb0 integration-tests: fix flakey retry_schedule_nxdomain test
Resolve the test's dead domain through a local test resolver instead of
live DNS. The real NXDOMAIN lookup took a variable few seconds, which got
folded into the first retry interval and tripped the assertion that the
first delivery attempt happens right after reception.
2026-07-30 12:49:58 +01:00
Wez Furlong d2034778e3 trace headers: fold long supplemental trace headers
Base64-encoded supplemental trace headers (X-KumoRef) can exceed the
998-octet SMTP line length limit when they include sizeable metadata,
causing a strict receiver (eg: us, when an ARF comes back to us with
that header) to reject the message at DATA with "line too long".

Fold the encoded value across continuation lines so each physical line
stays within the limit, and strip the folding whitespace before decoding
it back into a feedback report.
2026-07-30 10:41:38 +01:00
Wez Furlong d895ee7afa websockets: fix narrow race at session initiation time
Running down a test flake and diagnosed this one.

This commit closes a narrow race when attaching to the SMTP tracing
(trace-smtp-server, trace-smtp-client) and TSA subscription
(subscribe_suspension_v1, subscribe_event_v1) websocket endpoints. The
server did not finish registering the new subscriber until just after
the connection handshake completed, so any event produced in the brief
window between those two points was not delivered to that client.

In practice this could cause a freshly-attached SMTP trace to miss the
first event or two of a session that happened to start at the same
instant; it did not affect mail flow. The endpoints now register the
subscriber before completing the handshake
2026-07-28 15:21:45 +01:00
Wez Furlong bfdf4ed3e9 mailparsing: rfc2822 date parsing now accepts obsolete timezones
RFC 2822 date parsing now tolerates an obsolete alphabetic time zone
such as the `UTC` that Amazon SES emits in its bounce reports, which
strict parsing would otherwise reject. A recognized abbreviation
resolves to its offset (derived from the IANA time zone database), and
any other alphabetic zone falls back to the `-0000` unknown offset per
RFC 5322 section 4.3 rather than failing the parse.

closes: https://github.com/KumoCorp/kumomta/pull/551
2026-07-28 12:09:53 +01:00
dependabot[bot] 000f8c5c0f build(deps): bump the github-actions group across 1 directory with 6 updates
Bumps the github-actions group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `7.0.0` | `7.0.1` |
| [docker/login-action](https://github.com/docker/login-action) | `4.2.0` | `4.4.0` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `7.2.0` | `7.3.0` |
| [actions/create-github-app-token](https://github.com/actions/create-github-app-token) | `2` | `3` |
| [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) | `7` | `8` |
| [docker/metadata-action](https://github.com/docker/metadata-action) | `6.1.0` | `6.2.0` |



Updates `actions/checkout` from 7.0.0 to 7.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v7.0.0...v7.0.1)

Updates `docker/login-action` from 4.2.0 to 4.4.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v4.2.0...v4.4.0)

Updates `docker/build-push-action` from 7.2.0 to 7.3.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v7.2.0...v7.3.0)

Updates `actions/create-github-app-token` from 2 to 3
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Changelog](https://github.com/actions/create-github-app-token/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/create-github-app-token/compare/v2...v3)

Updates `peter-evans/create-pull-request` from 7 to 8
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v7...v8)

Updates `docker/metadata-action` from 6.1.0 to 6.2.0
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v6.1.0...v6.2.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: docker/login-action
  dependency-version: 4.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: docker/build-push-action
  dependency-version: 7.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/create-github-app-token
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: peter-evans/create-pull-request
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: docker/metadata-action
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-28 09:07:05 +01:00
wez 3ce4b6f979 deps: update Cargo.lock via cooldown 2026-07-28 09:06:34 +01:00
kay ozaki abce86bd24 add check_trailing_bits: false
While testing message parsing code, there's a chance that the sender
isn't fully compliant with base64.  This leads to failure such as below

base64 decode: non-zero trailing bits at 20211 b='i' in HRtbD4NCi==

As long as it's not destructive, its more convenient to be able to
support non-RFC messages so we can extract message artifacts for its
decision making.

closes: https://github.com/KumoCorp/kumomta/pull/558
2026-07-28 08:13:06 +01:00
Wez Furlong 290f6d6019 ci: disable dependabot rust updates
We do this via cargo cooldown instead
2026-07-28 07:58:43 +01:00
Wez Furlong b3753cd841 ci: don't mirror our cargo-cooldown branches 2026-07-28 07:57:05 +01:00
Wez Furlong 30578b928b ci: include cooldown output into PR description 2026-07-28 07:55:59 +01:00
Wez Furlong c4280f5df2 ci: add cargo-cooldown workflow 2026-07-28 07:45:16 +01:00
Wez Furlong 837ad5c56e cooldown: allow human to act when constraints cannot be met 2026-07-28 07:19:31 +01:00
Alex Burch 0c930b7a1c rfc5321: tolerate stray space after MAIL FROM:/RCPT TO: colon
RFC 5321 does not permit a space between the colon and the reverse/forward
path in MAIL FROM: and RCPT TO:, but a number of legacy clients emit one
(e.g. "MAIL FROM: <addr>"), which kumod rejected with 501 5.1.7.

Relax the grammar to accept and discard an optional run of spaces/tabs after
the colon in both the success and "valid-address + trailing junk" arms for
MAIL FROM and RCPT TO. This is a grammar-level change per review feedback,
replacing the earlier opt-in allow_space_before_path listener option.

Adds parser tests covering the tolerated space for both verbs, including the
null sender, postmaster, and ESMTP parameter cases.

closes: https://github.com/KumoCorp/kumomta/pull/559
2026-07-28 07:13:55 +01:00
Wez Furlong 6b2ddfec41 docs: changelog for #570 2026-07-28 06:59:36 +01:00
Wez Furlong b90e9c53b8 message: persist post-reception schedule changes to the meta spool
Changing a message's schedule now marks its metadata dirty, so the new
schedule survives changes post-reception. Without this a schedule applied
after the message was first persisted would be dropped.
2026-07-28 06:59:36 +01:00
Alex Burch f981e43b73 message: persist envelope changes to the meta spool
set_sender and set_recipient_list mutate metadata fields (meta.sender /
meta.recipient) but were flagging the message DATA_DIRTY instead of
META_DIRTY. This had two consequences:

1. The rewritten sender/recipient was never written to the meta spool
   (save_to only serializes metadata when META_DIRTY is set), so the
   change could be silently lost after a spool reload or restart.

2. If the message body had already been saved and shrunk (empty
   in-memory data buffer), flagging DATA_DIRTY made the next save fail
   the `message data must not be empty` assertion in save_to. This
   surfaced as noisy queue-maintainer requeue errors:
     - "Error reinserting message: ... message data must not be empty"
     - "while shrinking: <id>: message data must not be empty"

Flag META_DIRTY instead, and add regression tests covering the dirty-flag
behavior and the shrunk-data case.

closes: https://github.com/KumoCorp/kumomta/pull/570
2026-07-28 06:59:36 +01:00
Wez Furlong 92e31dc2e1 dependabot: update config to enable grouping 2026-07-28 06:28:40 +01:00
Wez Furlong 08cb664f65 test: fix flakey inspect_ready_q test 2026-07-28 06:25:52 +01:00
Wez Furlong 9f432f4ab2 dns-resolver: migrate this test from live-dns to fixture 2026-07-27 08:02:38 +01:00
Wez Furlong 7d6e6d558d Tidy up Option<PolicyMode> -> PolicyMode
The latter already has a None so it felt cumbersome to layer it up in an
Option.
2026-07-27 08:02:38 +01:00
Wez Furlong 9efc2a031c allow mocking mta-sts end-to-end, add integration test coverage
This sets up plumbing to allow testing the broken mta-sts aliasing
issue, and enables feeding an optional resolver through the mx lookups
as well.

closes: https://github.com/KumoCorp/kumomta/pull/524
2026-07-27 08:02:37 +01:00
Wez Furlong 41be60dfce Evaluate MTA-STS during MX resolution to fix aliasing issue
refs: https://github.com/KumoCorp/kumomta/issues/484

Briefly, the issue is that if some random domain that shares MX records
with another (eg: someone is using google apps or icloud for their
vanity domain) publishes a broken MTA-STS policy that requires eg:
cloudflare MX hosts then because we roll up by site name, that broken
MTA-STS policy bleeds into all the other domains that share those MX
records.

The resolution is simple, but is technically a breaking change.

Moving the policy resolution to happen during site_name resolution
allows us to resolve both per-domain things at the same and have the
MTA-STS policy amend the effective set of MX hosts.  The output of that
is then used for site_name aggregation/rollup.

The consequence of this is quite nice: an MTA-STS policy that is more
restrictive than the full set of MX hosts now prevents delivering to
any of the excluded hosts, and a totally broken policy that prevents all
of its MX hosts is now completely undeliverable and will produce
transient failures.

The downside is that for users that had previously disabled mta-sts in
their default shaping block, they will need to change a different config
option to continue to prevent MTA-STS from being consulted.  One example
of this that I recall is that one user's network posture prevented
MTA-STS from making HTTPS requests to fetch the policy.  Another user
just wanted to cut out the additional DNS traffic.  Those use cases
require altering the new kumo.dns.set_mta_sts_enabled enabled to false
during `init`.
2026-07-27 08:02:37 +01:00
Mike Hillyer 2d9f70dd98 Double quotes in titles break the build. 2026-07-25 22:12:09 -04:00
Mike Hillyer 0acaa1b6a5 Cleanup of FAQ entries. 2026-07-15 17:09:53 -04:00
Mike Hillyer 2790f6dfdb Killing deprecated FAQ 2026-07-15 12:41:28 -04:00
Mike Hillyer fd227fc055 Adding to the FAQ 2026-07-15 11:53:40 -04:00
Mike Hillyer e6bf582beb Add metadata to FAQs. 2026-07-09 21:46:20 -04:00
Mike Hillyer cf83f8ed7e Add meta descriptions to the Userguide and Tutorial. 2026-07-09 18:07:40 -04:00
Mike Hillyer d878f95021 Minor mechanical fixes. Capitalization and punctuation mostly. Also testing defined meta descriptions. 2026-07-09 14:31:23 -04:00