Commit Graph
2592 Commits
Author SHA1 Message Date
Dirkjan Ochtman 82f16f907c Upgrade tungstenite, tokio-tungstenite to 0.24 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman ab99bbb506 Upgrade metrics* to metrics 0.24 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman b230a53f0f Upgrade sqlite to 0.36 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman 2f61e8aa5c Upgrade rustls-platform-verifier to 0.4 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman f4771dd390 Upgrade ring to 0.17 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman 479df2a61d Upgrade memmap2 to 0.9 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman 462262092a Upgrade git2 to 0.19 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman 67e01c1506 Upgrade gethostname to 0.5 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman 41d39c9816 Upgrade fancy-regex to 0.14 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman 0b60e3900f Upgrade chrono-tz to 0.10 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman 1620e6038d Upgrade semver-compatible dependencies 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman 18db31f204 Manage all external dependencies at the workspace level 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman 3b820b6971 Alphabetize workspace dependencies 2024-11-13 13:50:27 -07:00
Mike Hillyer 25bace1f30 Update custom.html
Bye Bot
2024-11-13 13:15:31 -05:00
Mike Hillyer 6ea55a8709 Add pattern matching rollups to the changelog. 2024-11-13 10:42:48 -05:00
Wez Furlong 4686962a72 ci: try cleaning up the build cache when we push a new builder image 2024-11-12 13:44:55 -07:00
Wez Furlong 971612a7d2 docs: add section about memory management 2024-11-12 13:30:10 -07:00
Wez Furlong 7560dd66cc fix tagging stable docker image as latest 2024-11-12 12:48:33 -07:00
Wez Furlong e06a4a9049 docs: rotate changelog for 2024.11.08-d383b033 2024-11-12 12:28:40 -07:00
Wez Furlong cf911c4067 docs: update dev -> 2024.11.08-d383b033 2024-11-12 12:25:53 -07:00
Wez Furlong d383b033cf docs: add a refman section for template syntax 2024-11-08 10:37:08 -07:00
Mike Hillyer 00ccd5d69c Update the add_authentication_results page to show SPF as well as DKIM. 2024-11-08 11:11:28 -05:00
Wez Furlong 8946447785 add missing duration string handling for remember_broken_tls 2024-11-08 07:42:19 -07:00
Wez Furlong d3e399cfda docs: describe the configuration monitoring and epoch system 2024-11-08 07:14:03 -07:00
Wez Furlong d33aa15c40 docs: add note about the null queue not actually being a queue 2024-11-08 05:32:37 -07:00
Wez Furlong f74f0a7556 add ehlo_domain to the set of predefined connection metadata values 2024-11-08 05:27:02 -07:00
Wez Furlong ea53531bc6 rocks: purge memtables when memory is low, export metrics
Export the memory statistics for each spool database to prometheus for
charting and tracking.

