How to handle bogus replies from nicknym
I have 4 recipients, 2 have keys, 2 not. It fails consistently with the second unfound key. Happens both with TB and Pixelated.
Bundle bitmask_core: 0.10a1+99.gcfd8b50e on Debian Stretch.
2017-07-11T17:04:26+0200 [leap.bitmask.mail.sync_hooks#info] Mail post-sync hook: processing queued docs
2017-07-11T17:04:26+0200 [leap.bitmask.keymanager.KeyManager#debug] Getting key for me
2017-07-11T17:04:26+0200 [leap.bitmask.mail.smtp.gateway.SMTPDelivery#debug] Accepting mail for <me>...
2017-07-11T17:04:26+0200 [leap.bitmask.keymanager.KeyManager#debug] Getting key for mail1
2017-07-11T17:04:26+0200 [leap.common.http._HTTP11ClientFactory#info] Starting factory <leap.common.http._HTTP11ClientFactory instance at 0x7f8125b62440>
2017-07-11T17:04:27+0200 [leap.bitmask.keymanager.nicknym.Nicknym#warn] 404: Key not found. Request: https://nicknym.leap.se:6425?address=mail1
2017-07-11T17:04:27+0200 [leap.bitmask.mail.smtp.gateway.SMTPDelivery#warn] Warning: will send an unencrypted message (because "encrypted_only" is set to False).
2017-07-11T17:04:27+0200 [leap.bitmask.keymanager.KeyManager#debug] Getting key for mail2
2017-07-11T17:04:27+0200 [leap.bitmask.mail.smtp.gateway.SMTPDelivery#debug] Accepting mail for mail2
2017-07-11T17:04:27+0200 [leap.bitmask.keymanager.KeyManager#debug] Getting key for mail3
2017-07-11T17:04:27+0200 [leap.bitmask.mail.smtp.gateway.SMTPDelivery#debug] Accepting mail for <mail3>...
2017-07-11T17:04:27+0200 [leap.bitmask.keymanager.KeyManager#debug] Getting key for mail4
2017-07-11T17:04:27+0200 [_HTTP11ClientProtocol (TLSMemoryBIOProtocol),client] Unhandled Error
Traceback (most recent call last):
File "site-packages/twisted/internet/defer.py", line 1442, in gotResult
File "site-packages/twisted/internet/defer.py", line 1432, in _inlineCallbacks
File "site-packages/twisted/internet/defer.py", line 500, in errback
File "site-packages/twisted/internet/defer.py", line 567, in _startRunCallbacks
--- <exception caught here> ---
File "site-packages/twisted/internet/defer.py", line 653, in _runCallbacks
File "site-packages/leap/bitmask/mail/smtp/gateway.py", line 307, in not_found
File "site-packages/twisted/python/failure.py", line 346, in trap
File "site-packages/twisted/internet/defer.py", line 1386, in _inlineCallbacks
File "site-packages/leap/bitmask/keymanager/__init__.py", line 218, in _fetch_keys_from_server_and_store_local
exceptions.KeyError: 'openpgp'
2017-07-11T17:04:32+0200 [leap.common.http._HTTP11ClientFactory#info] Stopping factory <leap.common.http._HTTP11ClientFactory instance at 0x7f8125b62440>
2017-07-11T17:04:33+0200 [twisted.python.log#info] "127.0.0.1" - - [11/Jul/2017:15:04:32 +0000] "GET /mails?q=tag%3A%22inbox%22&p=1&w=25 HTTP/1.1" 200 97634 "http://localhost:9090/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) Qt/5.5.1 Safari/538.1"
2017-07-11T17:04:33+0200 [twisted.python.log#info] "127.0.0.1" - - [11/Jul/2017:15:04:33 +0000] "GET /tags HTTP/1.1" 200 414 "http://localhost:9090/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) Qt/5.5.1 Safari/538.1"
2017-07-11T17:04:43+0200 [twisted.python.log#info] "127.0.0.1" - - [11/Jul/2017:15:04:42 +0000] "GET /mails?q=tag%3A%22inbox%22&p=1&w=25 HTTP/1.1" 200 97634 "http://localhost:9090/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) Qt/5.5.1 Safari/538.1"
2017-07-11T17:04:48+0200 [twisted.python.log#info] "127.0.0.1" - - [11/Jul/2017:15:04:47 +0000] "GET /mails?q=tag%3A%22inbox%22&p=1&w=25 HTTP/1.1" 200 97634 "http://localhost:9090/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) Qt/5.5.1 Safari/538.1"
2017-07-11T17:04:48+0200 [twisted.python.log#info] "127.0.0.1" - - [11/Jul/2017:15:04:48 +0000] "GET /tags HTTP/1.1" 200 414 "http://localhost:9090/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) Qt/5.5.1 Safari/538.1"
Edited by kwadronaut