mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-28 20:56:03 +00:00
courier: Consider not finding any MX/A records a permanent error
Currently, if we can't find a mail server for a domain, we consider that a transient failure (semi-accidentally, as we iterate over the (empty) list of MXs and fall through the list). It should be treated as a permanent error, in line with other DNS issues (which is not ideal but seems to be generally accepted behaviour).
This commit is contained in:
@@ -72,7 +72,7 @@ func (s *SMTP) Deliver(from string, to string, data []byte) (error, bool) {
|
||||
a.stsPolicy = s.fetchSTSPolicy(a.tr, a.toDomain)
|
||||
|
||||
mxs, err := lookupMXs(a.tr, a.toDomain, a.stsPolicy)
|
||||
if err != nil {
|
||||
if err != nil || len(mxs) == 0 {
|
||||
// Note this is considered a permanent error.
|
||||
// This is in line with what other servers (Exim) do. However, the
|
||||
// downside is that temporary DNS issues can affect delivery, so we
|
||||
|
||||
Reference in New Issue
Block a user