Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7953e54ffb | |||
| bc98f9180f | |||
| a144791f2a | |||
| 55e1a6b54e | |||
| 7c3ff1905a | |||
| 7ec97a6001 |
@@ -1,3 +1,10 @@
|
||||
1.1.1 2019-09-06
|
||||
- Fix startup logging so it provides information at a useful time
|
||||
- Fix verify processing so missing (optional) i= tag doesn't cause the milter
|
||||
to fail (LP: #1842250)
|
||||
- Fix message extraction so that signing in the same pass through the milter
|
||||
as verifying works correctly
|
||||
|
||||
1.1.0 2019-04-12
|
||||
- Add SubDomains option to enable signing for sub-domains (LP: #1811535)
|
||||
- Port to python3 (LP: #1815502)
|
||||
|
||||
@@ -22,7 +22,7 @@ python3 setup.py install --single-version-externally-managed --record=/dev/null
|
||||
For users of Debian Stable (Debian 9, Codename Squeeze), all dependencies are
|
||||
available in either the main or backports repositories:
|
||||
|
||||
[sudo] apt install python3-milter python3-nacl python3-ipaddress python3-dnspython
|
||||
[sudo] apt install python3-milter python3-nacl python3-dnspython
|
||||
[sudo] apt install -t stretch-backports python3-authres python3-dkim
|
||||
|
||||
The preferred method of installation is from PyPi using pip (if distribution
|
||||
@@ -33,7 +33,7 @@ packages are not available):
|
||||
Using pip will cause required packages to be installed via easy_install if they
|
||||
have not been previously installed. Because pymilter and PyNaCl are compiled
|
||||
Python extensions, the system will need appropriate development packages and
|
||||
an C compiler. Alternately, install these dependencies from dsitribution/OS
|
||||
an C compiler. Alternately, install these dependencies from distribution/OS
|
||||
packages and then pip install dkimpy_milter.
|
||||
|
||||
The milter will work with either py3dns (DNS) or dnspython (dns), preferring
|
||||
|
||||
@@ -177,8 +177,9 @@ class dkimMilter(Milter.Base):
|
||||
except:
|
||||
# Don't error out on unparseable AR header fiels
|
||||
pass
|
||||
# Check or sign DKIM
|
||||
# Check and/or sign DKIM
|
||||
self.fp.seek(0)
|
||||
txt = self.fp.read()
|
||||
if milterconfig.get('Domain'):
|
||||
domain = milterconfig.get('Domain')
|
||||
else:
|
||||
@@ -187,12 +188,10 @@ class dkimMilter(Milter.Base):
|
||||
self.fdomain = _get_parent_domain(self.fdomain, domain)
|
||||
if ((self.fdomain in domain) and not milterconfig.get('Mode') == 'v'
|
||||
and not self.external_connection):
|
||||
txt = self.fp.read()
|
||||
self.sign_dkim(txt)
|
||||
if ((self.has_dkim) and (not self.internal_connection) and
|
||||
(milterconfig.get('Mode') == 'v' or
|
||||
milterconfig.get('Mode') == 'sv')):
|
||||
txt = self.fp.read()
|
||||
self.check_dkim(txt)
|
||||
if self.arresults:
|
||||
h = authres.AuthenticationResultsHeader(authserv_id=
|
||||
@@ -289,7 +288,11 @@ class dkimMilter(Milter.Base):
|
||||
self.dkim_comment = str(x)
|
||||
if milterconfig.get('Syslog'):
|
||||
syslog.syslog("check_dkim: {0}".format(x))
|
||||
try:
|
||||
# i= is optional and dkimpy is fine if it's not provided
|
||||
self.header_i = codecs.decode(d.signature_fields.get(b'i'), 'ascii')
|
||||
except TypeError as x:
|
||||
self.header_i = None
|
||||
self.header_d = codecs.decode(d.signature_fields.get(b'd'), 'ascii')
|
||||
self.header_a = codecs.decode(d.signature_fields.get(b'a'), 'ascii')
|
||||
if res:
|
||||
@@ -380,10 +383,10 @@ def main():
|
||||
own_socketfile(milterconfig, socketname)
|
||||
drop_privileges(milterconfig)
|
||||
sys.stdout.flush()
|
||||
Milter.runmilter(miltername, socketname, 240)
|
||||
if milterconfig.get('Syslog'):
|
||||
syslog.syslog('dkimpy-milter started:{0} user:{1}'
|
||||
syslog.syslog('dkimpy-milter starting:{0} user:{1}'
|
||||
.format(pid, milterconfig.get('UserID')))
|
||||
Milter.runmilter(miltername, socketname, 240)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user