Other(debug): Dump raw SMTP input to user's home dir

This commit is contained in:
James Houlahan
2023-01-19 13:30:28 +01:00
parent c70674471e
commit 59a29da054
3 changed files with 23 additions and 6 deletions

View File

@ -67,7 +67,9 @@ func (user *User) sendMail(authID string, from string, to []string, r io.Reader)
}
// If running a QA build, dump to disk.
debugDumpToDisk(b)
if err := debugDumpToDisk(b); err != nil {
user.log.WithError(err).Warn("Failed to dump message to disk")
}
// Compute the hash of the message (to match it against SMTP messages).
hash, err := getMessageHash(b)