From 2b3f792271a24c7313dd933a08506d5fcb96ff87 Mon Sep 17 00:00:00 2001 From: Igor Rzegocki Date: Mon, 15 Apr 2013 15:15:45 +0200 Subject: [PATCH] Remove X-GPG-Encrypt-To as is redundant (can be replaced with keymap/domains combination) --- gpg-mailgate.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/gpg-mailgate.py b/gpg-mailgate.py index b8f7c00..b5372a4 100755 --- a/gpg-mailgate.py +++ b/gpg-mailgate.py @@ -30,14 +30,6 @@ if raw_message.has_key('Cc'): to_addrs.extend( [e[1] for e in email.utils.getaddresses([raw_message['Cc']])] ) if raw_message.has_key('Bcc'): to_addrs.extend( [e[1] for e in email.utils.getaddresses([raw_message['Bcc']])] ) -if raw_message.has_key('X-GPG-Encrypt-To'): - tmp_list = list() - tmp_list.extend( [e[1] for e in email.utils.getaddresses([raw_message['X-GPG-Encrypt-To']])] ) - encrypted_to_addrs.extend( [e for e in tmp_list if e in to_addrs] ) - for eaddr in encrypted_to_addrs: - if eaddr in to_addrs: - to_addrs.remove( eaddr ) - del raw_message['X-GPG-Encrypt-To'] if raw_message.has_key('X-GPG-Encrypt-Cc'): encrypted_to_addrs.extend( [e[1] for e in email.utils.getaddresses([raw_message['X-GPG-Encrypt-Cc']])] ) del raw_message['X-GPG-Encrypt-Cc']