Codebase list dkimpy-milter / 51d0157
Update upstream source from tag 'upstream/1.1.2' Update to upstream version '1.1.2' with Debian dir ee1fd847b69f9563f38031cf7c85ba1f1a5e19e6 Scott Kitterman 4 years ago
5 changed file(s) with 37 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
0 1.1.2 2019-09-23
1 - Fix variable initialization so mailformed mails missing body From do not
2 cause a traceback (LP: #1844161)
3 - Catch more ascii encoding errors to improve resilience against bad data
4 (LP: #1844189)
5
06 1.1.1 2019-09-06
17 - Fix startup logging so it provides information at a useful time
28 - Fix verify processing so missing (optional) i= tag doesn't cause the milter
00 Metadata-Version: 1.1
11 Name: dkimpy-milter
2 Version: 1.1.1
2 Version: 1.1.2
33 Summary: Domain Keys Identified Mail (DKIM) signing/verifying milter for Postfix/Sendmail.
44 Home-page: https://launchpad.net/dkimpy-milter
55 Author: Scott Kitterman
5454 self.privatersa = privateRSA
5555 self.privateed25519 = privateEd25519
5656 self.fp = None
57 self.fdomain = ''
5758
5859 @Milter.noreply
5960 def connect(self, hostname, unused, hostaddr):
135136 try:
136137 self.fdomain = self.author.split('@')[1].lower()
137138 except IndexError as er:
138 self.fdomain = '' # self.author was not a proper email address
139 pass # self.author was not a proper email address
139140 if (milterconfig.get('Syslog') and
140141 milterconfig.get('debugLevel') >= 1):
141142 syslog.syslog("{0}: {1}".format(name, val))
142143 elif lname == 'authentication-results':
143144 self.arheaders.append(val)
144145 if self.fp:
145 self.fp.write(b"%s: %s\n" % (codecs.encode(name, 'ascii'), codecs.encode(val, 'ascii')))
146 try:
147 self.fp.write(b"%s: %s\n" % (codecs.encode(name, 'ascii'), codecs.encode(val, 'ascii')))
148 except:
149 # Don't choke on header fields with non-ascii garbage in them.
150 pass
146151 return Milter.CONTINUE
147152
148153 @Milter.noreply
259264
260265 def check_dkim(self, txt):
261266 res = False
267 self.header_a = None
262268 for y in range(self.has_dkim): # Verify _ALL_ the signatures
263269 d = dkim.DKIM(txt)
264270 try:
292298 self.header_i = codecs.decode(d.signature_fields.get(b'i'), 'ascii')
293299 except TypeError as x:
294300 self.header_i = None
295 self.header_d = codecs.decode(d.signature_fields.get(b'd'), 'ascii')
296 self.header_a = codecs.decode(d.signature_fields.get(b'a'), 'ascii')
301 try:
302 self.header_d = codecs.decode(d.signature_fields.get(b'd'), 'ascii')
303 self.header_a = codecs.decode(d.signature_fields.get(b'a'), 'ascii')
304 except Exception as x:
305 self.dkim_comment = str(x)
306 if milterconfig.get('Syslog'):
307 syslog.syslog("check_dkim: {0}".format(x))
308 self.header_d = None
309 if not self.header_a:
310 self.header_a = 'rsa-sha256'
297311 if res:
298312 if (milterconfig.get('Syslog') and
299313 (milterconfig.get('SyslogSuccess') or
313327 syslog.syslog('DKIM: Fail (saved as {0})'
314328 .format(fname))
315329 else:
316 syslog.syslog('DKIM: Fail ({0})'.format(d.domain.lower()))
330 if milterconfig.get('Syslog'):
331 if d.domain:
332 syslog.syslog('DKIM: Fail ({0})'
333 .format(d.domain.lower()))
334 else:
335 syslog.syslog('DKIM: Fail, unextractable domain')
317336 if res:
318337 result = 'pass'
319338 else:
320339 result = 'fail'
321340 res = False
322 self.arresults.append(
323 authres.DKIMAuthenticationResult(result=result,
341 if self.header_d:
342 self.arresults.append(
343 authres.DKIMAuthenticationResult(result=result,
324344 header_i=self.header_i,
325345 header_d=self.header_d,
326346 header_a=self.header_a,
327347 result_comment=
328348 self.dkim_comment)
329349 )
350 self.header_a = None
330351 return
331352
332353 # get parent domain to be signed for if fdomain is a subdomain
00 Metadata-Version: 1.1
11 Name: dkimpy-milter
2 Version: 1.1.1
2 Version: 1.1.2
33 Summary: Domain Keys Identified Mail (DKIM) signing/verifying milter for Postfix/Sendmail.
44 Home-page: https://launchpad.net/dkimpy-milter
55 Author: Scott Kitterman
2929
3030 setup(
3131 name='dkimpy-milter',
32 version='1.1.1',
32 version='1.1.2',
3333 author='Scott Kitterman',
3434 author_email='scott@kitterman.com',
3535 url='https://launchpad.net/dkimpy-milter',