Documentation ¶
Overview ¶
Package webadmin is a web app for the mox administrator for viewing and changing the configuration, like creating/removing accounts, viewing DMARC and TLS reports, check DNS records for a domain, change the webserver configuration, etc.
Index ¶
- func DomainRecords(ctx context.Context, log mlog.Log, domain string) []string
- func Handler(cookiePath string, isForwarded bool) func(w http.ResponseWriter, r *http.Request)
- type Admin
- func (Admin) Account(ctx context.Context, account string) (accountConfig config.Account, diskUsage int64)
- func (Admin) AccountAdd(ctx context.Context, accountName, address string)
- func (Admin) AccountRemove(ctx context.Context, accountName string)
- func (Admin) AccountRoutesSave(ctx context.Context, accountName string, routes []config.Route)
- func (Admin) AccountSettingsSave(ctx context.Context, accountName string, ...)
- func (Admin) Accounts(ctx context.Context) []string
- func (Admin) AddressAdd(ctx context.Context, address, accountName string)
- func (Admin) AddressRemove(ctx context.Context, address string)
- func (Admin) AliasAdd(ctx context.Context, aliaslp string, domainName string, alias config.Alias)
- func (Admin) AliasAddressesAdd(ctx context.Context, aliaslp string, domainName string, addresses []string)
- func (Admin) AliasAddressesRemove(ctx context.Context, aliaslp string, domainName string, addresses []string)
- func (Admin) AliasRemove(ctx context.Context, aliaslp string, domainName string)
- func (Admin) AliasUpdate(ctx context.Context, aliaslp string, domainName string, ...)
- func (Admin) CheckDomain(ctx context.Context, domainName string) (r CheckResult)
- func (Admin) CheckUpdatesEnabled(ctx context.Context) bool
- func (Admin) ClientConfigsDomain(ctx context.Context, domain string) mox.ClientConfigs
- func (Admin) Config(ctx context.Context) config.Dynamic
- func (Admin) ConfigFiles(ctx context.Context) (staticPath, dynamicPath, static, dynamic string)
- func (Admin) DMARCEvaluationStats(ctx context.Context) map[string]dmarcdb.EvaluationStat
- func (Admin) DMARCEvaluationsDomain(ctx context.Context, domain string) (dns.Domain, []dmarcdb.Evaluation)
- func (Admin) DMARCRemoveEvaluations(ctx context.Context, domain string)
- func (Admin) DMARCReportID(ctx context.Context, domain string, reportID int64) (report dmarcdb.DomainFeedback)
- func (Admin) DMARCReports(ctx context.Context, start, end time.Time, domain string) (reports []dmarcdb.DomainFeedback)
- func (Admin) DMARCSummaries(ctx context.Context, start, end time.Time, domain string) (domainSummaries []DMARCSummary)
- func (Admin) DMARCSuppressAdd(ctx context.Context, reportingAddress string, until time.Time, comment string)
- func (Admin) DMARCSuppressExtend(ctx context.Context, id int64, until time.Time)
- func (Admin) DMARCSuppressList(ctx context.Context) []dmarcdb.SuppressAddress
- func (Admin) DMARCSuppressRemove(ctx context.Context, id int64)
- func (Admin) DNSBLStatus(ctx context.Context) (results map[string]map[string]string, using, monitoring []dns.Domain)
- func (Admin) Domain(ctx context.Context, domain string) dns.Domain
- func (Admin) DomainAdd(ctx context.Context, domain, accountName, localpart string)
- func (Admin) DomainClientSettingsDomainSave(ctx context.Context, domainName, clientSettingsDomain string)
- func (Admin) DomainConfig(ctx context.Context, domain string) config.Domain
- func (Admin) DomainDKIMAdd(ctx context.Context, domainName, selector, algorithm, hash string, ...)
- func (Admin) DomainDKIMRemove(ctx context.Context, domainName, selector string)
- func (Admin) DomainDKIMSave(ctx context.Context, domainName string, selectors map[string]config.Selector, ...)
- func (Admin) DomainDMARCAddressSave(ctx context.Context, domainName, localpart, domain, account, mailbox string)
- func (Admin) DomainDescriptionSave(ctx context.Context, domainName, descr string)
- func (Admin) DomainLocalpartConfigSave(ctx context.Context, domainName, localpartCatchallSeparator string, ...)
- func (Admin) DomainLocalparts(ctx context.Context, domain string) (localpartAccounts map[string]string, localpartAliases map[string]config.Alias)
- func (Admin) DomainMTASTSSave(ctx context.Context, domainName, policyID string, mode mtasts.Mode, ...)
- func (Admin) DomainRecords(ctx context.Context, domain string) []string
- func (Admin) DomainRemove(ctx context.Context, domain string)
- func (Admin) DomainRoutesSave(ctx context.Context, domainName string, routes []config.Route)
- func (Admin) DomainTLSRPTAddressSave(ctx context.Context, domainName, localpart, domain, account, mailbox string)
- func (Admin) Domains(ctx context.Context) []dns.Domain
- func (Admin) HookCancel(ctx context.Context, filter queue.HookFilter) (affected int)
- func (Admin) HookList(ctx context.Context, filter queue.HookFilter, sort queue.HookSort) []queue.Hook
- func (Admin) HookNextAttemptAdd(ctx context.Context, filter queue.HookFilter, minutes int) (affected int)
- func (Admin) HookNextAttemptSet(ctx context.Context, filter queue.HookFilter, minutes int) (affected int)
- func (Admin) HookQueueSize(ctx context.Context) int
- func (Admin) HookRetiredList(ctx context.Context, filter queue.HookRetiredFilter, ...) []queue.HookRetired
- func (Admin) LogLevelRemove(ctx context.Context, pkg string)
- func (Admin) LogLevelSet(ctx context.Context, pkg string, levelStr string)
- func (Admin) LogLevels(ctx context.Context) map[string]string
- func (w Admin) Login(ctx context.Context, loginToken, password string) store.CSRFToken
- func (w Admin) LoginPrep(ctx context.Context) string
- func (w Admin) Logout(ctx context.Context)
- func (Admin) LookupCid(ctx context.Context, recvID string) (cid string)
- func (Admin) LookupIP(ctx context.Context, ip string) Reverse
- func (Admin) LookupTLSRPTRecord(ctx context.Context, domain string) (record *TLSRPTRecord, txt string, errstr string)
- func (Admin) MTASTSPolicies(ctx context.Context) (records []mtastsdb.PolicyRecord)
- func (Admin) MonitorDNSBLsSave(ctx context.Context, text string)
- func (Admin) ParseDomain(ctx context.Context, domain string) dns.Domain
- func (Admin) QueueDrop(ctx context.Context, filter queue.Filter) (affected int)
- func (Admin) QueueFail(ctx context.Context, filter queue.Filter) (affected int)
- func (Admin) QueueHoldRuleAdd(ctx context.Context, hr queue.HoldRule) queue.HoldRule
- func (Admin) QueueHoldRuleList(ctx context.Context) []queue.HoldRule
- func (Admin) QueueHoldRuleRemove(ctx context.Context, holdRuleID int64)
- func (Admin) QueueHoldSet(ctx context.Context, filter queue.Filter, onHold bool) (affected int)
- func (Admin) QueueList(ctx context.Context, filter queue.Filter, sort queue.Sort) []queue.Msg
- func (Admin) QueueNextAttemptAdd(ctx context.Context, filter queue.Filter, minutes int) (affected int)
- func (Admin) QueueNextAttemptSet(ctx context.Context, filter queue.Filter, minutes int) (affected int)
- func (Admin) QueueRequireTLSSet(ctx context.Context, filter queue.Filter, requireTLS *bool) (affected int)
- func (Admin) QueueSize(ctx context.Context) int
- func (Admin) QueueTransportSet(ctx context.Context, filter queue.Filter, transport string) (affected int)
- func (Admin) RetiredList(ctx context.Context, filter queue.RetiredFilter, sort queue.RetiredSort) []queue.MsgRetired
- func (Admin) RoutesSave(ctx context.Context, routes []config.Route)
- func (Admin) SetPassword(ctx context.Context, accountName, password string)
- func (Admin) TLSRPTRemoveResults(ctx context.Context, isRcptDom bool, domain string, day string)
- func (Admin) TLSRPTResults(ctx context.Context) []tlsrptdb.TLSResult
- func (Admin) TLSRPTResultsDomain(ctx context.Context, isRcptDom bool, policyDomain string) (dns.Domain, []tlsrptdb.TLSResult)
- func (Admin) TLSRPTSummaries(ctx context.Context, start, end time.Time, policyDomain string) (domainSummaries []TLSRPTSummary)
- func (Admin) TLSRPTSuppressAdd(ctx context.Context, reportingAddress string, until time.Time, comment string)
- func (Admin) TLSRPTSuppressExtend(ctx context.Context, id int64, until time.Time)
- func (Admin) TLSRPTSuppressList(ctx context.Context) []tlsrptdb.SuppressAddress
- func (Admin) TLSRPTSuppressRemove(ctx context.Context, id int64)
- func (Admin) TLSReportID(ctx context.Context, domain string, reportID int64) tlsrptdb.Record
- func (Admin) TLSReports(ctx context.Context, start, end time.Time, policyDomain string) (reports []tlsrptdb.Record)
- func (Admin) Transports(ctx context.Context) map[string]config.Transport
- func (Admin) WebserverConfig(ctx context.Context) (conf WebserverConfig)
- func (Admin) WebserverConfigSave(ctx context.Context, oldConf, newConf WebserverConfig) (savedConf WebserverConfig)
- type AutoconfCheckResult
- type AutodiscoverCheckResult
- type AutodiscoverSRV
- type CheckResult
- type DANECheckResult
- type DKIMCheckResult
- type DKIMRecord
- type DMARCCheckResult
- type DMARCRecord
- type DMARCSummary
- type DNSSECResult
- type IPRevCheckResult
- type MTASTSCheckResult
- type MTASTSRecord
- type MX
- type MXCheckResult
- type Result
- type Reverse
- type SPFCheckResult
- type SPFRecord
- type SRVConfCheckResult
- type TLSCheckResult
- type TLSRPTCheckResult
- type TLSRPTRecord
- type TLSRPTSummary
- type WebserverConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DomainRecords ¶ added in v0.0.9
DomainRecords is the implementation of API function Admin.DomainRecords, taking a logger.
Types ¶
type Admin ¶
type Admin struct {
// contains filtered or unexported fields
}
Admin exports web API functions for the admin web interface. All its methods are exported under api/. Function calls require valid HTTP Authentication credentials of a user.
func (Admin) Account ¶
func (Admin) Account(ctx context.Context, account string) (accountConfig config.Account, diskUsage int64)
Account returns the parsed configuration of an account.
func (Admin) AccountAdd ¶
AccountAdd adds existing a new account, with an initial email address, and reloads the configuration.
func (Admin) AccountRemove ¶
AccountRemove removes an existing account and reloads the configuration.
func (Admin) AccountRoutesSave ¶ added in v0.0.11
AccountRoutesSave saves routes for an account.
func (Admin) AccountSettingsSave ¶ added in v0.0.11
func (Admin) AccountSettingsSave(ctx context.Context, accountName string, maxOutgoingMessagesPerDay, maxFirstTimeRecipientsPerDay int, maxMsgSize int64, firstTimeSenderDelay bool)
AccountSettingsSave set new settings for an account that only an admin can set.
func (Admin) AddressAdd ¶
AddressAdd adds a new address to the account, which must already exist.
func (Admin) AddressRemove ¶
AddressRemove removes an existing address.
func (Admin) AliasAddressesAdd ¶ added in v0.0.11
func (Admin) AliasAddressesRemove ¶ added in v0.0.11
func (Admin) AliasRemove ¶ added in v0.0.11
func (Admin) AliasUpdate ¶ added in v0.0.11
func (Admin) CheckDomain ¶
func (Admin) CheckDomain(ctx context.Context, domainName string) (r CheckResult)
CheckDomain checks the configuration for the domain, such as MX, SMTP STARTTLS, SPF, DKIM, DMARC, TLSRPT, MTASTS, autoconfig, autodiscover.
func (Admin) CheckUpdatesEnabled ¶
CheckUpdatesEnabled returns whether checking for updates is enabled.
func (Admin) ClientConfigsDomain ¶ added in v0.0.7
ClientConfigsDomain returns configurations for email clients, IMAP and Submission (SMTP) for the domain.
func (Admin) ConfigFiles ¶
ConfigFiles returns the paths and contents of the static and dynamic configuration files.
func (Admin) DMARCEvaluationStats ¶ added in v0.0.8
DMARCEvaluationStats returns a map of all domains with evaluations to a count of the evaluations and whether those evaluations will cause a report to be sent.
func (Admin) DMARCEvaluationsDomain ¶ added in v0.0.8
func (Admin) DMARCEvaluationsDomain(ctx context.Context, domain string) (dns.Domain, []dmarcdb.Evaluation)
DMARCEvaluationsDomain returns all evaluations for aggregate reports for the domain, sorted from oldest to most recent.
func (Admin) DMARCRemoveEvaluations ¶ added in v0.0.8
DMARCRemoveEvaluations removes evaluations for a domain.
func (Admin) DMARCReportID ¶
func (Admin) DMARCReportID(ctx context.Context, domain string, reportID int64) (report dmarcdb.DomainFeedback)
DMARCReportID returns a single DMARC report.
func (Admin) DMARCReports ¶
func (Admin) DMARCReports(ctx context.Context, start, end time.Time, domain string) (reports []dmarcdb.DomainFeedback)
DMARCReports returns DMARC reports overlapping with period start/end, for the given domain (or all domains if empty). The reports are sorted first by period end (most recent first), then by domain.
func (Admin) DMARCSummaries ¶
func (Admin) DMARCSummaries(ctx context.Context, start, end time.Time, domain string) (domainSummaries []DMARCSummary)
DMARCSummaries returns a summary of received DMARC reports overlapping with period start/end for one or all domains (when domain is empty). The returned summaries are ordered by domain name.
func (Admin) DMARCSuppressAdd ¶ added in v0.0.8
func (Admin) DMARCSuppressAdd(ctx context.Context, reportingAddress string, until time.Time, comment string)
DMARCSuppressAdd adds a reporting address to the suppress list. Outgoing reports will be suppressed for a period.
func (Admin) DMARCSuppressExtend ¶ added in v0.0.8
DMARCSuppressExtend updates the until field of a suppressed reporting address record.
func (Admin) DMARCSuppressList ¶ added in v0.0.8
func (Admin) DMARCSuppressList(ctx context.Context) []dmarcdb.SuppressAddress
DMARCSuppressList returns all reporting addresses on the suppress list.
func (Admin) DMARCSuppressRemove ¶ added in v0.0.8
DMARCSuppressRemove removes a reporting address record from the suppress list.
func (Admin) DNSBLStatus ¶
func (Admin) DNSBLStatus(ctx context.Context) (results map[string]map[string]string, using, monitoring []dns.Domain)
DNSBLStatus returns the IPs from which outgoing connections may be made and their current status in DNSBLs that are configured. The IPs are typically the configured listen IPs, or otherwise IPs on the machines network interfaces, with internal/private IPs removed.
The returned value maps IPs to per DNSBL statuses, where "pass" means not listed and anything else is an error string, e.g. "fail: ..." or "temperror: ...".
func (Admin) Domain ¶
Domain returns the dns domain for a (potentially unicode as IDNA) domain name.
func (Admin) DomainClientSettingsDomainSave ¶ added in v0.0.11
func (Admin) DomainClientSettingsDomainSave(ctx context.Context, domainName, clientSettingsDomain string)
DomainClientSettingsDomainSave saves the client settings domain for a domain.
func (Admin) DomainConfig ¶ added in v0.0.11
DomainConfig returns the configuration for a domain.
func (Admin) DomainDKIMAdd ¶ added in v0.0.11
func (Admin) DomainDKIMAdd(ctx context.Context, domainName, selector, algorithm, hash string, headerRelaxed, bodyRelaxed, seal bool, headers []string, lifetime time.Duration)
DomainDKIMAdd adds a DKIM selector for a domain, generating a new private key. The selector is not enabled for signing.
func (Admin) DomainDKIMRemove ¶ added in v0.0.11
DomainDKIMRemove removes a DKIM selector for a domain.
func (Admin) DomainDKIMSave ¶ added in v0.0.11
func (Admin) DomainDKIMSave(ctx context.Context, domainName string, selectors map[string]config.Selector, sign []string)
DomainDKIMSave saves the settings of selectors, and which to enable for signing, for a domain. All currently configured selectors must be present, selectors cannot be added/removed with this function.
func (Admin) DomainDMARCAddressSave ¶ added in v0.0.11
func (Admin) DomainDMARCAddressSave(ctx context.Context, domainName, localpart, domain, account, mailbox string)
DomainDMARCAddressSave saves the DMARC reporting address/processing configuration for a domain. If localpart is empty, processing reports is disabled.
func (Admin) DomainDescriptionSave ¶ added in v0.0.11
DomainDescriptionSave saves the description for a domain.
func (Admin) DomainLocalpartConfigSave ¶ added in v0.0.11
func (Admin) DomainLocalpartConfigSave(ctx context.Context, domainName, localpartCatchallSeparator string, localpartCaseSensitive bool)
DomainLocalpartConfigSave saves the localpart catchall and case-sensitive settings for a domain.
func (Admin) DomainLocalparts ¶
func (Admin) DomainLocalparts(ctx context.Context, domain string) (localpartAccounts map[string]string, localpartAliases map[string]config.Alias)
DomainLocalparts returns the encoded localparts and accounts configured in domain.
func (Admin) DomainMTASTSSave ¶ added in v0.0.11
func (Admin) DomainMTASTSSave(ctx context.Context, domainName, policyID string, mode mtasts.Mode, maxAge time.Duration, mx []string)
DomainMTASTSSave saves the MTASTS policy for a domain. If policyID is empty, no MTASTS policy is served.
func (Admin) DomainRecords ¶
DomainRecords returns lines describing DNS records that should exist for the configured domain.
func (Admin) DomainRemove ¶
DomainRemove removes an existing domain and reloads the configuration.
func (Admin) DomainRoutesSave ¶ added in v0.0.11
DomainRoutesSave saves routes for a domain.
func (Admin) DomainTLSRPTAddressSave ¶ added in v0.0.11
func (Admin) DomainTLSRPTAddressSave(ctx context.Context, domainName, localpart, domain, account, mailbox string)
DomainTLSRPTAddressSave saves the TLS reporting address/processing configuration for a domain. If localpart is empty, processing reports is disabled.
func (Admin) HookCancel ¶ added in v0.0.11
HookCancel prevents further delivery attempts of matching webhooks.
func (Admin) HookList ¶ added in v0.0.11
func (Admin) HookList(ctx context.Context, filter queue.HookFilter, sort queue.HookSort) []queue.Hook
HookList lists webhooks still to be delivered.
func (Admin) HookNextAttemptAdd ¶ added in v0.0.11
func (Admin) HookNextAttemptAdd(ctx context.Context, filter queue.HookFilter, minutes int) (affected int)
HookNextAttemptAdd adds a duration to the time of next delivery attempt of matching hooks from the queue.
func (Admin) HookNextAttemptSet ¶ added in v0.0.11
func (Admin) HookNextAttemptSet(ctx context.Context, filter queue.HookFilter, minutes int) (affected int)
HookNextAttemptSet sets a new time for next delivery attempt of matching hooks from the queue.
func (Admin) HookQueueSize ¶ added in v0.0.11
HookQueueSize returns the number of webhooks still to be delivered.
func (Admin) HookRetiredList ¶ added in v0.0.11
func (Admin) HookRetiredList(ctx context.Context, filter queue.HookRetiredFilter, sort queue.HookRetiredSort) []queue.HookRetired
HookRetiredList lists retired webhooks.
func (Admin) LogLevelRemove ¶
LogLevelRemove removes a log level for a package, which cannot be the empty string.
func (Admin) LogLevelSet ¶
LogLevelSet sets a log level for a package.
func (Admin) Login ¶ added in v0.0.9
Login returns a session token for the credentials, or fails with error code "user:badLogin". Call LoginPrep to get a loginToken.
func (Admin) LoginPrep ¶ added in v0.0.9
LoginPrep returns a login token, and also sets it as cookie. Both must be present in the call to Login.
func (Admin) LookupCid ¶ added in v0.0.10
LookupCid turns an ID from a Received header into a cid as used in logging.
func (Admin) LookupTLSRPTRecord ¶ added in v0.0.8
func (Admin) LookupTLSRPTRecord(ctx context.Context, domain string) (record *TLSRPTRecord, txt string, errstr string)
LookupTLSRPTRecord looks up a TLSRPT record and returns the parsed form, original txt form from DNS, and error with the TLSRPT record as a string.
func (Admin) MTASTSPolicies ¶
func (Admin) MTASTSPolicies(ctx context.Context) (records []mtastsdb.PolicyRecord)
MTASTSPolicies returns all mtasts policies from the cache.
func (Admin) MonitorDNSBLsSave ¶ added in v0.0.10
func (Admin) ParseDomain ¶ added in v0.0.8
ParseDomain parses a domain, possibly an IDNA domain.
func (Admin) QueueFail ¶ added in v0.0.11
QueueFail fails delivery for matching messages, causing DSNs to be sent.
func (Admin) QueueHoldRuleAdd ¶ added in v0.0.11
QueueHoldRuleAdd adds a hold rule. Newly submitted and existing messages matching the hold rule will be marked "on hold".
func (Admin) QueueHoldRuleList ¶ added in v0.0.11
QueueHoldRuleList lists the hold rules.
func (Admin) QueueHoldRuleRemove ¶ added in v0.0.11
QueueHoldRuleRemove removes a hold rule. The Hold field of messages in the queue are not changed.
func (Admin) QueueHoldSet ¶ added in v0.0.11
QueueHoldSet sets the Hold field of matching messages in the queue.
func (Admin) QueueNextAttemptAdd ¶ added in v0.0.11
func (Admin) QueueNextAttemptAdd(ctx context.Context, filter queue.Filter, minutes int) (affected int)
QueueNextAttemptAdd adds a duration to the time of next delivery attempt of matching messages from the queue.
func (Admin) QueueNextAttemptSet ¶ added in v0.0.11
func (Admin) QueueNextAttemptSet(ctx context.Context, filter queue.Filter, minutes int) (affected int)
QueueNextAttemptSet sets a new time for next delivery attempt of matching messages from the queue.
func (Admin) QueueRequireTLSSet ¶ added in v0.0.11
func (Admin) QueueRequireTLSSet(ctx context.Context, filter queue.Filter, requireTLS *bool) (affected int)
QueueRequireTLSSet updates the requiretls field for matching messages in the queue, to be used for the next delivery.
func (Admin) QueueTransportSet ¶ added in v0.0.11
func (Admin) QueueTransportSet(ctx context.Context, filter queue.Filter, transport string) (affected int)
QueueTransportSet initiates delivery of a message from the queue and sets the transport to use for delivery.
func (Admin) RetiredList ¶ added in v0.0.11
func (Admin) RetiredList(ctx context.Context, filter queue.RetiredFilter, sort queue.RetiredSort) []queue.MsgRetired
RetiredList returns messages retired from the queue (delivery could have succeeded or failed).
func (Admin) RoutesSave ¶ added in v0.0.11
RoutesSave saves global routes.
func (Admin) SetPassword ¶
SetPassword saves a new password for an account, invalidating the previous password. Sessions are not interrupted, and will keep working. New login attempts must use the new password. Password must be at least 8 characters.
func (Admin) TLSRPTRemoveResults ¶ added in v0.0.8
TLSRPTRemoveResults removes the TLS results for a domain for the given day. If day is empty, all results are removed.
func (Admin) TLSRPTResults ¶ added in v0.0.8
TLSRPTResults returns all TLSRPT results in the database.
func (Admin) TLSRPTResultsDomain ¶ added in v0.0.8
func (Admin) TLSRPTResultsDomain(ctx context.Context, isRcptDom bool, policyDomain string) (dns.Domain, []tlsrptdb.TLSResult)
TLSRPTResultsPolicyDomain returns the TLS results for a domain.
func (Admin) TLSRPTSummaries ¶
func (Admin) TLSRPTSummaries(ctx context.Context, start, end time.Time, policyDomain string) (domainSummaries []TLSRPTSummary)
TLSRPTSummaries returns a summary of received TLS reports overlapping with period start/end for one or all domains (when domain is empty). The returned summaries are ordered by domain name.
func (Admin) TLSRPTSuppressAdd ¶ added in v0.0.8
func (Admin) TLSRPTSuppressAdd(ctx context.Context, reportingAddress string, until time.Time, comment string)
TLSRPTSuppressAdd adds a reporting address to the suppress list. Outgoing reports will be suppressed for a period.
func (Admin) TLSRPTSuppressExtend ¶ added in v0.0.8
TLSRPTSuppressExtend updates the until field of a suppressed reporting address record.
func (Admin) TLSRPTSuppressList ¶ added in v0.0.8
func (Admin) TLSRPTSuppressList(ctx context.Context) []tlsrptdb.SuppressAddress
TLSRPTSuppressList returns all reporting addresses on the suppress list.
func (Admin) TLSRPTSuppressRemove ¶ added in v0.0.8
TLSRPTSuppressRemove removes a reporting address record from the suppress list.
func (Admin) TLSReportID ¶
TLSReportID returns a single TLS report.
func (Admin) TLSReports ¶
func (Admin) TLSReports(ctx context.Context, start, end time.Time, policyDomain string) (reports []tlsrptdb.Record)
TLSReports returns TLS reports overlapping with period start/end, for the given policy domain (or all domains if empty). The reports are sorted first by period end (most recent first), then by policy domain.
func (Admin) Transports ¶
Transports returns the configured transports, for sending email.
func (Admin) WebserverConfig ¶
func (Admin) WebserverConfig(ctx context.Context) (conf WebserverConfig)
WebserverConfig returns the current webserver config
func (Admin) WebserverConfigSave ¶
func (Admin) WebserverConfigSave(ctx context.Context, oldConf, newConf WebserverConfig) (savedConf WebserverConfig)
WebserverConfigSave saves a new webserver config. If oldConf is not equal to the current config, an error is returned.
type AutoconfCheckResult ¶
type AutodiscoverCheckResult ¶
type AutodiscoverCheckResult struct { Records []AutodiscoverSRV Result }
type AutodiscoverSRV ¶
type CheckResult ¶
type CheckResult struct { Domain string DNSSEC DNSSECResult IPRev IPRevCheckResult MX MXCheckResult TLS TLSCheckResult DANE DANECheckResult SPF SPFCheckResult DKIM DKIMCheckResult DMARC DMARCCheckResult HostTLSRPT TLSRPTCheckResult DomainTLSRPT TLSRPTCheckResult MTASTS MTASTSCheckResult SRVConf SRVConfCheckResult Autoconf AutoconfCheckResult Autodiscover AutodiscoverCheckResult }
CheckResult is the analysis of a domain, its actual configuration (DNS, TLS, connectivity) and the mox configuration. It includes configuration instructions (e.g. DNS records), and warnings and errors encountered.
type DANECheckResult ¶ added in v0.0.8
type DANECheckResult struct {
Result
}
type DKIMCheckResult ¶
type DKIMCheckResult struct { Records []DKIMRecord Result }
type DMARCCheckResult ¶
type DMARCCheckResult struct { Domain string TXT string Record *DMARCRecord Result }
type DMARCRecord ¶
type DMARCSummary ¶
type DMARCSummary struct { Domain string Total int DispositionNone int DispositionQuarantine int DispositionReject int DKIMFail int SPFFail int PolicyOverrides map[dmarcrpt.PolicyOverride]int }
DMARCSummary presents DMARC aggregate reporting statistics for a single domain over a period.
type DNSSECResult ¶ added in v0.0.8
type DNSSECResult struct {
Result
}
type IPRevCheckResult ¶
type MTASTSCheckResult ¶
type MTASTSRecord ¶
type MXCheckResult ¶
type Reverse ¶
type Reverse struct {
Hostnames []string
}
Reverse is the result of a reverse lookup.
type SPFCheckResult ¶
type SRVConfCheckResult ¶
type TLSCheckResult ¶
type TLSCheckResult struct {
Result
}
type TLSRPTCheckResult ¶
type TLSRPTCheckResult struct { TXT string Record *TLSRPTRecord Result }
type TLSRPTRecord ¶
type TLSRPTSummary ¶
type TLSRPTSummary struct { PolicyDomain dns.Domain Success int64 Failure int64 ResultTypeCounts map[tlsrpt.ResultType]int64 }
TLSRPTSummary presents TLS reporting statistics for a single domain over a period.
type WebserverConfig ¶
type WebserverConfig struct { WebDNSDomainRedirects [][2]dns.Domain // From server to frontend. WebDomainRedirects [][2]string // From frontend to server, it's not convenient to create dns.Domain in the frontend. WebHandlers []config.WebHandler }
WebserverConfig is the combination of WebDomainRedirects and WebHandlers from the domains.conf configuration file.