Reports: take report-address mail on our domains without an account #379

Merged
jcoffey-dev merged 1 commits from feat/report-address-no-mailbox into main 2026-11-11 19:28:45 +00:00
Owner

DMARC and TLS reports go to postmaster@ (the default report address, postmaster@*) on every domain. RCPT refused them on any domain where no account had that address, so the report was never read and the sender saw a bounce.

Now an unauthenticated RCPT to a report address on one of our domains is taken even with no account behind it. DATA reads any report in the message as usual and then drops the address, also when report forwarding is on (there is no one to forward to). A message that is not a report and has no other recipient is refused at DATA with the same 550 5.1.2 Mailbox does not exist. RCPT gave before. Signed-in senders and non-report addresses are unchanged.

One trade-off: a non-report message to postmaster@<domain> and a real recipient is delivered to the real recipient and the postmaster address is dropped, where RCPT used to refuse that address alone.

Tests: new smtp::reporting::analyze::report_to_address_without_account (non-report address still 550 at RCPT; a DMARC report to postmaster@ on a local domain with no account is stored and nothing is queued, with forwarding on; a plain message to it gets 550 at DATA). smtp::inbound:: and smtp::reporting:: pass locally (33 passed). Fork checks and rustfmt clean.

Reported by khashmeshab in https://community.coffeylabs.org/t/232/12.

Fixes #373

DMARC and TLS reports go to `postmaster@` (the default report address, `postmaster@*`) on every domain. RCPT refused them on any domain where no account had that address, so the report was never read and the sender saw a bounce. Now an unauthenticated RCPT to a report address on one of our domains is taken even with no account behind it. DATA reads any report in the message as usual and then drops the address, also when report forwarding is on (there is no one to forward to). A message that is not a report and has no other recipient is refused at DATA with the same `550 5.1.2 Mailbox does not exist.` RCPT gave before. Signed-in senders and non-report addresses are unchanged. One trade-off: a non-report message to `postmaster@<domain>` *and* a real recipient is delivered to the real recipient and the postmaster address is dropped, where RCPT used to refuse that address alone. Tests: new `smtp::reporting::analyze::report_to_address_without_account` (non-report address still 550 at RCPT; a DMARC report to postmaster@ on a local domain with no account is stored and nothing is queued, with forwarding on; a plain message to it gets 550 at DATA). `smtp::inbound::` and `smtp::reporting::` pass locally (33 passed). Fork checks and rustfmt clean. Reported by khashmeshab in https://community.coffeylabs.org/t/232/12. Fixes #373
jcoffey-dev added 1 commit 2026-11-11 19:15:33 +00:00
Reports: take report-address mail on our domains without an account
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 12m46s
dbfe3c2711
DMARC and TLS reports go to postmaster@ (the default report address) on every domain, and RCPT refused them on any domain where no account had that address, before the report could be read. An unauthenticated RCPT to a report address on one of our domains is now taken even with no account behind it. DATA reads any report in the message and then drops the address; a message that isn't a report and has no other recipient is refused there with the same 550 5.1.2 RCPT would have given.

Fixes #373
jcoffey-dev merged commit 3aa5a5ee8e into main 2026-11-11 19:28:45 +00:00
jcoffey-dev deleted branch feat/report-address-no-mailbox 2026-11-11 19:28:45 +00:00
Sign in to join this conversation.