Greatly improve recipient selection mechanism.

This resolves many errors, such as forwarding loops arising from mailing lists.
This commit is contained in:
perennate 2013-08-09 14:41:06 +08:00 committed by Igor Rzegocki
parent 9c6a1ecfc8
commit 6e92ded37c
1 changed files with 0 additions and 7 deletions

View File

@ -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: