Commit Graph

245 Commits

Author SHA1 Message Date
Wez Furlong 62de291279 docs: suggest folks prefix their metadata names
Should help to avoid possible conflicts with the core metadata names.
2026-05-12 14:35:16 +01:00
Wez Furlong 37236c40b1 docs: update for the 2026.04.09-ea3b2a9b release 2026-04-29 08:07:13 +01: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 654f9b88f5 new: ip_lookup_strategy option in make_egress_path
This provides control over IPv4 and IPv6 lookups based on the source
and/or destination.
2026-03-04 16:33:32 +00:00
Wez Furlong 4eef49df3c docs: remove suspended option from docs
This was removed from the product over a year ago in
16fb1ae316
2026-03-04 15:14:50 +00:00
Wez Furlong 93e8e7dd01 docs: update since('dev') macros for stable release 2026-03-04 08:03:21 +00:00
Mike Hillyer c4c161543f Typo. 2026-03-03 13:53:31 -05:00
Wez Furlong 7d521fd493 docs: clarify enable_mta_sts 2026-03-03 17:19:25 +00:00
Wez Furlong 1690e6526a refactor: move start_proxy_listener to proxy module
We're keeping a reference to it via kumo.start_proxy_listener briefly,
just in case someone is using that live somewhere.

We don't need to changelog this, as this whole feature hasn't
been in a stable tag yet.

refs: https://github.com/KumoCorp/kumomta/pull/472
2026-02-06 07:31:30 +00:00
Aditya Ganti f898e2a7e6 Add Prometheus metrics to proxy-server
Co-authored-by: Wez Furlong <wez@wezfurlong.org>

closes: https://github.com/KumoCorp/kumomta/pull/472
2026-02-06 07:11:27 +00:00
Wez Furlong 4f636a0fae skip_hosts: downgrade to a transient failure
This is a conceptually breaking change, but shouldn't be harmful
in practice.

Recently, Microsoft hosted domains have had a number of incidences where
the DNS stopped returning IPv4 addresses, which lead to systems that
employ skip_hosts to disable their IPv6 addresses (presumably due to
difficulties in warmup and reputation) to trigger the terminal case
where we would sweep the ready queue away as a permanent routing
failure.

In the context of a transient failure to route ipv4 the permanent
disposition was surprising and unwanted so it feels better to make
the effect of this situation more closely map to how we handle the
case where no MX records are returned.
2026-02-04 13:12:14 +00:00
Wez Furlong 87b64c8d2b docs: flesh out docs for a number of metrics
Give some suggestions on how to interpret a number of the metrics,
as well as cross linking to relevant documentation for them.
2026-02-04 11:45:11 +00:00
Wez Furlong c5a6a1fb00 Adjust docs based on code review 2026-02-03 08:29:00 +00:00
kay ozaki bf6f9104dc exposing memory config parameters 2026-02-03 08:29:00 +00:00
Wez Furlong d6eb5176ad docs: remove rapidoc HTTP explorer
It has been replaced by our own static generation.
2026-01-30 16:37:12 +00:00
Wez Furlong 74d95f81a6 docs: refine recent proxy server doc changes
refs: #459
2026-01-19 07:45:10 +00:00
Wez Furlong 2369162e75 proxy: flip no_splice to use_splice in proxy policy file
This option was named `--no-splice` on the command line because that
was the easiest UX there.  The negative logic makes it harder to
understand how to enable/disable, so let's flip it and default
use_splice=true.

refs: #459
2026-01-19 07:45:09 +00:00
Kevin Vu 8e832ad071 docs: add kumo.start_proxy_listener and changelog entry
Fixes #459
2026-01-19 07:45:09 +00:00
Wez Furlong 1d8ce2bb74 http inject: add integration test for request_body_limit
This commit doesn't change any behavior, it just adds an explicit
test for exceeding request_body_limit, and expands on the docs
for request_body_limit to clarify the response when the limit
is exceeded.
2026-01-15 13:52:10 +00:00
Wez Furlong b551d6b4c7 docs: update for release 2025.12.02-67ee9e96 2025-12-02 11:11:05 +00:00
Wez Furlong 3781ff7d95 docs: format 2025-11-19 07:57:37 +00:00
Wez Furlong 6f53931fde add kumo.invoke_get_egress_(pool|source)
These functions are similar to the existing
invoke_get_egress_path_config and invoke_get_queue_config functions;
they return the configuration information that is defined by your
overall policy in the same way that the system does.

