mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 18:24:35 +03:00
implement outgoing dmarc aggregate reporting
in smtpserver, we store dmarc evaluations (under the right conditions). in dmarcdb, we periodically (hourly) send dmarc reports if there are evaluations. for failed deliveries, we deliver the dsn quietly to a submailbox of the postmaster mailbox. this is on by default, but can be disabled in mox.conf.
This commit is contained in:
17
store/cleanuptemp.go
Normal file
17
store/cleanuptemp.go
Normal file
@ -0,0 +1,17 @@
|
||||
package store
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/mjl-/mox/mlog"
|
||||
)
|
||||
|
||||
// CloseRemoveTempFile closes and removes f, a file described by descr. Often
|
||||
// used in a defer after creating a temporary file.
|
||||
func CloseRemoveTempFile(log *mlog.Log, f *os.File, descr string) {
|
||||
name := f.Name()
|
||||
err := f.Close()
|
||||
log.Check(err, "closing temporary file", mlog.Field("kind", descr))
|
||||
err = os.Remove(name)
|
||||
log.Check(err, "removing temporary file", mlog.Field("kind", descr))
|
||||
}
|
Reference in New Issue
Block a user