Fixed bug in dropping mails due to lack of encryption key.

master
cranix 2017-02-28 23:21:01 +01:00
parent b1ffa9f546
commit af37e90571
1 changed files with 9 additions and 3 deletions

12
kuvert
View File

@ -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";
}