projects
/
app-edwardng.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c3455a5
)
Send unencrypted replies if encryption fails
author
Marius Gavrilescu
<marius@ieval.ro>
Mon, 7 Jul 2014 09:23:36 +0000
(12:23 +0300)
committer
Marius Gavrilescu
<marius@ieval.ro>
Mon, 7 Jul 2014 09:23:36 +0000
(12:23 +0300)
lib/App/EdwardNG.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/App/EdwardNG.pm
b/lib/App/EdwardNG.pm
index 256cf7d670d7031697918d079edeca7cc0805f8c..08b50eb827865e4b1e155cf2cee6f414dd605703 100644
(file)
--- a/
lib/App/EdwardNG.pm
+++ b/
lib/App/EdwardNG.pm
@@
-129,9
+129,11
@@
sub run {
Subject => 'Re: ' . $in->get('Subject'),
Data => $data);
Subject => 'Re: ' . $in->get('Subject'),
Data => $data);
+ my $email_unencrypted = $email->dup;
my $mg = mg always_trust => 1;
my $mg = mg always_trust => 1;
- $mg->mime_signencrypt($email, $in->get('From') =~ /<(.*)>/) and debug 'Could not encrypt message. GnuPG said ', stringify $mg->{last_message};
- sendmail $email
+ my $encrypt_failed = $mg->mime_signencrypt($email, $in->get('From') =~ /<(.*)>/);
+ debug 'Could not encrypt message, sending unencrypted. GnuPG said ', stringify $mg->{last_message} if $encrypt_failed;
+ sendmail $encrypt_failed ? $email_unencrypted : $email
}
1;
}
1;
This page took
0.010548 seconds
and
4
git commands to generate.