The intent is for more advanced policies that need that info to
decide how to configure other parts of the policy.

Docs are included, and I fleshed out the missing docs for the two
pre-existing functions.
2025-11-14 07:04:58 +00:00
Wez Furlong 4c89acae96 docs and changelog for require_proxy_protocol #440 2025-11-13 15:27:39 +00:00
Wez Furlong 26a0c86c49 Expose version number to lua via kumo.version
I'm surprised that we didn't already do this!
It allows phrasing the policy to accommodate different versions
of kumo.
2025-11-13 06:30:35 +00:00
Wez Furlong 4917ee6245 prohibited_hosts: add v4 and v6 any address
Saw an MX record that expands to 0.0.0.0 in the wild.

As well as being nonsense, that causes a mail loop, so we should add it
to prohibited_hosts.

I noticed that we also did not document its default value, so the
doc update here shows the before and after for this.
2025-11-10 15:09:11 +00:00
Wez Furlong 7ac9a5eac0 smtp_dispatcher: handle pathologic all-452 case
Continuing in the same vein as 94628f06ab,
ensure that we have a reasonable outcome when a batch of size > 1
encounters 100% ambiguous 452 responses.

Without special consideration we'd end up in an infinite retry loop for
these, as we'd think that we'd hit the recpient limit on the connection
every time.

This commit introduces a small amount of state into the dispatcher so
that we can remember the set of (spoolid, recipient) from the prior
transaction on the session.

When deciding whether something is eligible for immediate retry
we will gate that choice on the current (spoolid, recipient) being
absent from the prior set of ids.  In this way, we bound the immediate
retry for a recipient to one per connection.

To make things a bit more robust when trying to decide whether a 452
means "too many recipients" or not, if we're not sure, we now call out
to the bounce classifier which can be configured to emit a
`TooManyRecipients` classification.  If the classifier produces either
that or some non-Uncategorized response, then we have a confident
assessment.  Otherwise, we're unsure and will factor that into the
retry strategy.
2025-11-07 08:13:36 +00:00
Wez Furlong 49cdee1ec5 lruttl: expose pre-defined cache info to the docs
This commit adds some plumbing to allow us to collect metadata
about the caches and spit it out into a json file that we can
then use in the docs to show the predefined caches, capacities
and brief comments about their purpose.

We put that info on the set_lruttl_cache_capacity doc page.
2025-11-01 07:40:40 +00:00
Wez Furlong aac842439f smtp_server: increase line_length_hard_limit default to 1000
We were including the CRLF in the measurement that we were making,
while the default value was the value from the spec excluding the CRLF.
Let's increase the default value to 1000 to make things match up.
2025-10-13 09:53:03 +01:00
Wez Furlong a81493a17e docs: remove extraneous quotes 2025-10-11 07:07:54 +01:00
Wez Furlong 794113f0b0 smtp_dispatcher: add max_recipients_per_batch
This sets a client side shaping control to manage the maximum number of
RCPT TO commands issued in a single transaction.
2025-10-07 07:53:15 +01:00
Wez Furlong f968935315 add smtp_server_split_transaction event
This provides full control over how an incoming smtp transaction
will be split into batches.
2025-10-07 07:53:15 +01:00
Wez Furlong 981de67f1c docs: update for 2025.10.06-5ec871ab release 2025-10-07 07:38:10 +01:00
Wez Furlong 4ba41290a6 docs: format and fixup whitespace 2025-10-06 07:02:18 +01:00
Wez Furlong dba45cfa28 logging: allow * to match meta names
This uses the same scheme as allowed for matching header names
in logging.
2025-10-06 07:02:18 +01:00
Tom Mairs 873f9e524d Update sample code 2025-10-03 20:27:23 +01:00
Wez Furlong d9d3d14e3e enable XCLIENT support
Hooks up the parsed XCLIENT command to the smtp server.
We support just the address changing attributes; we don't
do anything special with the NAME attribute, and I'd like
to think a lot more about authentication before allowing
messing with the LOGIN attribute.

