0Fix variable initialization so mailformed mails missing body From do not

cause a traceback (LP: #1844161)
This commit is contained in:
Scott Kitterman
2019-09-16 20:05:11 -04:00
parent 94538ffa6b
commit 5322c81027
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -54,6 +54,7 @@ class dkimMilter(Milter.Base):
self.privatersa = privateRSA
self.privateed25519 = privateEd25519
self.fp = None
self.fdomain = ''
@Milter.noreply
def connect(self, hostname, unused, hostaddr):
@@ -133,7 +134,7 @@ class dkimMilter(Milter.Base):
try:
self.fdomain = self.author.split('@')[1].lower()
except IndexError as er:
self.fdomain = '' # self.author was not a proper email address
pass # self.author was not a proper email address
if (milterconfig.get('Syslog') and
milterconfig.get('debugLevel') >= 1):
syslog.syslog("{0}: {1}".format(name, val))