More reslience fixes

This commit is contained in:
Scott Kitterman
2019-09-23 11:35:44 -04:00
parent e63867d517
commit e6f8db9f94
+3
View File
@@ -265,6 +265,7 @@ class dkimMilter(Milter.Base):
def check_dkim(self, txt): def check_dkim(self, txt):
res = False res = False
self.header_a = None
for y in range(self.has_dkim): # Verify _ALL_ the signatures for y in range(self.has_dkim): # Verify _ALL_ the signatures
d = dkim.DKIM(txt) d = dkim.DKIM(txt)
try: try:
@@ -305,6 +306,7 @@ 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_d = None
if not self.header_a: if not self.header_a:
self.header_a = 'rsa-sha256' self.header_a = 'rsa-sha256'
if res: if res:
@@ -346,6 +348,7 @@ class dkimMilter(Milter.Base):
result_comment= result_comment=
self.dkim_comment) self.dkim_comment)
) )
self.header_a = None
return return
# get parent domain to be signed for if fdomain is a subdomain # get parent domain to be signed for if fdomain is a subdomain