mirror of
https://github.com/mailscope/kumomta.git
synced 2026-08-23 20:58:18 +00:00
b73d81b0fc
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