Commit Graph

28 Commits

Author SHA1 Message Date
Wez Furlong 37236c40b1 docs: update for the 2026.04.09-ea3b2a9b release 2026-04-29 08:07:13 +01:00
Wez Furlong 654f9b88f5 new: ip_lookup_strategy option in make_egress_path
This provides control over IPv4 and IPv6 lookups based on the source
and/or destination.
2026-03-04 16:33:32 +00:00
Wez Furlong b551d6b4c7 docs: update for release 2025.12.02-67ee9e96 2025-12-02 11:11:05 +00:00
Wez Furlong b73d81b0fc dns: utilities and plumbing for querying DNSBLs
This commit does some plumbing work to allow defining alternative
resolvers with different names that can be used to query different
upstream DNS servers.

This is most useful when implement DNSBLs where you might have a custom
DNS server configured with one or more RBL zones that is reserved purely
for RBL lookups.

The plumbing introduces a more regular syntax for defining one of the
various implementations of the Resolver trait, as well as a new
Aggregate resolver impl that can query across multiple Resolvers until a
query is satisfied.

This allows some interesting and powerful configurations, such as
loading a static zone file into memory to query it directly, and/or
blending that together with querying either the system or some other
upstream DNS server as a fallback.

The various lookup functions (except for MX!) have been updated to
accept an optional alternate resolver name, so that they work together
with the above.

A new rbl_lookup function is also provided as a convenience for querying
the most common form of RBLS.

ptr_host and reverse_ip are two string utility functions that are likely
not going to be widely used, but are very convenient to have when you
do have a usecase that requires it!

closes: https://github.com/KumoCorp/kumomta/issues/269
2025-10-10 18:45:52 +01:00
Wez Furlong 981de67f1c docs: update for 2025.10.06-5ec871ab release 2025-10-07 07:38:10 +01:00
Wez Furlong 5a3c942675 docs: update for #390 2025-07-22 09:08:18 +01:00
kayozaki a7315633de add kumo.dns.lookup_ptr (#390)
* add lookup_ptr

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-07-22 08:45:27 +01: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 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
Wez Furlong c3dff7e2c8 docs: update for latest release 2025-05-06 18:24:15 -07:00
Wez Furlong eda083f083 dns-resolver: use thundering herd protection and add semaphore
This commit does two things:

* Migrate the limit of 128 concurrent lookups from the shaping code
  and into the general mx lookup code
* Adjust the mx lookup implementation to run inside the cache
  getter, which applies thundering herd protection to the lookup.

These together will constrain the amount of queries being sent
to the upstream dns resolver and reduce the chances of it being
overwhelmed, especially if we are doing duplicate queries from
multiple concurrent contexts simultaneously.
2025-04-06 08:45:49 -07:00
Wez Furlong ee52558f67 docs: format example in configure_resolver.md 2025-03-28 14:35:16 -07:00
Wez Furlong 9d84a04d48 docs: note about hickory resolveropts schema change 2025-03-25 12:54:33 -07:00
Wez Furlong 337b4e33a8 docs: update for stable 2025.03.19-1d3f1f67 release 2025-03-20 07:28:32 -07:00
Wez Furlong 9ba637ab38 dns-resolver: add negative caching for MX lookup failures
This is why slow DNS often expanded to 3-4x as long as the expected
timeout value; we make a handful of calls in succession, assuming
that the cache was effective in an earlier stage.

We now cache errors for 5 minutes by default, and it can be configured
as desired.

refs: https://github.com/KumoCorp/kumomta/issues/325
2025-02-27 15:55:37 -07:00
Wez Furlong f363445ceb add kumo.dns.set_mx_timeout and make it default to 5s
closes: https://github.com/KumoCorp/kumomta/issues/325
2025-02-27 05:54:26 -07:00
Wez Furlong cd2fea5d99 docs: fix typo on configure_unbound_resolver page 2025-01-08 15:55:04 -07:00
Wez Furlong 70472aadc4 docs: fixup link to hickory resolver options 2024-09-18 16:37:43 -07:00
Wez Furlong a42871cb11 docs: update since dev -> 2024.09.02-c5476b89 2024-09-02 07:27:50 -07:00
Wez Furlong ecefc35342 kumo.dns: add lookup_txt 2024-08-08 15:16:19 -07:00
Wez Furlong 73b8b5b4e0 docs: add missing page for configure_unbound_resolver 2024-07-09 13:42:01 -07:00
ncai 8954052013 add is_mx to determine if the hosts are mx records 2024-01-16 11:40:20 -07:00
Wez Furlong 24909f4cde docs: update for 2023.08.22-4d895015 release 2023-08-25 08:38:09 -07:00
Wez Furlong 4d89501564 update trust-dns-resolver to 0.23
With the mail-auth dep removed, we can now update this dep.
2023-08-22 17:40:14 -07:00
Wez Furlong 74f3ebd26e allow configuring DNS resolver parameters 2023-08-22 11:32:23 -07:00
Wez Furlong e042e81de9 kumo.dns: add lookup_addr function
Resolves a hostname to its v4 and v6 addresses and returns them.

Fixes up a typo in the docs for lookup_mx that incorrectly
showed it as resolve_mx.
2023-08-11 16:51:54 -07:00
Wez Furlong dade11ef22 dns: make it easy to detect and react to domain literals in lua
Add an is_domain_literal field to the resolve of kumo.dns.lookup_mx
2023-05-05 10:57:40 -07:00
Wez Furlong b43e88985c add kumo.dns.lookup_mx
This function returns MX information, including the computed site_name.
Update the queue example to show how to use it to populate the SITE_OF
map used in that example.

This commit switches to using the `Name` type under the covers to ensure
that we use canonical names for our cache keys.
2023-03-15 09:34:23 -07:00