From 24cfe01d959cf7b029c9a26c4aedf2e4471336d6 Mon Sep 17 00:00:00 2001 From: fkrone Date: Thu, 4 Jun 2015 19:04:27 +0200 Subject: [PATCH] Fixing stupid bug with non existing variable. Copy & paste fail. Finding a default key for recipient in domain keymap crashed mailgate. --- gpg-mailgate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gpg-mailgate.py b/gpg-mailgate.py index a2afd0d..5ed82c6 100755 --- a/gpg-mailgate.py +++ b/gpg-mailgate.py @@ -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!