Commit Graph
429 Commits
Author SHA1 Message Date
Wez Furlong d3ba5ccd2c connection_limit: implement using leases
To support distributed connection limits, adjust the way that
connection limits are handled.

Previously, we'd do a simple in-memory comparison with the limit to
guide whether we had reached the limit.

In a distributed/clustered scenario we need a shared understanding
of the state of the connections, so we're moving to a lease-based
model.

Each connection is associated with a UUID.
Each egress path maintains a set of connections and their UUIDs.

When attempting to make a new connection, we can only proceed if the
number of connections associated with an egress path is below the limit.

When a connection is closed, its UUID is removed from the associated
set.

To handle crashes, kills and netsplits, the path -> uuid association is
also accompanied by an expiration time beyond which it can be assumed
that the lease is no longer valid.  We compute that time based on the
worst case timeout value for a single message send on the given pathway.
Each time a connection is ready to obtain a new message, it will try
to extend its lease by that same duration.

This commit introduces these concepts and models them using an in-memory
store for the single node case, and using redis for the cluster case.
When your policy enables `kumo.configure_redis_throttles`, that same
redis configuration is used to back to the connection limiting
functionality.

refs: https://github.com/KumoCorp/kumomta/issues/41
2023-06-30 15:39:09 -07:00
Tom Mairs e45c82a3ec update Inject content example 2023-06-30 05:48:24 +00:00
Tom Mairs 861ed83a63 update MG example 2023-06-30 05:34:33 +00:00
Tom Mairs 2b617a8c65 fix typo 2023-06-30 05:20:35 +00:00
Wez Furlong f65e985e64 docs: add since macro. document connection metadata object 2023-06-28 13:52:15 -07:00
Mike Hillyer c083bc44f0 Update the changelog for the new release. 2023-06-23 09:46:58 -04:00
Wez Furlong 5d39928acf add docs for new bounce APIs
and briefly show how to use `kcli` with them
2023-06-22 12:59:36 -07:00
Mike Hillyer 0ac94e3092 Automated doc formatting fix 2023-06-22 18:35:23 +00:00
Mike Hillyer 13f1617f47 Added reference to the DKIM policy helper. 2023-06-22 14:34:20 -04:00
Mike Hillyer b4fe119fdc Automated doc formatting fix 2023-06-22 18:23:39 +00:00
Mike Hillyer 02ac065ae5 Update TOC 2023-06-22 14:16:04 -04:00
Wez Furlong 6ef093fbc7 docs: explain more about max_ready tradeoffs 2023-06-20 14:33:40 -07:00
Wez Furlong 192c051227 docs: note the default value for max_ready 2023-06-20 14:23:17 -07:00
Wez Furlong 020626360b docs: document enable_tls = 'Disabled' 2023-06-20 08:23:36 -07:00
Tom Mairs 0afd3aa8cf fix typo 2023-06-19 21:38:21 +00:00
Mike Hillyer 22b0c610d0 Updating domains docs. 2023-06-19 14:11:45 -04:00
Mike Hillyer d63d00b8ec Update documentation on configuring listener domains. 2023-06-19 14:11:43 -04:00
Wez Furlong d60c961479 increase lua pool limits, allow configuring it 2023-06-16 10:03:49 -07:00
Wez Furlong a2feac004f actually add ehlo_domain to make_egress_source
Enable that field and add it to the fallback used by the
smtp_dispatcher.  The ehlo_domain configured for the pathway
takes precedence, then we'll take the value from the source,
then fallback to the local hostname.

