mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 12:24:38 +03:00
more helpful error message when the queue tries to deliver a message but the remote host is not listed in the mta-sts policy
based on questions on irc by Nemain where this better error message would probably have made the problem easier to find and fix.
This commit is contained in:
@ -96,6 +96,19 @@ type STSMX struct {
|
||||
Domain dns.Domain
|
||||
}
|
||||
|
||||
// LogString returns a loggable string representing the host, with both unicode
|
||||
// and ascii version for IDNA domains.
|
||||
func (s STSMX) LogString() string {
|
||||
pre := ""
|
||||
if s.Wildcard {
|
||||
pre = "*."
|
||||
}
|
||||
if s.Domain.Unicode == "" {
|
||||
return pre + s.Domain.ASCII
|
||||
}
|
||||
return pre + s.Domain.Unicode + "/" + pre + s.Domain.ASCII
|
||||
}
|
||||
|
||||
// Policy is an MTA-STS policy as served at "https://mta-sts.<domain>/.well-known/mta-sts.txt".
|
||||
type Policy struct {
|
||||
Version string // "STSv1"
|
||||
|
Reference in New Issue
Block a user