On Thu, Feb 28, 2013 at 05:03:23PM -0600, Will Fiveash wrote: > On Thu, Feb 28, 2013 at 03:35:44PM -0500, David Haguenauer wrote: > > * Stefan Wimmer <swim...@xs4all.nl>, 2013-02-28 12:55:39 Thu: > > > I recently started to sign all my mails and it took me little time > > > to find out that you can't delete attachments in signed/encrypted > > > mails ... ;-) > > > > I patched my copy of mutt so that it will let me delete attachments > > from encrypted messages (breaking the signature along the way). I can > > try to find said patch if there is some interest (it's a one-liner). > > Thanks for the idea. I've attached a patch that provides a > allow_signed_attach_delete boolean option which if set will allow one to > delete attachments from a signed message. See the patch for the > details.
I tweaked the description of the option a bit and have attached the modified patch. -- Will Fiveash
# HG changeset patch # User Will Fiveash <will.five...@oracle.com> # Date 1362093073 21600 # Branch HEAD # Node ID bd8e669e66a0add24813e41f7836fd80c85dbc03 # Parent 8c4b813160a898dc2014eaa85a49a4e0d3e30472 support new option to allow deletion of attachments in signed messages diff --git a/init.h b/init.h --- a/init.h +++ b/init.h @@ -149,6 +149,12 @@ ** and give it the same color as your attachment color (see also ** $$crypt_timestamp). */ + { "allow_signed_attach_delete", DT_BOOL, R_NONE, OPTALLOWSIGNATTCHDEL, 0 }, + /* + ** .pp + ** Controls whether attachments in signed e-mails can be deleted. Note, deleting attachments + ** will cause the signature verification of the affected message to fail. + */ { "arrow_cursor", DT_BOOL, R_BOTH, OPTARROWCURSOR, 0 }, /* ** .pp diff --git a/mutt.h b/mutt.h --- a/mutt.h +++ b/mutt.h @@ -314,6 +314,7 @@ { OPTALLOW8BIT, OPTALLOWANSI, + OPTALLOWSIGNATTCHDEL, OPTARROWCURSOR, OPTASCIICHARS, OPTASKBCC, diff --git a/recvattach.c b/recvattach.c --- a/recvattach.c +++ b/recvattach.c @@ -1119,7 +1119,8 @@ } #endif - if (WithCrypto && hdr->security & ~PGP_TRADITIONAL_CHECKED) + if (!option(OPTALLOWSIGNATTCHDEL) && WithCrypto && + (hdr->security & ~PGP_TRADITIONAL_CHECKED)) { mutt_message _( "Deletion of attachments from encrypted messages is unsupported.");
pgpFYO984WZ2s.pgp
Description: PGP signature