On Mo, 09 Sep 2013, David Champion wrote:
> I confess I haven't dug my way through the entire debate on this, but so
> far I've seen argument along lines of: is it a necessary feature? if it
> is necessary, is it necessary to be supported in mutt per se, or can it
> be done externally?
>
> I haven't seen any discussion of what use models it would harm to
> support this in mutt. Does anyone have an argument against?
>
> Lacking that, I would say that if someone submits a good patch it should
> be considered. To me it's a good enhancement request.
I know almost nothing about the mutt code base, but I figured, it would
be better to start working with the code, then continue this discussion.
So here is a basic patch, that seems to work for me. I hope this will be
more valuable than to continue with this endless discussion.
regards,
Christian
--
The bureaucracy is expanding to meet the needs of an expanding bureaucracy.
--- send.c 2010-09-13 19:19:55.000000000 +0200
+++ send.c.new 2013-09-09 22:25:49.177397477 +0200
@@ -1543,6 +1543,23 @@
if (msg->content->next)
msg->content = mutt_make_multipart (msg->content);
+ if (WithCrypto)
+ {
+ if (msg->security)
+ {
+ if ((crypt_get_keys (msg, &pgpkeylist) == -1) ||
+ mutt_protect (msg, pgpkeylist) == -1)
+ {
+ msg->content = mutt_remove_multipart (msg->content);
+
+ FREE (&pgpkeylist);
+
+ decode_descriptions (msg->content);
+ goto main_loop;
+ }
+ }
+ }
+
/*
* make sure the message is written to the right part of a maildir
* postponed folder.