diff --git a/Makefile b/Makefile index 96ea9bd..8d451d0 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ build0: CGO_ENABLED=0 go build CGO_ENABLED=0 go vet ./... ./gendoc.sh - (cd webadmin && CGO_ENABLED=0 go run ../vendor/github.com/mjl-/sherpadoc/cmd/sherpadoc/*.go -adjust-function-names none -rename 'config Domain ConfigDomain' Admin) >webadmin/api.json + (cd webadmin && CGO_ENABLED=0 go run ../vendor/github.com/mjl-/sherpadoc/cmd/sherpadoc/*.go -adjust-function-names none -rename 'config Domain ConfigDomain,dmarc Policy DMARCPolicy,mtasts MX STSMX,tlsrptdb Record TLSReportRecord,tlsrptdb SuppressAddress TLSRPTSuppressAddress' Admin) >webadmin/api.json (cd webaccount && CGO_ENABLED=0 go run ../vendor/github.com/mjl-/sherpadoc/cmd/sherpadoc/*.go -adjust-function-names none Account) >webaccount/api.json (cd webmail && CGO_ENABLED=0 go run ../vendor/github.com/mjl-/sherpadoc/cmd/sherpadoc/*.go -adjust-function-names none Webmail) >webmail/api.json ./gents.sh webadmin/api.json webadmin/api.ts diff --git a/dmarc/parse.go b/dmarc/parse.go index e920059..75d0aab 100644 --- a/dmarc/parse.go +++ b/dmarc/parse.go @@ -92,9 +92,9 @@ func parseRecord(s string, checkRequired bool) (record *Record, isdmarc bool, re // ../rfc/7489:1105 p.xerrorf("p= (policy) must be first tag") } - r.Policy = DMARCPolicy(p.xtakelist("none", "quarantine", "reject")) + r.Policy = Policy(p.xtakelist("none", "quarantine", "reject")) case "sp": - r.SubdomainPolicy = DMARCPolicy(p.xkeyword()) + r.SubdomainPolicy = Policy(p.xkeyword()) // note: we check if the value is valid before returning. case "rua": r.AggregateReportAddresses = append(r.AggregateReportAddresses, p.xuri()) diff --git a/dmarc/txt.go b/dmarc/txt.go index db584ac..1d30248 100644 --- a/dmarc/txt.go +++ b/dmarc/txt.go @@ -5,18 +5,16 @@ import ( "strings" ) -// todo: DMARCPolicy should be named just Policy, but this is causing conflicting types in sherpadoc output. should somehow get the dmarc-prefix only in the sherpadoc. - // Policy as used in DMARC DNS record for "p=" or "sp=". -type DMARCPolicy string +type Policy string // ../rfc/7489:1157 const ( - PolicyEmpty DMARCPolicy = "" // Only for the optional Record.SubdomainPolicy. - PolicyNone DMARCPolicy = "none" - PolicyQuarantine DMARCPolicy = "quarantine" - PolicyReject DMARCPolicy = "reject" + PolicyEmpty Policy = "" // Only for the optional Record.SubdomainPolicy. + PolicyNone Policy = "none" + PolicyQuarantine Policy = "quarantine" + PolicyReject Policy = "reject" ) // URI is a destination address for reporting. @@ -55,17 +53,17 @@ const ( // // v=DMARC1; p=reject; rua=mailto:postmaster@mox.example type Record struct { - Version string // "v=DMARC1", fixed. - Policy DMARCPolicy // Required, for "p=". - SubdomainPolicy DMARCPolicy // Like policy but for subdomains. Optional, for "sp=". - AggregateReportAddresses []URI // Optional, for "rua=". Destination addresses for aggregate reports. - FailureReportAddresses []URI // Optional, for "ruf=". Destination addresses for failure reports. - ADKIM Align // Alignment: "r" (default) for relaxed or "s" for simple. For "adkim=". - ASPF Align // Alignment: "r" (default) for relaxed or "s" for simple. For "aspf=". - AggregateReportingInterval int // In seconds, default 86400. For "ri=" - FailureReportingOptions []string // "0" (default), "1", "d", "s". For "fo=". - ReportingFormat []string // "afrf" (default). For "rf=". - Percentage int // Between 0 and 100, default 100. For "pct=". Policy applies randomly to this percentage of messages. + Version string // "v=DMARC1", fixed. + Policy Policy // Required, for "p=". + SubdomainPolicy Policy // Like policy but for subdomains. Optional, for "sp=". + AggregateReportAddresses []URI // Optional, for "rua=". Destination addresses for aggregate reports. + FailureReportAddresses []URI // Optional, for "ruf=". Destination addresses for failure reports. + ADKIM Align // Alignment: "r" (default) for relaxed or "s" for simple. For "adkim=". + ASPF Align // Alignment: "r" (default) for relaxed or "s" for simple. For "aspf=". + AggregateReportingInterval int // In seconds, default 86400. For "ri=" + FailureReportingOptions []string // "0" (default), "1", "d", "s". For "fo=". + ReportingFormat []string // "afrf" (default). For "rf=". + Percentage int // Between 0 and 100, default 100. For "pct=". Policy applies randomly to this percentage of messages. } // DefaultRecord holds the defaults for a DMARC record. diff --git a/gentestdata.go b/gentestdata.go index 4671196..b71bfa8 100644 --- a/gentestdata.go +++ b/gentestdata.go @@ -201,7 +201,7 @@ Accounts: mtastsPolicy := mtasts.Policy{ Version: "STSv1", Mode: mtasts.ModeTesting, - MX: []mtasts.STSMX{ + MX: []mtasts.MX{ {Domain: dns.Domain{ASCII: "mx1.example.com"}}, {Domain: dns.Domain{ASCII: "mx2.example.com"}}, {Domain: dns.Domain{ASCII: "backup-example.com"}, Wildcard: true}, diff --git a/http/mtasts.go b/http/mtasts.go index 3d762ef..45632eb 100644 --- a/http/mtasts.go +++ b/http/mtasts.go @@ -43,9 +43,9 @@ func mtastsPolicyHandle(w http.ResponseWriter, r *http.Request) { return } - var mxs []mtasts.STSMX + var mxs []mtasts.MX for _, s := range sts.MX { - var mx mtasts.STSMX + var mx mtasts.MX if strings.HasPrefix(s, "*.") { mx.Wildcard = true s = s[2:] @@ -60,7 +60,7 @@ func mtastsPolicyHandle(w http.ResponseWriter, r *http.Request) { mxs = append(mxs, mx) } if len(mxs) == 0 { - mxs = []mtasts.STSMX{{Domain: mox.Conf.Static.HostnameDomain}} + mxs = []mtasts.MX{{Domain: mox.Conf.Static.HostnameDomain}} } policy := mtasts.Policy{ diff --git a/mtasts/mtasts.go b/mtasts/mtasts.go index ef2ef14..ff8c620 100644 --- a/mtasts/mtasts.go +++ b/mtasts/mtasts.go @@ -75,9 +75,8 @@ const ( ModeNone Mode = "none" // In case MTA-STS is not or no longer implemented. ) -// STSMX is an allowlisted MX host name/pattern. -// todo: find a way to name this just STSMX without getting duplicate names for "MX" in the sherpa api. -type STSMX struct { +// MX is an allowlisted MX host name/pattern. +type MX struct { // "*." wildcard, e.g. if a subdomain matches. A wildcard must match exactly one // label. *.example.com matches mail.example.com, but not example.com, and not // foor.bar.example.com. @@ -88,7 +87,7 @@ type STSMX struct { // LogString returns a loggable string representing the host, with both unicode // and ascii version for IDNA domains. -func (s STSMX) LogString() string { +func (s MX) LogString() string { pre := "" if s.Wildcard { pre = "*." @@ -103,7 +102,7 @@ func (s STSMX) LogString() string { type Policy struct { Version string // "STSv1" Mode Mode - MX []STSMX + MX []MX MaxAgeSeconds int // How long this policy can be cached. Suggested values are in weeks or more. Extensions []Pair } diff --git a/mtasts/parse.go b/mtasts/parse.go index 1d31a35..a1b7b4b 100644 --- a/mtasts/parse.go +++ b/mtasts/parse.go @@ -279,7 +279,7 @@ func (p *parser) take(s string) bool { } // ../rfc/8461:469 -func (p *parser) xmx() (mx STSMX) { +func (p *parser) xmx() (mx MX) { if p.prefix("*.") { mx.Wildcard = true p.o += 2 diff --git a/mtasts/parse_test.go b/mtasts/parse_test.go index 895f1a5..f721979 100644 --- a/mtasts/parse_test.go +++ b/mtasts/parse_test.go @@ -77,7 +77,7 @@ max_age: 1296000 Policy{ Version: "STSv1", Mode: ModeTesting, - MX: []STSMX{ + MX: []MX{ {Domain: dns.Domain{ASCII: "mx1.example.com"}}, {Domain: dns.Domain{ASCII: "mx2.example.com"}}, {Domain: dns.Domain{ASCII: "mx.backup-example.com"}}, @@ -89,7 +89,7 @@ max_age: 1296000 Policy{ Version: "STSv1", Mode: ModeEnforce, - MX: []STSMX{ + MX: []MX{ {Wildcard: true, Domain: dns.Domain{ASCII: "example.com"}}, }, MaxAgeSeconds: 0, @@ -99,7 +99,7 @@ max_age: 1296000 Policy{ Version: "STSv1", Mode: ModeEnforce, - MX: []STSMX{ + MX: []MX{ {Wildcard: true, Domain: dns.Domain{ASCII: "example.com"}}, }, MaxAgeSeconds: 1, @@ -140,7 +140,7 @@ max_age: 1296000 policy := Policy{ Version: "STSv1", Mode: ModeTesting, - MX: []STSMX{ + MX: []MX{ {Domain: dns.Domain{ASCII: "mx1.example.com"}}, {Domain: dns.Domain{ASCII: "mx2.example.com"}}, {Domain: dns.Domain{ASCII: "mx.backup-example.com"}}, diff --git a/mtastsdb/db_test.go b/mtastsdb/db_test.go index 11d580c..ef3e7ee 100644 --- a/mtastsdb/db_test.go +++ b/mtastsdb/db_test.go @@ -52,7 +52,7 @@ func TestDB(t *testing.T) { policy1 := mtasts.Policy{ Version: "STSv1", Mode: mtasts.ModeTesting, - MX: []mtasts.STSMX{ + MX: []mtasts.MX{ {Domain: dns.Domain{ASCII: "mx1.example.com"}}, {Domain: dns.Domain{ASCII: "mx2.example.com"}}, {Domain: dns.Domain{ASCII: "mx.backup-example.com"}}, @@ -71,7 +71,7 @@ func TestDB(t *testing.T) { policy2 := mtasts.Policy{ Version: "STSv1", Mode: mtasts.ModeEnforce, - MX: []mtasts.STSMX{ + MX: []mtasts.MX{ {Domain: dns.Domain{ASCII: "mx1.example.com"}}, }, MaxAgeSeconds: 360000, diff --git a/mtastsdb/refresh_test.go b/mtastsdb/refresh_test.go index c9f08e6..99428f3 100644 --- a/mtastsdb/refresh_test.go +++ b/mtastsdb/refresh_test.go @@ -64,7 +64,7 @@ func TestRefresh(t *testing.T) { policy := mtasts.Policy{ Version: "STSv1", Mode: mode, - MX: []mtasts.STSMX{{Wildcard: false, Domain: mxd}}, + MX: []mtasts.MX{{Wildcard: false, Domain: mxd}}, MaxAgeSeconds: maxAge, Extensions: nil, } diff --git a/tlsrptdb/db.go b/tlsrptdb/db.go index 1594843..4c3b42f 100644 --- a/tlsrptdb/db.go +++ b/tlsrptdb/db.go @@ -10,12 +10,12 @@ import ( ) var ( - ReportDBTypes = []any{TLSReportRecord{}} + ReportDBTypes = []any{Record{}} ReportDB *bstore.DB mutex sync.Mutex // Accessed directly by tlsrptsend. - ResultDBTypes = []any{TLSResult{}, TLSRPTSuppressAddress{}} + ResultDBTypes = []any{TLSResult{}, SuppressAddress{}} ResultDB *bstore.DB ) diff --git a/tlsrptdb/report.go b/tlsrptdb/report.go index 838891b..6c3dd63 100644 --- a/tlsrptdb/report.go +++ b/tlsrptdb/report.go @@ -44,12 +44,10 @@ var ( } ) -// TLSReportRecord is a TLS report as a database record, including information +// Record is a TLS report as a database record, including information // about the sender. -// -// todo: should be named just Record, but it would cause a sherpa type name conflict. -type TLSReportRecord struct { - ID int64 `bstore:"typename Record"` +type Record struct { + ID int64 Domain string `bstore:"index"` // Policy domain to which the TLS report applies. Unicode. FromDomain string MailFrom string @@ -119,7 +117,7 @@ func AddReport(ctx context.Context, log mlog.Log, verifiedFromDomain dns.Domain, metricSession.WithLabelValues(result).Add(float64(f.FailedSessionCount)) } - record := TLSReportRecord{0, d.Name(), verifiedFromDomain.Name(), mailFrom, d == mox.Conf.Static.HostnameDomain, *r} + record := Record{0, d.Name(), verifiedFromDomain.Name(), mailFrom, d == mox.Conf.Static.HostnameDomain, *r} if err := tx.Insert(&record); err != nil { return fmt.Errorf("inserting report for domain: %w", err) } @@ -133,22 +131,22 @@ func AddReport(ctx context.Context, log mlog.Log, verifiedFromDomain dns.Domain, } // Records returns all TLS reports in the database. -func Records(ctx context.Context) ([]TLSReportRecord, error) { +func Records(ctx context.Context) ([]Record, error) { db, err := reportDB(ctx) if err != nil { return nil, err } - return bstore.QueryDB[TLSReportRecord](ctx, db).List() + return bstore.QueryDB[Record](ctx, db).List() } // RecordID returns the report for the ID. -func RecordID(ctx context.Context, id int64) (TLSReportRecord, error) { +func RecordID(ctx context.Context, id int64) (Record, error) { db, err := reportDB(ctx) if err != nil { - return TLSReportRecord{}, err + return Record{}, err } - e := TLSReportRecord{ID: id} + e := Record{ID: id} err = db.Get(ctx, &e) return e, err } @@ -156,18 +154,18 @@ func RecordID(ctx context.Context, id int64) (TLSReportRecord, error) { // RecordsPeriodPolicyDomain returns the reports overlapping start and end, for the // given policy domain. If policy domain is empty, records for all domains are // returned. -func RecordsPeriodDomain(ctx context.Context, start, end time.Time, policyDomain dns.Domain) ([]TLSReportRecord, error) { +func RecordsPeriodDomain(ctx context.Context, start, end time.Time, policyDomain dns.Domain) ([]Record, error) { db, err := reportDB(ctx) if err != nil { return nil, err } - q := bstore.QueryDB[TLSReportRecord](ctx, db) + q := bstore.QueryDB[Record](ctx, db) var zerodom dns.Domain if policyDomain != zerodom { - q.FilterNonzero(TLSReportRecord{Domain: policyDomain.Name()}) + q.FilterNonzero(Record{Domain: policyDomain.Name()}) } - q.FilterFn(func(r TLSReportRecord) bool { + q.FilterFn(func(r Record) bool { dr := r.Report.DateRange return !dr.Start.Before(start) && dr.Start.Before(end) || dr.End.After(start) && !dr.End.After(end) }) diff --git a/tlsrptdb/result.go b/tlsrptdb/result.go index 0426e69..e4957d7 100644 --- a/tlsrptdb/result.go +++ b/tlsrptdb/result.go @@ -60,12 +60,10 @@ type TLSResult struct { Results []tlsrpt.Result } -// todo: TLSRPTSuppressAddress should be named just SuppressAddress, but would clash with dmarcdb.SuppressAddress in sherpa api. - -// TLSRPTSuppressAddress is a reporting address for which outgoing TLS reports +// SuppressAddress is a reporting address for which outgoing TLS reports // will be suppressed for a period. -type TLSRPTSuppressAddress struct { - ID int64 +type SuppressAddress struct { + ID int64 `bstore:"typename TLSRPTSuppressAddress"` Inserted time.Time `bstore:"default now"` ReportingAddress string `bstore:"unique"` Until time.Time `bstore:"nonzero"` @@ -205,7 +203,7 @@ func RemoveResultsRecipientDomain(ctx context.Context, recipientDomain dns.Domai } // SuppressAdd adds an address to the suppress list. -func SuppressAdd(ctx context.Context, ba *TLSRPTSuppressAddress) error { +func SuppressAdd(ctx context.Context, ba *SuppressAddress) error { db, err := resultDB(ctx) if err != nil { return err @@ -215,13 +213,13 @@ func SuppressAdd(ctx context.Context, ba *TLSRPTSuppressAddress) error { } // SuppressList returns all reporting addresses on the suppress list. -func SuppressList(ctx context.Context) ([]TLSRPTSuppressAddress, error) { +func SuppressList(ctx context.Context) ([]SuppressAddress, error) { db, err := resultDB(ctx) if err != nil { return nil, err } - return bstore.QueryDB[TLSRPTSuppressAddress](ctx, db).SortDesc("ID").List() + return bstore.QueryDB[SuppressAddress](ctx, db).SortDesc("ID").List() } // SuppressRemove removes a reporting address record from the suppress list. @@ -231,7 +229,7 @@ func SuppressRemove(ctx context.Context, id int64) error { return err } - return db.Delete(ctx, &TLSRPTSuppressAddress{ID: id}) + return db.Delete(ctx, &SuppressAddress{ID: id}) } // SuppressUpdate updates the until field of a reporting address record. @@ -241,7 +239,7 @@ func SuppressUpdate(ctx context.Context, id int64, until time.Time) error { return err } - ba := TLSRPTSuppressAddress{ID: id} + ba := SuppressAddress{ID: id} err = db.Get(ctx, &ba) if err != nil { return err diff --git a/tlsrptsend/send.go b/tlsrptsend/send.go index 08bc2e7..2809005 100644 --- a/tlsrptsend/send.go +++ b/tlsrptsend/send.go @@ -577,8 +577,8 @@ Period: %s - %s UTC var queued bool for _, rcpt := range recipients { // If recipient is on suppression list, we won't queue the reporting message. - q := bstore.QueryDB[tlsrptdb.TLSRPTSuppressAddress](ctx, db) - q.FilterNonzero(tlsrptdb.TLSRPTSuppressAddress{ReportingAddress: rcpt.Address.Path().String()}) + q := bstore.QueryDB[tlsrptdb.SuppressAddress](ctx, db) + q.FilterNonzero(tlsrptdb.SuppressAddress{ReportingAddress: rcpt.Address.Path().String()}) q.FilterGreater("Until", time.Now()) exists, err := q.Exists() if err != nil { diff --git a/tlsrptsend/send_test.go b/tlsrptsend/send_test.go index f2da06c..988e723 100644 --- a/tlsrptsend/send_test.go +++ b/tlsrptsend/send_test.go @@ -488,9 +488,9 @@ func TestSendReports(t *testing.T) { // Suppressed addresses don't get a report. resolver.TXT["_smtp._tls.mailhost.xn--74h.example."] = []string{"v=TLSRPTv1; rua=mailto:tls-reports1@mailhost.xn--74h.example,mailto:tls-reports2@mailhost.xn--74h.example; rua=mailto:tls-reports3@mailhost.xn--74h.example"} db.Insert(ctxbg, - &tlsrptdb.TLSRPTSuppressAddress{ReportingAddress: "tls-reports@xn--74h.example", Until: time.Now().Add(-time.Minute)}, // Expired, so ignored. - &tlsrptdb.TLSRPTSuppressAddress{ReportingAddress: "tls-reports1@mailhost.xn--74h.example", Until: time.Now().Add(time.Minute)}, // Still valid. - &tlsrptdb.TLSRPTSuppressAddress{ReportingAddress: "tls-reports3@mailhost.xn--74h.example", Until: time.Now().Add(31 * 24 * time.Hour)}, // Still valid. + &tlsrptdb.SuppressAddress{ReportingAddress: "tls-reports@xn--74h.example", Until: time.Now().Add(-time.Minute)}, // Expired, so ignored. + &tlsrptdb.SuppressAddress{ReportingAddress: "tls-reports1@mailhost.xn--74h.example", Until: time.Now().Add(time.Minute)}, // Still valid. + &tlsrptdb.SuppressAddress{ReportingAddress: "tls-reports3@mailhost.xn--74h.example", Until: time.Now().Add(31 * 24 * time.Hour)}, // Still valid. ) test(tlsResults, map[string][]tlsrpt.Report{ "tls-reports@xn--74h.example": {report1}, diff --git a/webadmin/admin.go b/webadmin/admin.go index 1da33e5..7fbcebb 100644 --- a/webadmin/admin.go +++ b/webadmin/admin.go @@ -1603,7 +1603,7 @@ func (Admin) MTASTSPolicies(ctx context.Context) (records []mtastsdb.PolicyRecor // 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) TLSReports(ctx context.Context, start, end time.Time, policyDomain string) (reports []tlsrptdb.TLSReportRecord) { +func (Admin) TLSReports(ctx context.Context, start, end time.Time, policyDomain string) (reports []tlsrptdb.Record) { var polDom dns.Domain if policyDomain != "" { var err error @@ -1625,7 +1625,7 @@ func (Admin) TLSReports(ctx context.Context, start, end time.Time, policyDomain } // TLSReportID returns a single TLS report. -func (Admin) TLSReportID(ctx context.Context, domain string, reportID int64) tlsrptdb.TLSReportRecord { +func (Admin) TLSReportID(ctx context.Context, domain string, reportID int64) tlsrptdb.Record { record, err := tlsrptdb.RecordID(ctx, reportID) if err == nil && record.Domain != domain { err = bstore.ErrAbsent @@ -2384,13 +2384,13 @@ func (Admin) TLSRPTSuppressAdd(ctx context.Context, reportingAddress string, unt addr, err := smtp.ParseAddress(reportingAddress) xcheckuserf(ctx, err, "parsing reporting address") - ba := tlsrptdb.TLSRPTSuppressAddress{ReportingAddress: addr.String(), Until: until, Comment: comment} + ba := tlsrptdb.SuppressAddress{ReportingAddress: addr.String(), Until: until, Comment: comment} err = tlsrptdb.SuppressAdd(ctx, &ba) xcheckf(ctx, err, "adding address to suppresslist") } // TLSRPTSuppressList returns all reporting addresses on the suppress list. -func (Admin) TLSRPTSuppressList(ctx context.Context) []tlsrptdb.TLSRPTSuppressAddress { +func (Admin) TLSRPTSuppressList(ctx context.Context) []tlsrptdb.SuppressAddress { l, err := tlsrptdb.SuppressList(ctx) xcheckf(ctx, err, "listing reporting addresses in suppresslist") return l diff --git a/webadmin/api.json b/webadmin/api.json index 391b0bf..6a2a4d5 100644 --- a/webadmin/api.json +++ b/webadmin/api.json @@ -2947,7 +2947,7 @@ }, { "Name": "STSMX", - "Docs": "STSMX is an allowlisted MX host name/pattern.\ntodo: find a way to name this just STSMX without getting duplicate names for \"MX\" in the sherpa api.", + "Docs": "MX is an allowlisted MX host name/pattern.", "Fields": [ { "Name": "Wildcard", @@ -4041,7 +4041,7 @@ }, { "Name": "TLSReportRecord", - "Docs": "TLSReportRecord is a TLS report as a database record, including information\nabout the sender.\n\ntodo: should be named just Record, but it would cause a sherpa type name conflict.", + "Docs": "Record is a TLS report as a database record, including information\nabout the sender.", "Fields": [ { "Name": "ID", @@ -6802,7 +6802,7 @@ }, { "Name": "TLSRPTSuppressAddress", - "Docs": "TLSRPTSuppressAddress is a reporting address for which outgoing TLS reports\nwill be suppressed for a period.", + "Docs": "SuppressAddress is a reporting address for which outgoing TLS reports\nwill be suppressed for a period.", "Fields": [ { "Name": "ID", diff --git a/webadmin/api.ts b/webadmin/api.ts index 7152ac1..399bad7 100644 --- a/webadmin/api.ts +++ b/webadmin/api.ts @@ -221,8 +221,7 @@ export interface Policy { Extensions?: Pair[] | null } -// STSMX is an allowlisted MX host name/pattern. -// todo: find a way to name this just STSMX without getting duplicate names for "MX" in the sherpa api. +// MX is an allowlisted MX host name/pattern. export interface STSMX { Wildcard: boolean // "*." wildcard, e.g. if a subdomain matches. A wildcard must match exactly one label. *.example.com matches mail.example.com, but not example.com, and not foor.bar.example.com. Domain: Domain @@ -425,10 +424,8 @@ export interface PolicyRecord { PolicyText: string // Text that make up the policy, as retrieved. We didn't store this in the past. If empty, policy can be reconstructed from Policy field. Needed by TLSRPT. } -// TLSReportRecord is a TLS report as a database record, including information +// Record is a TLS report as a database record, including information // about the sender. -// -// todo: should be named just Record, but it would cause a sherpa type name conflict. export interface TLSReportRecord { ID: number Domain: string // Policy domain to which the TLS report applies. Unicode. @@ -995,7 +992,7 @@ export interface TLSResult { Results?: Result[] | null // Results is updated for each TLS attempt. } -// TLSRPTSuppressAddress is a reporting address for which outgoing TLS reports +// SuppressAddress is a reporting address for which outgoing TLS reports // will be suppressed for a period. export interface TLSRPTSuppressAddress { ID: number