- Added support for DiagnosticDirectory and updated dkimpy-milter specifics in

dkimpy-milter.conf.5
This commit is contained in:
Scott Kitterman
2018-03-09 17:10:48 -05:00
parent 4769bde19c
commit 36ff60d8d3
5 changed files with 20 additions and 17 deletions
+2
View File
@@ -13,6 +13,8 @@
- Added support for AuthservID option - Added support for AuthservID option
- Added support for InternalHosts option (ipaddress and either dns (dnspython) - Added support for InternalHosts option (ipaddress and either dns (dnspython)
or pydns (DNS) modules are now required) or pydns (DNS) modules are now required)
- Added support for DiagnosticDirectory and updated dkimpy-milter specifics in
dkimpy-milter.conf.5
0.9.3 2018-03-02 0.9.3 2018-03-02
- Fixup csl dataset processing for single item lists - Fixup csl dataset processing for single item lists
+4 -2
View File
@@ -30,11 +30,12 @@ File dataset implemented verified
0.9.4 (Alpha) 0.9.4 (Alpha)
AuthservID implemented verified AuthservID implemented verified
DiagnosticDirectory implemented verified
InternalHosts implemented verified InternalHosts implemented verified
0.9.5 (Beta) 0.9.5 (Beta)
Diagnostics
DiagnosticDirectory
SyslogSuccess SyslogSuccess
1.0.0 1.0.0
@@ -60,6 +61,7 @@ SignatureAlgorithm
Later Later
BaseDirectory BaseDirectory
Diagnostics (requires dkimpy changes)
DontSignMailTo DontSignMailTo
ExemptDomains ExemptDomains
ExternalIgnoreList ExternalIgnoreList
+3
View File
@@ -247,11 +247,14 @@ class dkimMilter(Milter.Base):
syslog.syslog('DKIM: Pass ({0})'.format(d.domain)) syslog.syslog('DKIM: Pass ({0})'.format(d.domain))
self.dkim_domain = d.domain self.dkim_domain = d.domain
else: else:
if milterconfig.get['DiagnosticDirectory']:
fd,fname = tempfile.mkstemp(".dkim") fd,fname = tempfile.mkstemp(".dkim")
with os.fdopen(fd,"w+b") as fp: with os.fdopen(fd,"w+b") as fp:
fp.write(txt) fp.write(txt)
if milterconfig.get('Syslog'): if milterconfig.get('Syslog'):
syslog.syslog('DKIM: Fail (saved as {0})'.format(fname)) syslog.syslog('DKIM: Fail (saved as {0})'.format(fname))
else:
syslog.syslog('DKIM: Fail ({0})'.format(d.domain))
if res: if res:
result = 'pass' result = 'pass'
else: else:
+3 -1
View File
@@ -46,7 +46,8 @@ defaultConfigData = {
'UserID' : 'dkimpy-milter', 'UserID' : 'dkimpy-milter',
'Canonicalization' : 'relaxed/simple', 'Canonicalization' : 'relaxed/simple',
'InternalHosts' : '127.0.0.1', 'InternalHosts' : '127.0.0.1',
'InternalHostsObj' : False 'InternalHostsObj' : False,
'DiagnosticDirectory' : ''
} }
@@ -334,6 +335,7 @@ def _readConfigFile(path, configData = None, configGlobal = {}):
'Canonicalization' : 'str', 'Canonicalization' : 'str',
'InternalHosts' : 'dataset', 'InternalHosts' : 'dataset',
'InternalHostsObj': 'bool', 'InternalHostsObj': 'bool',
'DiagnosticDirectory' : 'str'
} }
# check to see if it's a file # check to see if it's a file
+3 -9
View File
@@ -215,18 +215,12 @@ The value may include two different canonicalizations separated by a
slash ("/") character, in which case the first will be applied to the slash ("/") character, in which case the first will be applied to the
header and the second to the body. header and the second to the body.
.TP
.I Diagnostics (Boolean)
Requests the inclusion of "z=" tags in signatures, which encode the
original header field set for use by verifiers when diagnosing verification
failures. Not recommended for normal operation. [dkimpy-milter specific: also
increases the verbosity of Syslog logging if enabled.]
.TP .TP
.I DiagnosticDirectory (string) .I DiagnosticDirectory (string)
Directory into which to write diagnostic reports when message verification Directory into which to write diagnostic reports when message verification
fails on a message bearing a "z=" tag. If not set (the default), these files fails. If not set (the default), these files are not generated. [Unlike
are not generated. OpenDKIM, this applies to all messages, not just on messages bearing a "z=" tag
because dkimpy does not yet support "z=".]
.TP .TP
.I Domain (dataset) .I Domain (dataset)