- Fix message extraction so that signing in the same pass through the milter

as verifying works correctly
This commit is contained in:
Scott Kitterman
2019-09-05 23:52:07 -04:00
parent 6f75a1a967
commit 5a68cf9e25
2 changed files with 4 additions and 3 deletions
+2
View File
@@ -7,6 +7,8 @@
- Fix startup logging so it provides information at a useful time - Fix startup logging so it provides information at a useful time
- Fix verify processing so missing (optional) i= tag doesn't cause the milter - Fix verify processing so missing (optional) i= tag doesn't cause the milter
to fail to fail
- 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)
+2 -3
View File
@@ -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=