- 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:
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
try:
|
||||||
self.fdomain = self.author.split('@')[1]
|
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))
|
||||||
|
|||||||
Reference in New Issue
Block a user