From 27e9d6ce50aa4957214fa6e7c56a6d24279f7b13 Mon Sep 17 00:00:00 2001 From: perennate Date: Sun, 22 Sep 2013 15:45:52 -0400 Subject: [PATCH] Remove the X-GPG-Encrypt-Cc header setting. I could not find any documention on this, it seems like this was a gpg-mailgate specific option but we now read in recipients directly from the command-line arguments. --- gpg-mailgate.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/gpg-mailgate.py b/gpg-mailgate.py index b78871e..88652d6 100755 --- a/gpg-mailgate.py +++ b/gpg-mailgate.py @@ -30,11 +30,6 @@ raw_message = email.message_from_string( raw ) from_addr = raw_message['From'] to_addrs = sys.argv[1:] -encrypted_to_addrs = list() -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'] - def send_msg( message, recipients = None ): if recipients == None: recipients = to_addrs @@ -90,14 +85,6 @@ keys = GnuPG.public_keys( cfg['gpg']['keyhome'] ) gpg_to = list() ungpg_to = list() -for enc in encrypted_to_addrs: - if enc in keys: - gpg_to.append( (enc, enc) ) - elif cfg.has_key('keymap') and cfg['keymap'].has_key(enc): - gpg_to.append( (enc, cfg['keymap'][enc]) ) - else: - ungpg_to.append(enc) - for to in to_addrs: if to in keys: gpg_to.append( (to, to) )