Add support for storing DKIM failed mails in a specified DiagnosticDirectory

This commit is contained in:
Scott Kitterman
2019-12-24 14:43:14 -05:00
parent db268764f5
commit 042005b38d
5 changed files with 14 additions and 7 deletions
+1
View File
@@ -413,6 +413,7 @@ class dkimMilter(Milter.Base):
self.dkim_domain = d.domain.lower()
else:
if self.conf.get('DiagnosticDirectory'):
tempfile.tempdir = self.conf.get('DiagnosticDirectory')
fd, fname = tempfile.mkstemp(".dkim")
with os.fdopen(fd, "w+b") as fp:
fp.write(txt)