After applying changes to the metadata in the connection,
take care to re-evaluate the listener parameters and
dynamic parameters so that `via` and `peer` blocks can
match the new configuration.
2025-09-26 09:36:15 +01:00
Wez Furlong 90dd172f6c wrap up 8BITMIME and SMTPUTF8 support
Finishes up support for these extensions by adding a send-time
check and error for the case where we have 8 bit content and
the appropriate extension is not advertised by the next hop.

A shaping option is provided to bypass this, both to facilitate
testing and as a way to bypass it for situations where the
operator knows best.

closes: https://github.com/KumoCorp/kumomta/issues/327
2025-09-25 12:37:11 +01:00
Wez Furlong 33e1883d79 add kumo.apply_supplemental_trace_header
This allows manual and conditional control over whether and how this
header is added to a message.
2025-09-25 09:02:41 +01:00
Wez Furlong 7fffccf410 Add support for generating NDRs
This commit adds some plumbing to facilitate generation of RFC 3464
non-delivery reports and some corresponding glue to enable calling
it from lua.

Examples in the docs that are also added.
2025-09-09 14:12:52 +01:00
Wez Furlong c7cbd99a9f add kumo.inject_message 2025-09-09 10:38:36 +01:00
smsvip 05d4a23b60 Update set_smtpsrv_threads.md
Repair set_smtpsrv_threads documents
2025-08-25 22:20:23 -04:00
Wez Furlong 91884d3892 docs: format 2025-07-26 13:30:00 +01:00
Pankaj Rathi eae61a90fe Add support for custom key names in HashiCorp Vault secrets (#399)
* Add support for custom key names in HashiCorp Vault secrets

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-07-25 06:02:21 +01:00
Wez Furlong 9e62a275c5 add tls_required_client_ca esmtp listener parameter
This enables configuring mTLS support in the listener.

Adjust TLS client tests to use this on the sink side and verify
that mTLS works for both inbound and outbound SMTP.

refs: #100
refs: #391
2025-07-24 15:40:49 +01:00
kayozaki 76add2ced5 Adding support for presenting Client cert as part of make_egress_path (#391) 2025-07-24 13:00:27 +01:00
Wez Furlong 7e6ca34e2d new: kumo.fs lua module
The read_dir and glob functions have been logically moved into that new
namespace, leaving deprecated versions of them in the `kumo` module.

A new `kumo.fs.open` function that works similarly to `io.open` is
provided.  This function cooperates with the kumo async io scheduler
and won't block it if the filesystem is under pressure.

It returns file handles that are simlar to the builtin lua file handle
objects, but do not support formatting or parsing of writes or reads
respectively: the calling code is responsible for that.  The rationale
for this difference is that is that lua's semantics for those functions
are frankly a bit weird and are hard to replicate precisely.
2025-07-23 16:51:06 +01:00
Wez Furlong d9a2392ccb allow setting destination smtp port via mx_list 2025-07-21 12:30:29 +01:00
Mike Hillyer 58e9770206 We miss you Mister Rogers. 2025-07-18 12:11:14 -04:00
Wez Furlong e0db075d5f docs: kumo.disconnect
kumo.disconnect was added as part of an earlier commit (to facilitate
some testing), but without any docs.

This commit adds docs for it!
2025-07-07 18:35:46 +01:00
Wez Furlong 42bf5c5e61 docs: adjust reference to improve search terms
We've been hoping that mkdocs-material will ship the much anticipated
search enhancements for some time, but it's time to recognize that
we need to do something to improve the search results with how
things work right now.

This is a big commit that changes the titles of the various pages
from the code-annotated synopsis to just the name of the function.

This makes it much easier now to match things like `kumo.reject`
directly, but `reject` remains awkward to find.

I think this is the best that we can do at this time.

A few functions have been annotated with the `status: deprecated` to
show as deprecated in the toc/nav (shows with a little trash can next
to the name).
2025-05-16 14:02:19 -07:00