Fixing stupid bug with non existing variable. Copy & paste fail. Finding a default key for recipient in domain keymap crashed mailgate.

This commit is contained in:
fkrone 2015-06-04 19:04:27 +02:00
parent 0de0d6a1b1
commit 24cfe01d95
1 changed files with 3 additions and 3 deletions

View File

@ -317,9 +317,9 @@ def gpg_encrypt( raw_message, recipients ):
continue
# Check if there is a default key for the domain
splitted_address = address.split('@')
if len(splitted_address) > 1:
domain = splitted_address[1]
splitted_to = to.split('@')
if len(splitted_to) > 1:
domain = splitted_to[1]
if get_bool_from_cfg('enc_domain_keymap', domain):
log("Encrypt domain keymap has key '%s'" % cfg['enc_dec_keymap'][domain] )
# Check we've got a matching key!