refs: https://github.com/KumoCorp/kumomta/issues/59
2023-06-16 08:43:54 -07:00
Wez Furlong 2992e42138 add received_from and received_via meta values
We don't set received_via for http because axum/hyper make it a
bit weird to access that information and it will require some
effort to figure out how to get that without breaking the
existing proxy-aware client IP determination.
2023-06-13 15:18:06 -07:00
Mike Hillyer e12bf25d60 Move the listener domain information to the right page. 2023-06-12 12:31:36 -04:00
Tom Mairs 756405d133 update dkim docs 2023-06-09 06:07:47 +00:00
Tom Mairs 130b419168 clean up files and add notes 2023-06-08 22:09:40 +00:00
Tom Mairs 6516f895e3 fix keygen details 2023-06-08 20:06:57 +00:00
Tom Mairs 13ab3593ec edit DKIM generation details 2023-06-08 16:06:48 +00:00
Mike Hillyer 2c5f87ad97 Updated changelog. 2023-06-01 17:26:57 -04:00
Mike Hillyer d99217a8d3 Automated doc formatting fix 2023-06-01 21:19:52 +00:00
Mike Hillyer 63af89ed47 Update example policy and sections on sending IPs and Listeners to use the new policy helpers. 2023-06-01 17:18:57 -04:00
Tom Mairs 092c972b42 requires sudo 2023-06-01 19:48:39 +00:00
Tom Mairs ba2661e70c fix case in docker command 2023-06-01 19:42:55 +00:00
Wez Furlong e8a049cc83 document listener parameter to get_listener_domain update helpers
Allow per-listener listener-domain configuration
2023-05-31 15:46:12 -07:00
Wez Furlong ce7dece927 move domains out of listener, replace with get_listener_domain event
This commit also includes a policy helper
`policy_extras.listener_domains` to make it convenient to define
listener domains in toml and/or json files.

To facilitate this, the DomainMap rust structure has been exposed
to lua code via the new `kumo.domain_map.new` function.
2023-05-31 12:29:44 -07:00
Wez Furlong b7c557c31a define_egress_(pool|source) -> make_egress_(pool|source)
Switch the configuration plumbing for pools and sources to be pull-based
rather than push based.

In other words, rather than defining them in the `init` event,
you now need to supply them to the new `get_egress_pool` and
`get_egress_source` events.

Data is cached by default for 1 minute. This allows for new sources
to come into being on-demand, and for data to age out and change
over time, without requiring that the server be restarted.

This commit updates the reference section, but there is some content
in the user guide that refers to the old style of configuration that
will need to be updated.

refs: https://github.com/KumoCorp/kumomta/issues/13
2023-05-30 14:08:07 -07:00
Mike Hillyer 38290015a6 Update changelog. 2023-05-30 14:23:08 -04:00
Wez Furlong 9b1d82275c add spool_message_enumerated event
closes: #42
2023-05-30 10:14:37 -07:00
Mike Hillyer 0eefbccd5d Typo fix. 2023-05-18 16:44:32 -04:00
Tom Mairs 10521350c7 fix typos 2023-05-18 05:05:12 +00:00
Mike Hillyer 1e05c7bb31 Automated doc formatting fix 2023-05-17 21:40:38 +00:00
Mike Hillyer 0d85aea133 Adding SMTP AUTH to the user guide. 2023-05-17 17:39:23 -04:00
Mike Hillyer 842c971811 Formatting fix. 2023-05-17 17:39:23 -04:00
Mike Hillyer 7cbf93e316 Automated doc formatting fix 2023-05-17 19:58:41 +00:00
Mike Hillyer c03cf00408 Initial build out of SOCKS5 docs in userguide, converting HAProxy section into general proxy section. 2023-05-17 15:57:22 -04:00
Mike Hillyer 9780e3f3a5 Updating logic per Wez. 2023-05-16 16:43:40 -04:00
Mike Hillyer cd7dbe7aec Automated doc formatting fix 2023-05-16 19:12:58 +00:00
Mike Hillyer bd1d7a1d03 This timne for sure. 2023-05-16 15:11:39 -04:00
Mike Hillyer f26551a205 Too many typos. 2023-05-16 15:10:17 -04:00
Mike Hillyer b741a1ab06 Typo 2023-05-16 15:06:38 -04:00
Mike Hillyer 297895e85d Adding AMQP to the User Guide. 2023-05-16 15:05:09 -04:00
Wez Furlong 9d3411431f Add outbound SMTP auth support
refs: https://github.com/KumoCorp/kumomta/issues/10
2023-05-15 17:38:17 -07:00
Wez Furlong db0c042cef Add amqp client
refs: https://github.com/KumoCorp/kumomta/issues/31
2023-05-15 17:24:15 -07:00