a
This commit is contained in:
+48
-11
@@ -6,18 +6,55 @@ import "time"
|
||||
// ---- Domain & User ----
|
||||
|
||||
type Domain struct {
|
||||
ID int64
|
||||
Name string
|
||||
Enabled bool
|
||||
ID int64
|
||||
Name string
|
||||
Enabled bool
|
||||
DKIMPrivateEnc []byte // AES-256-GCM encrypted PEM private key
|
||||
DKIMPublic string // PEM public key (not secret)
|
||||
DKIMSelector string
|
||||
DKIMAlgo string // rsa2048 | ed25519
|
||||
SPFPolicy string // stored for reference
|
||||
DMARCPolicy string // stored for reference
|
||||
MaxUsers int
|
||||
MaxQuotaBytes int64
|
||||
CreatedAt time.Time
|
||||
DKIMPublic string // PEM public key (not secret)
|
||||
DKIMSelector string
|
||||
DKIMAlgo string // rsa2048 | ed25519
|
||||
SPFPolicy string // stored for reference
|
||||
DMARCPolicy string // stored for reference
|
||||
MaxUsers int
|
||||
MaxQuotaBytes int64
|
||||
CreatedAt time.Time
|
||||
DMARCRua string // monitoring address e.g. dmarc-abc123@domain.com; empty = disabled
|
||||
}
|
||||
|
||||
// ---- DMARC aggregate reports ----
|
||||
|
||||
// DMARCReport is a parsed RFC 7489 aggregate report received at the monitoring address.
|
||||
type DMARCReport struct {
|
||||
ID int64
|
||||
DomainID int64
|
||||
OrgName string
|
||||
OrgEmail string
|
||||
ReportID string
|
||||
DateBegin int64 // unix timestamp
|
||||
DateEnd int64 // unix timestamp
|
||||
PolicyDomain string
|
||||
PolicyADKIM string
|
||||
PolicyASPF string
|
||||
PolicyP string
|
||||
PolicyPct int
|
||||
ReceivedAt time.Time
|
||||
Records []DMARCRecord
|
||||
}
|
||||
|
||||
// DMARCRecord is one IP-level row within a DMARCReport.
|
||||
type DMARCRecord struct {
|
||||
ID int64
|
||||
ReportID int64
|
||||
SourceIP string
|
||||
Count int
|
||||
Disposition string // none | quarantine | reject
|
||||
DKIMResult string // pass | fail | none
|
||||
SPFResult string // pass | fail | none
|
||||
HeaderFrom string
|
||||
EnvelopeFrom string
|
||||
DKIMDomain string
|
||||
DKIMSelector string
|
||||
SPFDomain string
|
||||
}
|
||||
|
||||
type User struct {
|
||||
|
||||
Reference in New Issue
Block a user