Remove the encrypted to addrs, since that was gpg-mailgate-specific and is no longer used.
This commit is contained in:
parent
70692d221c
commit
3428deb759
|
@ -30,11 +30,6 @@ raw_message = email.message_from_string( raw )
|
||||||
from_addr = raw_message['From']
|
from_addr = raw_message['From']
|
||||||
to_addrs = sys.argv[1:]
|
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 ):
|
def send_msg( message, recipients = None ):
|
||||||
if recipients == None:
|
if recipients == None:
|
||||||
recipients = to_addrs
|
recipients = to_addrs
|
||||||
|
@ -90,14 +85,6 @@ keys = GnuPG.public_keys( cfg['gpg']['keyhome'] )
|
||||||
gpg_to = list()
|
gpg_to = list()
|
||||||
ungpg_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:
|
for to in to_addrs:
|
||||||
if to in keys:
|
if to in keys:
|
||||||
gpg_to.append( (to, to) )
|
gpg_to.append( (to, to) )
|
||||||
|
|
Loading…
Reference in New Issue