Skipped tests that are not problematic should be UNKNOWN rather than INFO; the affected rules cannot evaluate without their input, so they are non-evaluations, not findings.
100 lines
3 KiB
Go
100 lines
3 KiB
Go
package checker
|
|
|
|
import (
|
|
"time"
|
|
|
|
sdk "git.happydns.org/checker-sdk-go/checker"
|
|
)
|
|
|
|
// Version is overridden at link time by the build, or by the plugin loader.
|
|
var Version = "built-in"
|
|
|
|
func (p *autoconfigProvider) Definition() *sdk.CheckerDefinition {
|
|
return &sdk.CheckerDefinition{
|
|
ID: "email-autoconfig",
|
|
Name: "Email Autoconfiguration",
|
|
Version: Version,
|
|
Availability: sdk.CheckerAvailability{
|
|
ApplyToDomain: true,
|
|
},
|
|
ObservationKeys: []sdk.ObservationKey{ObservationKeyAutoconfig},
|
|
HasHTMLReport: true,
|
|
Options: sdk.CheckerOptionsDocumentation{
|
|
DomainOpts: []sdk.CheckerOptionDocumentation{
|
|
{
|
|
Id: "domain_name",
|
|
Label: "Domain name",
|
|
AutoFill: sdk.AutoFillDomainName,
|
|
Required: true,
|
|
},
|
|
},
|
|
UserOpts: []sdk.CheckerOptionDocumentation{
|
|
{
|
|
Id: "probeEmail",
|
|
Type: "string",
|
|
Label: "Local-part used in probes",
|
|
Description: "Local part sent in the autoconfig URL query string (before @). Most servers ignore it, but some providers branch on the user.",
|
|
Default: "test",
|
|
},
|
|
{
|
|
Id: "httpTimeout",
|
|
Type: "number",
|
|
Label: "HTTP timeout (seconds)",
|
|
Description: "Per-request timeout when probing autoconfig endpoints.",
|
|
Default: float64(8),
|
|
},
|
|
{
|
|
Id: "tryISPDB",
|
|
Type: "bool",
|
|
Label: "Try Mozilla ISPDB fallback",
|
|
Description: "When the domain itself does not publish an autoconfig file, try Mozilla's public Thunderbird ISPDB as an additional probe.",
|
|
Default: true,
|
|
},
|
|
{
|
|
Id: "tryHTTPAutoconfig",
|
|
Type: "bool",
|
|
Label: "Allow plain-HTTP fallback probe",
|
|
Description: "Also attempt the plain-HTTP variant of autoconfig.<domain> (the draft lists it as optional). Useful to spot providers still serving over HTTP.",
|
|
Default: false,
|
|
},
|
|
{
|
|
Id: "tryAutodiscoverPost",
|
|
Type: "bool",
|
|
Label: "Probe Microsoft Autodiscover (POST)",
|
|
Description: "Probe the Exchange/Outlook Autodiscover endpoints. Disable to check only the Thunderbird flow.",
|
|
Default: true,
|
|
},
|
|
},
|
|
AdminOpts: []sdk.CheckerOptionDocumentation{
|
|
{
|
|
Id: "ispdbURL",
|
|
Type: "string",
|
|
Label: "Mozilla ISPDB base URL",
|
|
Default: "https://autoconfig.thunderbird.net/v1.1/",
|
|
Description: "Base URL for Mozilla's autoconfig fallback database.",
|
|
},
|
|
{
|
|
Id: "userAgent",
|
|
Type: "string",
|
|
Label: "User-Agent used in probes",
|
|
Default: "happyDomain-autoconfig/1.0 (+https://happydomain.org)",
|
|
Description: "Identifies the checker in probe HTTP logs.",
|
|
},
|
|
},
|
|
},
|
|
Rules: []sdk.CheckRule{
|
|
PresenceRule(),
|
|
PreferredEndpointRule(),
|
|
TLSRule(),
|
|
EncryptionRule(),
|
|
ConsistencyRule(),
|
|
SRVRule(),
|
|
AutodiscoverRule(),
|
|
},
|
|
Interval: &sdk.CheckIntervalSpec{
|
|
Min: 15 * time.Minute,
|
|
Max: 7 * 24 * time.Hour,
|
|
Default: 24 * time.Hour,
|
|
},
|
|
}
|
|
}
|