mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 17:44:35 +03:00
for domains configured only for reporting, don't reject messages to that domain during smtp submission
you can configure a domain only to accept dmarc/tls reports. those domains won't have addresses for that domain configured (the reporting destination address is for another domain). we already handled such domains specially in a few places. but we were considering ourselves authoritative for such domains if an smtp client would send a message to the domain during submit. and we would reject all recipient addresses. but we should be trying to deliver those messages to the actual mx hosts for the domain, which we will now do.
This commit is contained in:
@ -54,7 +54,9 @@ func FindAccount(localpart smtp.Localpart, domain dns.Domain, allowPostmaster bo
|
||||
}
|
||||
|
||||
d, ok := Conf.Domain(domain)
|
||||
if !ok {
|
||||
if !ok || d.ReportsOnly {
|
||||
// For ReportsOnly, we also return ErrDomainNotFound, so this domain isn't
|
||||
// considered local/authoritative during delivery.
|
||||
return "", "", config.Destination{}, ErrDomainNotFound
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user