mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 09:54:40 +03:00
when sending tls reports, ensure we use ASCII A-labels, not U-labels in the policy-domain field
This commit is contained in:
@ -441,11 +441,15 @@ func sendReportDomain(ctx context.Context, log mlog.Log, resolver dns.Resolver,
|
||||
if slices.Equal(rcptDomAddresses[tlsResult.RecipientDomain], recipientStrs) {
|
||||
continue
|
||||
}
|
||||
rcptDom, err := dns.ParseDomain(tlsResult.RecipientDomain)
|
||||
if err != nil {
|
||||
return true, fmt.Errorf("parsing recipient domain %q from result: %v", tlsResult.RecipientDomain, err)
|
||||
}
|
||||
for j, r := range tlsResult.Results {
|
||||
if tlsResult.IsHost {
|
||||
tlsResults[i].Results[j].Policy.MXHost = []string{r.Policy.Domain}
|
||||
}
|
||||
tlsResults[i].Results[j].Policy.Domain = tlsResult.RecipientDomain
|
||||
tlsResults[i].Results[j].Policy.Domain = rcptDom.ASCII
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user