1// Package dmarcdb stores incoming DMARC aggrate reports and evaluations for outgoing aggregate reports.
2//
3// With DMARC, a domain can request reports with DMARC evaluation results to be
4// sent to a specified address. Mox parses such reports, stores them in its
5// database and makes them available through its admin web interface. Mox also
6// keeps track of the evaluations it does for incoming messages and sends reports
7// to mail servers that request reports.
8//
9// Only aggregate reports are stored and sent. Failure reports about individual
10// messages are not implemented.
11package dmarcdb
12
13import (
14 "github.com/mjl-/mox/mox-"
15)
16
17// Init opens the databases.
18//
19// The incoming reports and evaluations for outgoing reports are in separate
20// databases for simpler file-based handling of the databases.
21func Init() error {
22 if _, err := reportsDB(mox.Shutdown); err != nil {
23 return err
24 }
25 if _, err := evalDB(mox.Shutdown); err != nil {
26 return err
27 }
28 return nil
29}
30