mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 16:33:47 +03:00
during dnscheck, if srv accountconfig record with just a dot, for a non-existent service, is missing, show as warning instead of error
the suggested dns records mention that these records are optional, but the dnscheck makes it look serious. not helpful. also remove unneeded whitespace in list of errors/warnings. for issue #184 by morki, thanks for reporting!
This commit is contained in:
parent
beee03574a
commit
e350af7eed
3 changed files with 9 additions and 5 deletions
|
@ -1404,7 +1404,11 @@ When enabling MTA-STS, or updating a policy, always update the policy first (thr
|
|||
if err != nil {
|
||||
addf(&r.SRVConf.Errors, "Looking up SRV record %q: %s", name, err)
|
||||
} else if len(req.srvs) == 0 {
|
||||
if req.host == "." {
|
||||
addf(&r.SRVConf.Warnings, "Missing optional SRV record %q", name)
|
||||
} else {
|
||||
addf(&r.SRVConf.Errors, "Missing SRV record %q", name)
|
||||
}
|
||||
} else if len(req.srvs) != 1 || req.srvs[0].Target != req.host || req.srvs[0].Port != req.port {
|
||||
addf(&r.SRVConf.Errors, "Unexpected SRV record(s) for %q", name)
|
||||
}
|
||||
|
|
|
@ -2592,8 +2592,8 @@ const domainDNSCheck = async (d) => {
|
|||
if ((r.Errors || []).length === 0 && (r.Warnings || []).length === 0) {
|
||||
success = box(green, 'OK');
|
||||
}
|
||||
const errors = (r.Errors || []).length === 0 ? [] : box(red, dom.ul(style({ marginLeft: '1em' }), (r.Errors || []).map(s => dom.li(s))));
|
||||
const warnings = (r.Warnings || []).length === 0 ? [] : box(yellow, dom.ul(style({ marginLeft: '1em' }), (r.Warnings || []).map(s => dom.li(s))));
|
||||
const errors = (r.Errors || []).length === 0 ? [] : box(red, dom.ul((r.Errors || []).map(s => dom.li(s))));
|
||||
const warnings = (r.Warnings || []).length === 0 ? [] : box(yellow, dom.ul((r.Warnings || []).map(s => dom.li(s))));
|
||||
let instructions = null;
|
||||
if (r.Instructions && r.Instructions.length > 0) {
|
||||
instructions = dom.div(style({ margin: '.5ex 0' }));
|
||||
|
|
|
@ -1928,8 +1928,8 @@ const domainDNSCheck = async (d: string) => {
|
|||
if ((r.Errors || []).length === 0 && (r.Warnings || []).length === 0) {
|
||||
success = box(green, 'OK')
|
||||
}
|
||||
const errors = (r.Errors || []).length === 0 ? [] : box(red, dom.ul(style({marginLeft: '1em'}), (r.Errors || []).map(s => dom.li(s))))
|
||||
const warnings = (r.Warnings || []).length === 0 ? [] : box(yellow, dom.ul(style({marginLeft: '1em'}), (r.Warnings || []).map(s => dom.li(s))))
|
||||
const errors = (r.Errors || []).length === 0 ? [] : box(red, dom.ul((r.Errors || []).map(s => dom.li(s))))
|
||||
const warnings = (r.Warnings || []).length === 0 ? [] : box(yellow, dom.ul((r.Warnings || []).map(s => dom.li(s))))
|
||||
|
||||
let instructions: HTMLElement | null = null
|
||||
if (r.Instructions && r.Instructions.length > 0) {
|
||||
|
|
Loading…
Reference in a new issue