Commit Graph

475 Commits

Author SHA1 Message Date
Wez Furlong 7d450fdb41 add kumo.cidr module and kumo.cidr.make_map 2023-08-10 17:21:20 -07:00
Wez Furlong 3fd76dd45a introduce routing_domain concept
Augments our queue name format to be
`campaign:tenant@domain!routing_domain`.

The routing_domain is optional.  If the routing_domain is not set, its
effective value is that of the recipient domain.

You can `msg:set_meta('routing_domain', 'bar.com')` to set the
routing_domain for a message, so if the original recipient was
`user@foo.com`, that would cause the computed queue name for it to be
`foo.com!bar.com`.

The routing_domain is used when deciding on the ready_queue name
and destination MXs, so continuing our example, instead of resolving
`foo.com` MX records we'd resolve `bar.com` and deliver to that site.

The `get_egress_path_config` event `domain` parameter is redefined to be
the effective `routing_domain`.

The `get_queue_config` event `domain` parameter is the regular recipient
domain. The `routing_domain` is not currently made available to
`get_queue_config`. If/when we expose it, it will likely be via a
queue name object instead of adding an additional parameter. That would
be a breaking change.

The consequence of not exposing this parameter is that per-message
routing scenarios for the same domain (but different routing domains)
cannot vary the scheduled queue parmeters (eg: retry intervals). Even
though they would have separate scheduled queue instances, those
instances would have the same scheduled queue parameters.  If you need
to be able to do that, then explicitly setting the domain portion of the
queue name would be a way to do that: `msg:set_meta('queue',
'foo.com-via-bar.com!bar.com')`.  `get_queue_config` would then be
called with `domain='foo.com-via-bar.com'` and your policy could then
respond accordingly.
2023-08-10 08:43:20 -07:00
Wez Furlong bcd2946c53 make_queue_config: now supports protocol.smtp.mx_list for smart hosting
Previously, you would do either:
  `msg:set_meta('queue', 'smart.host.domain')`
or
  `msg:set_meta('queue', '[10.0.0.1]')`

to override the effective domain for a message and cause it to be routed
to somewhere other than the recipient domain.

That was OK for basic smart hosting, but limiting when you wanted to use
multiple candidate hosts.

This commit expands the queue config `protocol` field to support
specifying an explicit list of MX hosts that should be used instead.

The integration tests have been migrated away from the old style to this
new style.

While adding plumbing for this, I uncovered an inconsistency between the
queue name generated for the ready queue and the name used by suspension
handling. The inconsistency was introduced in
0842a0fc8b and related work.  This commit
resolves it.
2023-08-09 23:04:45 -07:00
Mike Hillyer e5d840bb8a Typo fix. 2023-08-08 20:40:04 -04:00
Mike Hillyer 0a48d9cec9 Update custom.html 2023-08-08 17:09:22 -04:00
Mike Hillyer 5ea0cf3e94 One more round of fixes. 2023-08-08 16:40:33 -04:00
Mike Hillyer 6a476de3d6 Update TSA documentation from Wez's feedback. 2023-08-08 16:07:54 -04:00
Mike Hillyer 0bbb1c8ba9 Automated doc formatting fix 2023-08-08 18:52:22 +00:00
Mike Hillyer fece8edb28 Initial version of TSA documentation. 2023-08-08 14:44:53 -04:00
Mike Hillyer dac5d9f6fa Initial draft of Traffic Shaping Automation documentation. 2023-08-08 14:44:51 -04:00
Tom Mairs 3ced8144b7 add flow description page 2023-08-04 20:47:13 +00:00
Tom Mairs 3beb79f9f4 fix typo 2023-08-04 20:26:17 +00:00
Wez Furlong 67e3c49d83 docs: fix warnings in using_vault section 2023-08-04 11:12:13 -07:00
Wez Furlong 2890138d90 refine handling of suspend=true
and add docs
2023-08-04 11:05:08 -07:00
Wez Furlong b08c865bdb docs: include new tsa related info to the reference section 2023-08-04 11:05:08 -07:00
Cloud User a04f0d3e8d add a how_it_works tutorial 2023-08-03 19:18:55 +00:00
Cloud User c9a3a7a81c updates to using vault 2023-08-03 19:05:50 +00:00
Wez Furlong 01fee33205 docs: note about ready queue name change 2023-08-02 12:44:43 -07:00
Wez Furlong d344a82cb9 docs: note about the hashicorp vault fix 2023-08-02 12:42:30 -07:00
Wez Furlong 87e0578a33 logging: add nodeid to the log record 2023-07-31 16:57:14 -07:00
Mike Hillyer bd0f0aaa5f Fix HTTP send example. 2023-07-27 11:32:38 -04:00
Tom Mairs b8d49634f6 modify manual cargo run command 2023-07-25 20:55:04 +00:00
Tom Mairs f475e049c8 modify manual cargo run command 2023-07-25 20:40:56 +00:00
Tom Mairs d6749954a4 update for debian/ubuntu 2023-07-25 20:35:40 +00:00
Tom Mairs 4fb8e81b9d add Mariner to OS list 2023-07-24 21:39:51 +00:00
Tom Mairs 20cb81c818 update source install instructions 2023-07-24 21:34:15 +00:00
Tom Mairs 6d923c26ea remove sudo instruction 2023-07-24 17:38:27 +00:00
Tom Mairs 03e87122bf fix install instruction 2023-07-21 22:59:11 +00:00
Tom Mairs ec69706b41 fix blog link 2023-07-20 16:33:58 +00:00
Tom Mairs 622d128a46 fix image link 2023-07-20 16:26:03 +00:00
Tom Mairs 268e4ef167 Delete Performance testing kumomta_public.png 2023-07-20 10:25:12 -06:00
Tom Mairs f3d815f80e Add files via upload 2023-07-20 10:24:15 -06:00
Tom Mairs 2fce639dfa fix image link 2023-07-20 16:17:19 +00:00
Tom Mairs 2e8e655a51 fix image path 2023-07-20 16:10:00 +00:00
Tom Mairs 0c8fcc372a add perf testing image and verbiage 2023-07-20 06:16:29 +00:00
Tom Mairs 10078ee79e Add files via upload 2023-07-20 00:07:51 -06:00
Tom Mairs f80d4d06c4 remove ed25519 DKIM instructions 2023-07-17 22:08:23 +00:00
Tom Mairs 8f97665dd9 updating ed25519 commands 2023-07-13 21:53:06 +00:00
Tom Mairs 9a0855f11b update for name field in log_hook 2023-07-13 18:06:20 +00:00
Tom Mairs 2c0cfd358f update dkim info for ed25519 2023-07-13 06:35:56 +00:00
Mike Hillyer dfd1e14497 Add documentation for kcli to user guide. 2023-07-11 17:12:30 -04:00
Wez Furlong 54f2841abe docs: changelog for #70 2023-07-06 14:31:51 -07:00
M.L. Oelering effa1a6a16 Add doc for remove_all_named_headers 2023-07-06 14:29:59 -07:00
Wez Furlong dd32c8d453 docs: fix link 2023-07-03 08:49:53 -07:00
Wez Furlong 0c7978e341 breaking: configure_log_hook: add required name parameter
The name is passed through to should_enqueue_log_record as an additonal
parameter to make it possible to reason about whether a given record
should get queued for a specific log hook instance.

This is a breaking change, but it can be easily resolved by adding
the name parameter to the `configure_log_hook` call.
2023-07-03 08:45:58 -07:00
Wez Furlong 4298698377 docs: some updates for #41 2023-06-30 18:55:39 -07:00
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