- Added protection for malformed From addresses. If the From does not at

least have an '@' in the address, then the signing domain is not extracted
   and the message will not be signed
This commit is contained in:
Scott Kitterman
2018-03-15 20:42:49 -04:00
parent 7a3a7bfb43
commit f9483fea8c
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -1,8 +1,11 @@
0.9.6 UNRELEASED 0.9.6 2018-03-13
- Fixed typo in package installation section of README - Fixed typo in package installation section of README
- Added more to README about first run with systemd - Added more to README about first run with systemd
- Fixed typo in path for fallback location of the config file if one is not - Fixed typo in path for fallback location of the config file if one is not
provided provided
- Added protection for malformed From addresses. If the From does not at
least have an '@' in the address, then the signing domain is not extracted
and the message will not be signed
0.9.5.1 2018-03-10 0.9.5.1 2018-03-10
- Add conf file location to systemd unit file - Add conf file location to systemd unit file
+4 -1
View File
@@ -130,7 +130,10 @@ class dkimMilter(Milter.Base):
self.has_dkim += 1 self.has_dkim += 1
if lname == 'from': if lname == 'from':
fname, self.author = parseaddr(val) fname, self.author = parseaddr(val)
self.fdomain = self.author.split('@')[1] try:
self.fdomain = self.author.split('@')[1]
except IndexError as er:
self.fdomain = '' # self.author was not a proper email address
if (milterconfig.get('Syslog') and if (milterconfig.get('Syslog') and
milterconfig.get('debugLevel') >= 1): milterconfig.get('debugLevel') >= 1):
syslog.syslog("{0}: {1}".format(name, val)) syslog.syslog("{0}: {1}".format(name, val))