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
|
1.1.0 2019-04-12
|
||||||
- Add SubDomains option to enable signing for sub-domains (LP: #1811535)
|
- Add SubDomains option to enable signing for sub-domains (LP: #1811535)
|
||||||
- Port to python3 (LP: #1815502)
|
- 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
|
For users of Debian Stable (Debian 9, Codename Squeeze), all dependencies are
|
||||||
available in either the main or backports repositories:
|
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
|
[sudo] apt install -t stretch-backports python3-authres python3-dkim
|
||||||
|
|
||||||
The preferred method of installation is from PyPi using pip (if distribution
|
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
|
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
|
have not been previously installed. Because pymilter and PyNaCl are compiled
|
||||||
Python extensions, the system will need appropriate development packages and
|
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.
|
packages and then pip install dkimpy_milter.
|
||||||
|
|
||||||
The milter will work with either py3dns (DNS) or dnspython (dns), preferring
|
The milter will work with either py3dns (DNS) or dnspython (dns), preferring
|
||||||
|
|||||||
@@ -177,8 +177,9 @@ class dkimMilter(Milter.Base):
|
|||||||
except:
|
except:
|
||||||
# Don't error out on unparseable AR header fiels
|
# Don't error out on unparseable AR header fiels
|
||||||
pass
|
pass
|
||||||
# Check or sign DKIM
|
# Check and/or sign DKIM
|
||||||
self.fp.seek(0)
|
self.fp.seek(0)
|
||||||
|
txt = self.fp.read()
|
||||||
if milterconfig.get('Domain'):
|
if milterconfig.get('Domain'):
|
||||||
domain = milterconfig.get('Domain')
|
domain = milterconfig.get('Domain')
|
||||||
else:
|
else:
|
||||||
@@ -187,12 +188,10 @@ class dkimMilter(Milter.Base):
|
|||||||
self.fdomain = _get_parent_domain(self.fdomain, domain)
|
self.fdomain = _get_parent_domain(self.fdomain, domain)
|
||||||
if ((self.fdomain in domain) and not milterconfig.get('Mode') == 'v'
|
if ((self.fdomain in domain) and not milterconfig.get('Mode') == 'v'
|
||||||
and not self.external_connection):
|
and not self.external_connection):
|
||||||
txt = self.fp.read()
|
|
||||||
self.sign_dkim(txt)
|
self.sign_dkim(txt)
|
||||||
if ((self.has_dkim) and (not self.internal_connection) and
|
if ((self.has_dkim) and (not self.internal_connection) and
|
||||||
(milterconfig.get('Mode') == 'v' or
|
(milterconfig.get('Mode') == 'v' or
|
||||||
milterconfig.get('Mode') == 'sv')):
|
milterconfig.get('Mode') == 'sv')):
|
||||||
txt = self.fp.read()
|
|
||||||
self.check_dkim(txt)
|
self.check_dkim(txt)
|
||||||
if self.arresults:
|
if self.arresults:
|
||||||
h = authres.AuthenticationResultsHeader(authserv_id=
|
h = authres.AuthenticationResultsHeader(authserv_id=
|
||||||
@@ -289,7 +288,11 @@ class dkimMilter(Milter.Base):
|
|||||||
self.dkim_comment = str(x)
|
self.dkim_comment = str(x)
|
||||||
if milterconfig.get('Syslog'):
|
if milterconfig.get('Syslog'):
|
||||||
syslog.syslog("check_dkim: {0}".format(x))
|
syslog.syslog("check_dkim: {0}".format(x))
|
||||||
self.header_i = codecs.decode(d.signature_fields.get(b'i'), 'ascii')
|
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_d = codecs.decode(d.signature_fields.get(b'd'), 'ascii')
|
||||||
self.header_a = codecs.decode(d.signature_fields.get(b'a'), 'ascii')
|
self.header_a = codecs.decode(d.signature_fields.get(b'a'), 'ascii')
|
||||||
if res:
|
if res:
|
||||||
@@ -380,10 +383,10 @@ def main():
|
|||||||
own_socketfile(milterconfig, socketname)
|
own_socketfile(milterconfig, socketname)
|
||||||
drop_privileges(milterconfig)
|
drop_privileges(milterconfig)
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
Milter.runmilter(miltername, socketname, 240)
|
|
||||||
if milterconfig.get('Syslog'):
|
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')))
|
.format(pid, milterconfig.get('UserID')))
|
||||||
|
Milter.runmilter(miltername, socketname, 240)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ except ImportError: # If PyDNS is not installed, prefer dnspython
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='dkimpy-milter',
|
name='dkimpy-milter',
|
||||||
version='1.1.0',
|
version='1.1.1',
|
||||||
author='Scott Kitterman',
|
author='Scott Kitterman',
|
||||||
author_email='scott@kitterman.com',
|
author_email='scott@kitterman.com',
|
||||||
url='https://launchpad.net/dkimpy-milter',
|
url='https://launchpad.net/dkimpy-milter',
|
||||||
|
|||||||
Reference in New Issue
Block a user