From 6e92ded37c4162177f3ebfcefb1488c486812c34 Mon Sep 17 00:00:00 2001 From: perennate Date: Fri, 9 Aug 2013 14:41:06 +0800 Subject: [PATCH] Greatly improve recipient selection mechanism. This resolves many errors, such as forwarding loops arising from mailing lists. --- gpg-mailgate.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/gpg-mailgate.py b/gpg-mailgate.py index f5de56e..00ab3cf 100755 --- a/gpg-mailgate.py +++ b/gpg-mailgate.py @@ -35,13 +35,6 @@ raw = sys.stdin.read() raw_message = email.message_from_string( raw ) from_addr = raw_message['From'] to_addrs = sys.argv[1:] -if verbose: - log("to_addrs: '%s'" % "', '".join(to_addrs)) - -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: