When a domain has an LDAP or SQL directory, the RCPT check (rcpt_resolve, crates/common/src/network/mta.rs) asks only that directory. If it has no answer, the address is refused with 550 5.1.2 Mailbox does not exist. The operator gets no useful log line at the default level in two cases:
The mailbox filter finds nothing. The LDAP backend emits store.ldap-warning "Mailbox filter yielded no results" with the filter (crates/directory/src/backend/ldap/lookup.rs recipient), but StoreEvent::LdapWarning has no level of its own, so it falls to Level::Debug. At the default level the log shows only smtp.mailbox-does-not-exist, with no hint that the directory was asked or what filter ran.
The directory answers for a domain it doesn't serve (DIR-6).assert_directory_serves returns an error, and rcpt_resolve drops the answer in an empty match arm (Recipient::Account(..) if ...is_err() => {}, same for Group). Nothing is logged at all, so the 550 has no visible cause.
Reported on the forum (t/259): an Active Directory setup with aliases in an alias attribute that the mailbox filter didn't match. Every alias bounced, and nothing in the logs said why. The docs side is inbuxa.org #148.
Proposed:
Log the RCPT-time miss at Info (or Warn) with the address, the directory id and the filter, as its own event or by raising LdapWarning's level. Check whether login-time misses then get too noisy at that level.
Log the DIR-6 drop with the address, the account email the directory returned, and the directory id.
SQL directories: check whether a recipient miss there is equally silent, and give it the same treatment.
Acceptance: at the default log level, a 550 from a directory domain is preceded by a line saying the directory was asked and why it didn't answer (no match / answer for a domain it doesn't serve).
When a domain has an LDAP or SQL directory, the RCPT check (`rcpt_resolve`, crates/common/src/network/mta.rs) asks only that directory. If it has no answer, the address is refused with `550 5.1.2 Mailbox does not exist`. The operator gets no useful log line at the default level in two cases:
1. **The mailbox filter finds nothing.** The LDAP backend emits `store.ldap-warning` "Mailbox filter yielded no results" with the filter (crates/directory/src/backend/ldap/lookup.rs `recipient`), but `StoreEvent::LdapWarning` has no level of its own, so it falls to `Level::Debug`. At the default level the log shows only `smtp.mailbox-does-not-exist`, with no hint that the directory was asked or what filter ran.
2. **The directory answers for a domain it doesn't serve (DIR-6).** `assert_directory_serves` returns an error, and `rcpt_resolve` drops the answer in an empty match arm (`Recipient::Account(..) if ...is_err() => {}`, same for `Group`). Nothing is logged at all, so the 550 has no visible cause.
Reported on the forum (t/259): an Active Directory setup with aliases in an alias attribute that the mailbox filter didn't match. Every alias bounced, and nothing in the logs said why. The docs side is inbuxa.org #148.
**Proposed:**
- Log the RCPT-time miss at Info (or Warn) with the address, the directory id and the filter, as its own event or by raising `LdapWarning`'s level. Check whether login-time misses then get too noisy at that level.
- Log the DIR-6 drop with the address, the account email the directory returned, and the directory id.
- SQL directories: check whether a recipient miss there is equally silent, and give it the same treatment.
**Acceptance:** at the default log level, a 550 from a directory domain is preceded by a line saying the directory was asked and why it didn't answer (no match / answer for a domain it doesn't serve).
Fixed by #365 (merged, 1431002e), ships in the next 27.1 RC. A refused recipient on a directory domain is now preceded by an info-level smtp.directory-no-answer event: Reason says whether the directory found no entry (Details: the LDAP mailbox filter as it ran, or the SQL recipient query) or answered for a domain it doesn't serve (Details: the address it answered with). Logged only when the address ends up refused, so mailing lists and catch-alls on directory domains stay quiet. Docs side (mailbox filter must match the alias attribute and groups): inbuxa.org #148, deployed.
Fixed by #365 (merged, 1431002e), ships in the next 27.1 RC. A refused recipient on a directory domain is now preceded by an info-level `smtp.directory-no-answer` event: Reason says whether the directory found no entry (Details: the LDAP mailbox filter as it ran, or the SQL recipient query) or answered for a domain it doesn't serve (Details: the address it answered with). Logged only when the address ends up refused, so mailing lists and catch-alls on directory domains stay quiet. Docs side (mailbox filter must match the alias attribute and groups): inbuxa.org #148, deployed.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
When a domain has an LDAP or SQL directory, the RCPT check (
rcpt_resolve, crates/common/src/network/mta.rs) asks only that directory. If it has no answer, the address is refused with550 5.1.2 Mailbox does not exist. The operator gets no useful log line at the default level in two cases:store.ldap-warning"Mailbox filter yielded no results" with the filter (crates/directory/src/backend/ldap/lookup.rsrecipient), butStoreEvent::LdapWarninghas no level of its own, so it falls toLevel::Debug. At the default level the log shows onlysmtp.mailbox-does-not-exist, with no hint that the directory was asked or what filter ran.assert_directory_servesreturns an error, andrcpt_resolvedrops the answer in an empty match arm (Recipient::Account(..) if ...is_err() => {}, same forGroup). Nothing is logged at all, so the 550 has no visible cause.Reported on the forum (t/259): an Active Directory setup with aliases in an alias attribute that the mailbox filter didn't match. Every alias bounced, and nothing in the logs said why. The docs side is inbuxa.org #148.
Proposed:
LdapWarning's level. Check whether login-time misses then get too noisy at that level.Acceptance: at the default log level, a 550 from a directory domain is preceded by a line saying the directory was asked and why it didn't answer (no match / answer for a domain it doesn't serve).
Fixed by #365 (merged,
1431002e), ships in the next 27.1 RC. A refused recipient on a directory domain is now preceded by an info-levelsmtp.directory-no-answerevent: Reason says whether the directory found no entry (Details: the LDAP mailbox filter as it ran, or the SQL recipient query) or answered for a domain it doesn't serve (Details: the address it answered with). Logged only when the address ends up refused, so mailing lists and catch-alls on directory domains stay quiet. Docs side (mailbox filter must match the alias attribute and groups): inbuxa.org #148, deployed.