Commit Graph
1240 Commits
Author SHA1 Message Date
Tom Mairs f498cf3482 fix formatting 2025-06-20 20:03:56 +00:00
Tom Mairs a8157812de Add systemd service instructions for KumoProxy 2025-06-20 19:38:23 +00:00
Mike Hillyer 9dba9c5b5f Update traffic shaping defaults to require TLS for Google as per conversation with Gmail admins. 2025-06-10 09:26:07 -04:00
Wez Furlong 705c76ec1a mailparsing: fix potential panic when fixing broken base64 parts
The sampled region needs to be clamped to fit the length of the string;
we were previously assuming that there could be 8 additional bytes after
the error position, which is not guaranteed.
2025-05-27 06:58:57 -07:00
Mike Hillyer ac67fdf71e Linter complaint 2025-05-22 14:39:40 -04:00
Mike Hillyer 02537213aa Typo fix. 2025-05-22 14:27:29 -04:00
Mike Hillyer 168fb14e67 Correction. 2025-05-21 09:53:41 -04:00
Wez Furlong bf76ddd066 docs: fixup get_egress_path_config
You can't actually define this multiple times; I was on early-morning
autopilot when I wrote that up in 48f1e48e6d
2025-05-16 14:07:10 -07: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
Wez Furlong 36a14f1ff7 docs: add explicit titles to event reference pages
This makes it easier to search for eg: get_egress_path_config and have
mkdocs return that page as a result.
2025-05-16 06:35:45 -07:00
Wez Furlong 48f1e48e6d docs: expand get_egress_path_config event docs 2025-05-16 06:28:13 -07:00
Wez Furlong b2cdc079e1 docs: fmt 2025-05-15 09:12:17 -07:00
Wez Furlong 1a7875c663 docs: update configure_resolver page for hickory changes
Since we published a stable release on the new hickory,
tweak this page to show the now-current form of things.
2025-05-14 12:54:19 -07:00
Mike Hillyer 41d8cd92a1 Add Postmastery integration. 2025-05-09 13:01:36 -04:00
Wez Furlong b0c6b1cf6a smtp_dispatcher: retry more aggressively in transport-error-ish scenarios
Some sites are non-conforming in their behavior when they have a policy
that issues a transient failure and then snips the connection without
explicitly issuing a 421.

This can cause "splash damage" where a message is transiently failed
and the connection snipped "disgracefully" and a subsequent message
that is due to go out on that same established connection encounters
a transport error when the RSET part of the pipeline is sent.

This commit provides methods on the ClientError and Response types
to help reason about whether the response might be specifically
about the message being delivered, vs. more of a transport error.

The gist of this check is that timeouts and transport level stuff
where there is no protocol level response are not considered to
be due to the message.  Protocol level responses prior to MAIL FROM
are similarly considered to be more like transport errors.

The functional change in this commit is:

* If we get a transport-ish error and we have more candidate hosts
  available in the connection plan, then after logging a
  TransientFailure for the error we just encountered, we'll push
  back the message to be tried again on the next connection that
  we open in the current session.

* For timeout errors specifically, this behavior is gated behind
  a try_next_host_on_timeout boolean option.
2025-05-08 10:41:06 -07:00
Wez Furlong c3dff7e2c8 docs: update for latest release 2025-05-06 18:24:15 -07:00
Wez Furlong b29689af74 docs: memoize: allow_stale_reads 2025-05-06 05:55:44 -07:00
Wez Furlong 507822f1c9 docs: fmt 2025-05-06 05:55:34 -07:00
Mike Hillyer 9249fbc482 Remove extra references. 2025-05-05 16:10:09 -04:00
Wez Furlong e8573f9a76 rfc5965: ignore bogus rfc822 dates arrival or reception-date headers
The rfc includes a bogus date in one of its examples, which the
underlying chrono library produces an error for.

Since we don't loudly report failures in parsing incoming reports,
this sort of error is confusing for the user.

These date fields are optional, so we can convert the error to
None without harming the overall outcome.
2025-05-05 08:48:41 -07:00
Wez Furlong fedd2959b6 enhance log_arf, log_oob to support LogThenDrop
It is common to want to express that incoming reports should
be logged, but not relayed.

This commit facilitates that by expanding `log_arf` and `log_oob`
to allow more than just a simple boolean value.

We now support both LogThenRelay and LogThenDrop as dispositions
for an incoming report, as well as Ignore to not care about the
report content.

For the LogThenDrop case we'll log only the incoming OOB or Feedback
record to the logs and then discard the incoming message.

For LogThenRelay we'll log the incoming OOB/Feedback report as well
as enqueue the message and log a Reception and, subsequently, records
for its delivery attempts.

The previously supported boolean values are mapped to `Ignore` (false)
and `LogThenRelay` (true), respectively: their behavior is the same as
in prior releases.

