summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcranix <cranix@hackerspace.pl>2017-02-28 23:21:01 +0100
committercranix <cranix@hackerspace.pl>2017-02-28 23:21:01 +0100
commitaf37e905711e93fbc08cf7954fbc856d119115c1 (patch)
tree559caab0a0ebc65ab3b1b657991672961f83dc31
parentb1ffa9f54643378193b62e863da8054796f5e7df (diff)
downloadkuvert-af37e905711e93fbc08cf7954fbc856d119115c1.tar.gz
kuvert-af37e905711e93fbc08cf7954fbc856d119115c1.tar.bz2
kuvert-af37e905711e93fbc08cf7954fbc856d119115c1.zip
Fixed bug in dropping mails due to lack of encryption key.
-rwxr-xr-xkuvert12
1 files changed, 9 insertions, 3 deletions
diff --git a/kuvert b/kuvert
index d0892f0..0bbba76 100755
--- a/kuvert
+++ b/kuvert
@@ -518,7 +518,15 @@ sub process_file
#Check if mail needs to be dropped due to
#encrypt option being specyfied and lack of key
- %actions = grep {$_ ne 'drop'} %actions;
+ #%actions = grep {$_ ne 'drop'} %actions;
+ foreach my $key (keys %actions)
+ {
+ if ($actions{$key} eq 'drop')
+ {
+ delete $actions{$key};
+ logit("Dropping mail to $key due to lack of encryption key");
+ }
+ }
my ($orig_header,$cryptoin);
# prepare various stuff we need only when encrypting or signing
@@ -649,8 +657,6 @@ sub findaction
#Encrypt or drop everything
if ($actions{$addr}=~/^encrypt/)
{
- my $thisaction=$1;
- $actions{$addr}=$thisaction;
$actions{$addr}=$specialkeys{$addr}||$email2key{$addr}||"drop";
}