mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 18:24:35 +03:00
do not lookup cname after looking up the txt for mta-sts, and follow cnames for mocks
because the txt would already follow cnames. the additional cname lookup didn't hurt, it just didn't do anything. i probably didn't realize that before looking deeper into dns.
This commit is contained in:
@ -325,7 +325,6 @@ type MTASTSRecord struct {
|
||||
mtasts.Record
|
||||
}
|
||||
type MTASTSCheckResult struct {
|
||||
CNAMEs []string
|
||||
TXT string
|
||||
Record *MTASTSRecord
|
||||
PolicyText string
|
||||
@ -1180,15 +1179,10 @@ Ensure a DNS TXT record like the following exists:
|
||||
defer logPanic(ctx)
|
||||
defer wg.Done()
|
||||
|
||||
record, txt, cnames, err := mtasts.LookupRecord(ctx, resolver, domain)
|
||||
record, txt, err := mtasts.LookupRecord(ctx, resolver, domain)
|
||||
if err != nil {
|
||||
addf(&r.MTASTS.Errors, "Looking up MTA-STS record: %s", err)
|
||||
}
|
||||
if cnames != nil {
|
||||
r.MTASTS.CNAMEs = cnames
|
||||
} else {
|
||||
r.MTASTS.CNAMEs = []string{}
|
||||
}
|
||||
r.MTASTS.TXT = txt
|
||||
if record != nil {
|
||||
r.MTASTS.Record = &MTASTSRecord{*record}
|
||||
|
@ -951,8 +951,7 @@ const domainDNSCheck = async (d) => {
|
||||
const detailsTLSRPT = !checks.TLSRPT.TXT ? [] : [
|
||||
dom.div('TXT record: ' + checks.TLSRPT.TXT),
|
||||
]
|
||||
const detailsMTASTS = empty(checks.MTASTS.CNAMEs) && !checks.MTASTS.TXT && !checks.MTASTS.PolicyText ? [] : [
|
||||
dom.div('CNAMEs followed: ' + (checks.MTASTS.CNAMEs.join(', ') || '(none)')),
|
||||
const detailsMTASTS = !checks.MTASTS.TXT && !checks.MTASTS.PolicyText ? [] : [
|
||||
!checks.MTASTS.TXT ? [] : dom.div('MTA-STS record: ' + checks.MTASTS.TXT),
|
||||
!checks.MTASTS.PolicyText ? [] : dom.div('MTA-STS policy: ', dom('pre.literal', style({maxWidth: '60em'}), checks.MTASTS.PolicyText)),
|
||||
]
|
||||
|
@ -1626,14 +1626,6 @@
|
||||
"Name": "MTASTSCheckResult",
|
||||
"Docs": "",
|
||||
"Fields": [
|
||||
{
|
||||
"Name": "CNAMEs",
|
||||
"Docs": "",
|
||||
"Typewords": [
|
||||
"[]",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "TXT",
|
||||
"Docs": "",
|
||||
|
Reference in New Issue
Block a user