* On 20 Feb 2015, David Haguenauer wrote: 
> Hi,
> 
> * Brian Salter-Duke <[email protected]>, 2015-02-21 07:11:58 Sat:
> > I can save the docx and pgf files, but having done so, I want to
> > delete them from the email, which of course I want to save. However
> > it will not let me.  It is something to do with the smime.p7s
> > signiture.
> 
> Presumably, Mutt doesn't let you delete attachments because doing so
> would render the signature invalid. If you don't care about breaking
> signatures, and would rather be able to delete attachments no matter
> what, I have a patch:
> 
>     http://www.kurokatta.org/hacks/src/mutt-1.5.13-rmattach.patch
> 
> It was meant for PGP-encrypted messages; hopefully it works for S/MIME
> as well.


Obviously we can't delete from encrypted messages, but the current
code actually prevents deletion from signed messages as well (and
gives an erroneous message).  David's patch:

--- orig.recvattach.c   Tue Nov 28 16:27:34 2006
+++ recvattach.c        Tue Nov 28 16:56:00 2006
@@ -1087,7 +1087,7 @@
        }
 #endif
 
-        if (WithCrypto && hdr->security & ~PGP_TRADITIONAL_CHECKED)
+        if (WithCrypto && (hdr->security & ENCRYPT))
         {
          mutt_message _(
            "Deletion of attachments from encrypted messages is unsupported.");

I do like that we resist deleting attachments that are part of signed
content.  But maybe we should allow deleting the signature itself, so
that there's a two-step process for deleting any attachment?  Just a
passing thought, put out for discussion if anyone is interested.

(In either case I think the error message is wrong and we need to
change that, but I'll wait for any discussion.)

-- 
David Champion • [email protected]

Reply via email to