Commit Graph
414 Commits
Author SHA1 Message Date
Dirkjan Ochtman 7cedd7c11e Use new rustls PEM API 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman 96034a91b9 Upgrade testcontainers-modules to 0.11 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman fe38e15532 Upgrade redis to 0.27 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman 8e0d68d3f5 Upgrade bitstring to 0.2 and cidr to 0.3 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman 3688ba79d3 Upgrade async-channel to 2 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman 2d0bc811e9 Upgrade axum-streams to 0.19 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman cd3c048aaf Upgrade map_vec to 0.6 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman bddcc2787d Upgrade notify to 7 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman 921828797b Upgrade tower-http to 0.6 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman ac041c930f Upgrade which to 7 2024-11-13 13:50:27 -07:00
Dirkjan Ochtman 16c73dfff8 Drop direct tungstenite dependency in favor of tokio-tungstenite 2024-11-13 13:50:27 -07:00
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
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
Dirkjan Ochtman 55dcf3e6f9 kumod: add basic SPF Lua API 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
Wez Furlong 1b8e8a8a54 employ a cache around the rustls client config
Since loading the system certificate store can be expensive,
we want to avoid doing it in a hot code path.

This commit introduces a small lru cache based on the relevant
fields of TlsOptions to cache the built client configuration
objects.

In the common case with the default settings, there will just
be a single cached config object that is shared by all sessions.
2024-10-21 08:15:29 -07:00
Wez Furlong da2ddb2ccc switch smtp client from webpki-roots to rustls-platform-verifier
We had some feedback that it would be nice to be able to influence
the set of ca-certs allowed by the client, which isn't possible
when using the hard-coded list in webpki-roots.

This commit is a fairly dumb application of the example shown
in the readme for rustls-platform-verifier.
2024-10-21 07:57:43 -07:00
Dirkjan Ochtman 197b73330b dkim: migrate to dns-resolver Resolver trait 2024-10-17 09:46:59 -07:00
Dirkjan Ochtman a96802fcc0 spf: migrate to dns-resolver Resolver trait 2024-10-17 09:46:59 -07:00
Dirkjan Ochtman 967e20ba24 Move ptr_host() and IpDisplay into dns-resolver 2024-10-17 09:46:59 -07:00
Dirkjan Ochtman 3ba1ce03be dns-resolver: use specific error for resolution failures 2024-10-17 09:46:59 -07:00
Dirkjan Ochtman a28721f5ee dns-resolver: replace Resolver enum with a trait 2024-10-15 08:54:24 -07:00
Dirkjan Ochtman be09a845d1 spf: reintroduce CheckHostParams 2024-10-15 06:04:53 -07:00
Dirkjan Ochtman b23fb71e51 spf: remove unused dependency 2024-10-12 08:00:15 -07:00
Dirkjan Ochtman 451a7b64e5 spf: add basic test 2024-10-12 08:00:15 -07:00
Wez Furlong 575a4f6fd5 spf: flesh out SPF some more 2024-10-12 08:00:15 -07:00
Wez Furlong e0db00188f start building an spf crate
refs: https://github.com/KumoCorp/kumomta/issues/83
2024-10-12 08:00:15 -07:00
Wez Furlong 4bf7e76d63 spool: pass in start time from prior to starting listeners
There's a small window of opportunity to race on startup,
so this commit closes that.
2024-10-09 11:00:34 -07:00
Dirkjan Ochtman bf896f5365 Replace once_cell with LazyLock/OnceLock 2024-09-24 06:31:21 -07:00
Dirkjan Ochtman 4df3bfd471 Replace lazy-static with LazyLock 2024-09-24 06:31:21 -07:00
Dirkjan Ochtman 40bbee6880 throttle: migrate from once_cell to std types 2024-09-23 14:11:56 -07:00
Wez Furlong 6574129c9f ci: add bounce validation workflow 2024-09-18 12:41:02 -07:00
Wez Furlong 12b3ae51ac fix TSA SuspendTenant rules always set duration to 5 minutes 2024-09-18 09:37:31 -07:00
Wez Furlong 296bf47b8b cargo update
Hoping that this might have the side effect of resolving the
build issue of aws-lc on amazonlinux 2 in CI
2024-09-16 18:44:31 -07:00
Wez Furlong 0d2c9d1ee5 deps: amqprs -> 2.0
I was going to run cargo update, but was blocked because amqprs 1.7
got yanked (https://github.com/gftea/amqprs/issues/143) and re-released
as 2.0.
2024-09-16 18:43:09 -07:00
Wez Furlong ab12b9bc6a metrics: add provider rollups
Introduces the following new metrics:

* total_messages_(delivered|fail|transfail)_by_provider
  (labels: provider) - gives aggregates for a given provider/site.
* total_messages_(delivered|fail|transfail)_by_provider_and_source
  (labels: provider, source, pool) - gives aggregates for a given source
  to a specific provider/site.

These queued_count metrics sum the scheduled and ready queue counter
based on the provider, and provider_and_pool:

* queued_count_by_provider
  (labels: provider)
* queued_count_by_provider_and_pool
  (labels: provider, prool)

The provider label in this context is taken from the provider_name that
is set on the associated queue, or if none is set, the site name without
any source or protocol decoration.  This way it is relatively easy to
see at a glance the total queued volume for a given provider/site,
and also to see that broken down by the source *pool*.

And connection counts in a similar veing to the queued_counts:

* connection_count_by_provider
  (labels: provider) - number of connections currently established to
  a provider
* connection_count_by_provider_and_pool
  (labels: provider, pool) - number of connections currently established
  from a pool to a provider.

A new `kcli provider-summary` command shows a provider-centric view of
the queues, using these provider and pool based rollups.

refs: https://github.com/KumoCorp/kumomta/issues/274
2024-09-13 08:52:54 -07:00
Wez Furlong 44f5e7f3c3 shaping: add serde-path-to-error to marginally improve error messages 2024-09-10 07:57:16 -07:00
Wez Furlong 0ba7ef66fb cargo update 2024-09-09 14:13:58 -07:00