The integration test and smtp server tracing infra has been enhanced a
bit to support extracting these new disposition states from the tracer
during the integration test.
2025-05-05 08:25:40 -07:00
Wez Furlong 9641bcf1ff docs: note about domain-suffix when using iptables 2025-05-01 10:23:01 -07:00
Wez Furlong db1f3c3773 docs: wrap iptables command 2025-05-01 10:20:01 -07:00
Wez Furlong c3b65667a6 docs: expand discussion around iptables 2025-05-01 10:19:15 -07:00
Wez Furlong 3732bc0fef docs: code formatting 2025-05-01 10:09:01 -07:00
Mike Hillyer d57953ba87 Formatting and spelling fixes. 2025-05-01 12:55:44 -04:00
Mike Hillyer 35e49a4312 Typo fix. 2025-05-01 12:31:05 -04:00
Mike Hillyer 366b45c2e5 Formatting update. 2025-05-01 12:31:05 -04:00
Mike Hillyer e08111beee Implement Wez's feedback to use meta instead of header in the logging example. 2025-05-01 12:31:05 -04:00
Mike HillyerandWez Furlong d9273e2e19 Update docs/faq/how_do_i_include_multiple_files.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-05-01 12:31:05 -04:00
Mike Hillyer 1a68d526f5 Update to linux tuning to show possible parameters but not values to prevent copypasta. 2025-05-01 12:31:05 -04:00
Mike Hillyer c978a23a8c Update Linux tuning to have less examples so that people don't blindly implement them. 2025-05-01 12:31:05 -04:00
Mike HillyerandWez Furlong 1ef1cf4cc3 Update docs/userguide/performance/testing.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-05-01 12:31:05 -04:00
Mike HillyerandWez Furlong 50a274fa83 Update docs/userguide/performance/loghooks.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-05-01 12:31:05 -04:00
Mike HillyerandWez Furlong 1a645681fd Update docs/userguide/performance/loghooks.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-05-01 12:31:05 -04:00
Mike Hillyer b92812cf8b Add glob example. 2025-05-01 12:31:05 -04:00
Mike HillyerandWez Furlong 163f826fa1 Update docs/userguide/performance/architecture.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-05-01 12:31:05 -04:00
Mike HillyerandWez Furlong 7b5b655a09 Update docs/userguide/performance/architecture.md
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-05-01 12:31:05 -04:00
Mike Hillyer 670133a64f Quick edit. 2025-05-01 12:31:05 -04:00
Mike Hillyer 5035b82092 Add a SPOF FAQ entry. 2025-05-01 12:31:05 -04:00
Mike Hillyer 62a48d4787 Added the architecture page, further tweaks. 2025-05-01 12:31:05 -04:00
Mike Hillyer c086a08c03 Linter complaints. 2025-05-01 12:31:05 -04:00
Mike Hillyer 08224b223d DNS and loghook pages 2025-05-01 12:31:05 -04:00
Mike Hillyer dd4a2acf60 Updates to the performance chapter of the userguide. 2025-05-01 12:31:05 -04:00
Mike Hillyer 01cd7985ae Update Message flow page to go deeper on some of the events and factors that will need to be tuned. 2025-05-01 12:31:05 -04:00
Mike Hillyer 27447c8e0b Updated testing page to use the sink container rather than the sink init.lua so that testers will be encouraged to have more realistic tests. 2025-05-01 12:31:05 -04:00
Mike Hillyer 66a377bae6 Initial re-arranging of existing performance related content from the Operation chapter to the Performance chapter. 2025-05-01 12:31:05 -04:00
Mike Hillyer ab40de0920 Initial commit just to test my changes. 2025-05-01 12:31:05 -04:00
Wez Furlong cd09170bc4 throttle: fix TTL issue with redis-script based throttles
When using throttles with a long period, a porting issue from the JS
based throttle code meant that we'd compute a TTL in *seconds* but tell
redis that its value is in *milliseconds*, resulting in a much shorter
expiration time than desired, allowing more messages to pass the
throttling condition.

This issue doesn't apply to the redis-cell based throttle
implementation.

The fix here is simply to switch the `PX` (TTL in milliseconds) to
`EX` (TTL in seconds).

Possibly this was the source of the flakeyness that we could never
run down in https://github.com/KumoCorp/kumomta/issues/297
2025-04-30 14:15:39 -07:00
Wez Furlong b8310da8be docs: add warning about logging headers
TL;DR: you can easily halve your system performance by logging headers
vs. logging meta.

This is one of those things that is easy to overlook or forget,
but: whenever you need to operate on the message data, rather
than its metadata, the aggregate cost is high.

In this case, we were recently troubleshooting a system where
the CPU was bogged down and we traced it to the logging configuration: a
number of message headers were being logged in a configuration that
made heavy use of throttles and limits in its traffic shaping, and
thus had a large number of Delayed and TransientFailure events being
written to the logs.

When logging headers, each one of those events requires loading
the message from the spool and parsing out the headers.  When the
average message size is ~100KB this imposes a notable overhead
on the CPU and IO utilization of the system.

What we recommend instead of logging headers directly is capturing
the information that you want to log into the message metadata
at the time that the message is received.

The message meta is usually already loaded, but is also typically
much smaller and easier to decode than the full message content
in the cases where it is not loaded.

As a result, it is much cheaper to log meta than to log headers.

This commit adds some warnings and cross links to help folks
be aware of this, and to generally navigate related meta and logging
topics more easily via tags.
2025-04-25 05:52:44 -07:00