Ask the DNS blocklists together #177

Merged
jcoffey-dev merged 1 commits from perf/dnsbl-concurrent into main 2026-10-08 22:31:18 +00:00
Owner

Backlog Tier 3. The spam filter asked each configured DNS blocklist one after the other (crates/spam-filter/src/modules/dnsbl.rs), so an inbound message waited for the sum of the lists' answer times at every element it checks (IP, domain, email, URL).

Now the zones are evaluated first (they only read the context), the lists not answered from the dns_rbl cache are queried together with join_all, capped by the remaining per-element budget (max_*_checks counts the queries actually sent, as before), and the tags are applied afterwards in list order, so the result is the same. The test-mode shortcut moved into its own function. spam-filter gains the futures dependency (already in the tree; Cargo.lock updated).

Also silences the unused-variable warning on SearchStore::unsigned_values in builds without an SQL feature (from #172).

Test: smtp::inbound::antispam passes on PostgreSQL.

Backlog Tier 3. The spam filter asked each configured DNS blocklist one after the other (crates/spam-filter/src/modules/dnsbl.rs), so an inbound message waited for the sum of the lists' answer times at every element it checks (IP, domain, email, URL). Now the zones are evaluated first (they only read the context), the lists not answered from the dns_rbl cache are queried together with join_all, capped by the remaining per-element budget (max_*_checks counts the queries actually sent, as before), and the tags are applied afterwards in list order, so the result is the same. The test-mode shortcut moved into its own function. spam-filter gains the futures dependency (already in the tree; Cargo.lock updated). Also silences the unused-variable warning on SearchStore::unsigned_values in builds without an SQL feature (from #172). Test: smtp::inbound::antispam passes on PostgreSQL.
jcoffey-dev added 1 commit 2026-10-08 21:41:17 +00:00
Ask the DNS blocklists together
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 7m46s
6385db433f
The spam filter asked each configured list one after the other, so a
message waited for the sum of their answer times. The zones are built
first, the lists not answered from the cache are asked together, up to
the remaining budget for the element, and the tags are applied in list
order as before.
jcoffey-dev merged commit 080467399b into main 2026-10-08 22:31:18 +00:00
jcoffey-dev deleted branch perf/dnsbl-concurrent 2026-10-08 22:31:18 +00:00
Sign in to join this conversation.