Allow the hosting application to request a cache purge and set up a
monitor task to do that when memory usage is too high.  That step will
print the memory that it reclaimed when it kicks in.
2024-11-07 16:29:11 -07:00
Wez Furlong a510e0d90c fix kcli double counting the ready queue size 2024-11-07 16:29:11 -07:00
Mike Hillyer 6f154f6f3c Add information on trace-smtp-client to the kcli page of the User Guide. 2024-11-07 16:29:16 -05:00
Nathalie Caiandncai daa35954fa change orange.fr to provider.orange in shaping.toml (#312)
* change orange.fr to provider.orange in shaping.toml

Co-authored-by: ncai <ncai@chapsvision.com>
2024-11-07 09:25:52 -07:00
Wez Furlong b31f24a5fd explicitly launch lruttl monitor
having it tied to a global initializer is prone to initialization
order issues, let's just make it explicitly a part of kumod's
startup sequence.
2024-11-07 09:03:54 -07:00
Wez Furlong 88dd509d87 try to avoid a startup race with headroom on the CI systems
I noticed that some end to end tests are load shedding, and I think
it is because we initialize headroom to 0 and are racing with
the memory monitor thread startup.

Let's default to non-zero instead.

I think this is manifesting in CI because it has noisy neighbors
on the VM hosts.
2024-11-07 08:42:02 -07:00
Wez Furlong d12bda6ee6 docs: changelog for SPF
closes: #83
2024-11-07 08:27:13 -07:00
Wez Furlong 721b6581bc dns-resolver: minor simplification
refs: https://github.com/KumoCorp/kumomta/pull/306
2024-11-07 08:03:29 -07:00
Dirkjan Ochtman a8d08f1238 test: add basic integration test for SPF 2024-11-07 07:52:37 -07:00
Dirkjan Ochtman 51d71e0c27 tests: allow KumoDaemon::smtp_client() callers to pass in a host 2024-11-07 07:52:37 -07:00
Dirkjan Ochtman fdcdad47d3 mod-dns-resolver: wire up test resolver setup 2024-11-07 07:52:37 -07:00
Dirkjan Ochtman 55dcf3e6f9 kumod: add basic SPF Lua API 2024-11-07 07:52:37 -07:00
Dirkjan Ochtman 603fd50ec5 dns-resolver: improve TestResolver logic 2024-11-07 07:52:37 -07:00
Dirkjan Ochtman 5afdffd1f3 spf: improve handling for initial processing 2024-11-07 07:52:37 -07:00
Dirkjan Ochtman 5c5a5ad123 spf: impl Serialize for SpfDisposition 2024-11-07 07:52:37 -07:00
Wez Furlong 7a9a33f836 apply cache-purge-on-low-mem to all LruCaches 2024-11-06 20:50:30 -07:00
Wez Furlong 1241846bf9 purge mod-memoize caches when memory is low
I realized that we hadn't connected this up to the memory monitor,
so this commit does that.

I'd like to hook this up for every LruCacheWithTtl, but that
requires some more extensive changes.

I'll look that in a follow up commit.
2024-11-06 17:31:29 -07:00
Mike Hillyer 8bdfa734e9 Should not have made a page in the refman. 2024-11-05 17:39:16 -05:00
Mike Hillyer 1c8e3e413e Add a page for overall_max_message_rate to the reference manual. 2024-11-05 17:26:48 -05:00
Mike Hillyer 77429c9e32 Add queue throttling to the queues page. 2024-11-05 17:21:35 -05:00
Wez Furlong fbed08567f add remember_broken_tls option
This provides a simpler and easier to use option for dealing with broken
TLS.

The back story here is that sites with broken TLS ideally should result
in a TLS failure and return us to a clear text SMTP session that we
could use for the remainder if we are in opportunistic mode.

In practice, it's not that simple:

* The rustls implementation provides into_fallible() to enable this mode
  of operation, but certain handshake errors result in the session being
  unusable once the failed handshake has been communicated
* Openssl is perfectly capable of operating this way, but the Rust
  ecosystem bindings do not expose the handshake failure in a way that
  allows the clear text session to continue

If we wanted to allow the session to communicate with the failed host in
clear text we will need to make a new separate connection for this case.

There is a concern that this will bump a connection counter in a
reputation system implemented on the destination host, but it is
reasonable to wonder if a site that has broken TLS would be sufficiently
sophisticated to employ such a system.

If we did want to allow making a new connection to the same host, it is
a bit awkward to fit into our current mx host connection plan system.

So, with all that in mind, this commit tries a slightly different
approach:

* A new `remember_broken_tls = "3 days"` field in the egress path config
  will enable an in-process cache to keep track of the site_names that
  advertise STARTTLS and for which we failed to handshake, or failed to
  re-EHLO after a handshake.

* That will cause the connection plan to move on to subsequent hosts, if
  any.  It won't cause us to re-attempt the current host.

* Subsequent connection attempts (which may be immediate if there are
  additional hosts in the current session plan) will consult the
  broken tls cache for the site, and use that to decide on the
  availability of TLS

* If we previously encountered broken TLS, we will effectively treat
  the site as not advertising TLS in EHLO, but will generate an
  appropriate error message if TLS is Required.

Since we track the breakage in a cache with per-item TTLs, you
can set the duration as appropriate to your situation.

The cache will be cleared when the process is restarted.

There is no sharing of the cache between nodes.

This is a much lower complexity solution than the existing workaround
using TSA automation rules to override the site with Disabled TLS, and
will help to minimize the number of rules for that purpose in the TSA
daemon.

Note that this commit doesn't change any behavior; we can do a followup
commit to replace those TSA rules with this mechanism.
2024-10-31 13:11:49 -07:00
Mike Hillyer eab7955b7a Whoops, all validate mentions. 2024-10-31 12:58:13 -04:00
Wez Furlong 9f78a299ac Revert "ci: avoid deprecated syntax"
This reverts commit 401df30099.

The docker merge step is failing:

```
envconfig.Process: assigning PULLREQUEST_DRONE_PULL_REQUEST to Number: converting '' to type int. details: strconv.ParseInt: parsing "": invalid syntax
```

It seems that the compatibility change in
https://github.com/woodpecker-ci/woodpecker/pull/3939 isn't sufficient.

Let's see if we can still run with the environment set manually,
or if we'll need to blackjack our own woodpecker plugin for this.
2024-10-31 09:53:25 -07:00
Wez Furlong e997cb4856 Improve handling of errors in get_queue_config
If you have a get_queue_config event handler that raises an error, it
will propagate back to the injector as a transient error, which is the
desired behavior.

However, we didn't ensure that the message was removed from the spool in
that situation, which could lead to duplicate sends of the same logical
message.

This commit makes things more robust in the context of this kind of
local configuration issue:

* QueueManager::insert_or_unwind is now the preferred way to handle
  insertion of the message into the queue during reception at the point
  of ingress.  It will take care to remove the message from the spool
  and to adjust the accounting by logging a Bounce record to complement
  the Reception that it assumes that its caller has just logged for the
  message.

* Both SMTP and HTTP listeners have been updated to use
  insert_or_unwind.

* Spool enumeration has been updated to count failed inserts and to
  summarize that the failure is serious and that the messages are not
  going to go anywhere until the configuration issue is addressed and
  the server is restarted.  Note that we cannot recover from this while
  the server is online because we have to perform a full spool
  enumeration in order to re-discover those messages.  (We could
  potentially build a thing to remember the complete list of messages,
  but I'd rather not try to address what is essentially a configuration
  deployment validation problem with engineering on this end of things.)
2024-10-31 09:28:38 -07:00