Files
jcoffey-dev b6f664a8d7
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Failing after 1m26s
Directory recipient misses are logged at info level (#364)
On a domain with an LDAP or SQL directory, the RCPT check asks only the
directory, and an address it has no answer for is refused with 550 5.1.2.
At the default log level nothing said why: the LDAP backend's "Mailbox
filter yielded no results" is debug level, an SQL miss logs nothing, and
an answer for a domain the directory doesn't serve (DIR-6) was dropped
without a word.

A new event, smtp.directory-no-answer (id 661, info level, also in the
packaged schema), now precedes such a refusal. Reason says why: the
directory found no entry (Details holds the LDAP mailbox filter as it ran
for the address, or the SQL recipient query), or it answered with an
account or group on a domain it doesn't serve (Details holds the address
it answered with). It carries the recipient, its domain and the session.

It is raised only when the address ends up refused: a mailing list,
catch-all or relay domain that still takes the address logs nothing, so
mailing lists on directory domains don't fill the log. Sign-in lookups
are untouched.

Test: per_domain_directory_tests checks the no-entry case with its query,
the DIR-6 case through a directory that looks recipients up by alias,
and that an accepted address raises nothing.

Fixes #364
2026-11-10 17:12:40 -07:00
..