summaryrefslogtreecommitdiff
path: root/src/leap/mail/incoming/service.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/mail/incoming/service.py')
-rw-r--r--src/leap/mail/incoming/service.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/leap/mail/incoming/service.py b/src/leap/mail/incoming/service.py
index fea3ecb..da63dd8 100644
--- a/src/leap/mail/incoming/service.py
+++ b/src/leap/mail/incoming/service.py
@@ -459,6 +459,7 @@ class IncomingMail(Service):
signkey.fingerprint)
return decrmsg.as_string()
+ self._remove_headers(msg)
if msg.get_content_type() == MULTIPART_ENCRYPTED:
d = self._decrypt_multipart_encrypted_msg(
msg, encoding, senderAddress)
@@ -480,6 +481,10 @@ class IncomingMail(Service):
msg.add_header(self.LEAP_ENCRYPTION_HEADER,
self.LEAP_ENCRYPTION_DECRYPTED)
+ def _remove_headers(self, msg):
+ del msg[self.LEAP_ENCRYPTION_HEADER]
+ del msg[self.LEAP_SIGNATURE_HEADER]
+
def _decrypt_multipart_encrypted_msg(self, msg, encoding, senderAddress):
"""
Decrypt a message with content-type 'multipart/encrypted'.