[HN Gopher] How to Delete Gmail Attachments Without Deleting the...
       ___________________________________________________________________
        
       How to Delete Gmail Attachments Without Deleting the Emails
        
       Author : strnisa
       Score  : 39 points
       Date   : 2022-08-14 20:58 UTC (2 hours ago)
        
 (HTM) web link (blog.unattach.app)
 (TXT) w3m dump (blog.unattach.app)
        
       | V__ wrote:
       | > From a technical point of view, the app deletes the attachment
       | by inserting a new email (the one without the attachment) into
       | your Gmail, and then deleting the original email (the one with
       | the attachments).
       | 
       | I hope there is a big warning when using the app, because this
       | makes these emails (maybe even the whole conversation chain?)
       | wortheless should they be needed as some kind of legal evidence.
        
       | gerdesj wrote:
       | Long article. Looks pretty. Lot of wankery.
       | 
       | I just can't be arsed to get excited about something I don't use.
       | 
       | Sorry.
        
       | nousermane wrote:
       | Mutt can do that. Open an email, "v", select attachment to
       | delete, "d". Done.
       | 
       | Works with gmail, too - assuming you've jumped through the
       | necessary hoops to enable full read-write IMAP access to your
       | account.
        
         | strnisa wrote:
         | Does it work for all types of attachments (e.g. inline) and can
         | be done across many emails at once? Can it add information
         | about what was removed?
        
           | nousermane wrote:
           | Yes, for any attachment/mime-section ("inline" is just a flag
           | of "Content-Disposition" header in corresponding mime
           | section).
           | 
           | No, across many emails, at least not without writing some
           | macros.
           | 
           | Sort-of, labeling deleted attachment. You can attach a label
           | to whole email, or edit raw, to edit/replace an attachment
           | with placeholder/label text. A bit fiddly, but doable with
           | some vim-fu.
        
             | strnisa wrote:
             | I've just tried doing this with Mutt. It's quite awkward,
             | but (after fidling with the interface) it did create a new
             | email with an empty attachment, i.e. the attachment is
             | still there, but it has zero bytes. Also, the original
             | email remained within Gmail. So, it seems that Mutt doesn't
             | work well with Gmail for this use case.
        
               | nousermane wrote:
               | > Also, the original email remained within Gmail.
               | 
               | That's a "feature" of gmail's IMAP server that is easy to
               | confuse for a client bug - see pugio's comment about
               | having exact same problem when using Thunderbird.
               | 
               | Gmail knows nothing about folders (where given email is
               | in exactly one of those), instead using "labels" (which
               | an email can have zero or more of). Problematic "feature"
               | here is that their IMAP interface exposes labels as
               | folders. So, if client asks server to delete message from
               | a folder, instead, server removes a label, message itself
               | remaining intact.
        
       | kevincox wrote:
       | Thunderbird can also do this. You can select which attachments to
       | remove.
       | 
       | IDK if it supports in-place quality reduction though.
        
         | pugio wrote:
         | I tried to use Thunderbird for this for a while, but there's a
         | weird bug where it creates copies of emails that have the
         | deleted attachments. You then have to delete those copies to
         | fully delete everything.
         | 
         | Switch to the featured app here and everything worked
         | seamlessly. Definitely worth it, as this way I don't have to
         | pay for Google storage and can clean out a bunch of pure junk
         | from my emails.
        
         | strnisa wrote:
         | Yes, you can remove attachments with Thunderbird, but it
         | requires a lot of configuration and it is highly error-prone.
        
           | psKama wrote:
           | A disclaimer about your relationship to unattach.app would be
           | very welcome when you submit a comment about it or about
           | their alternatives.
        
       | 1659447091 wrote:
       | This reminded me of a google apps script hack/solution on stack
       | overflow [1]
       | 
       | Havent used it in awhile so not sure if anything changed
       | 
       | [1] https://stackoverflow.com/questions/46434390/remove-an-
       | attac...
        
         | strnisa wrote:
         | Yes, Gmail API does not support this out of the box. However,
         | you can download the raw email, update it locally, upload the
         | modified copy, and then delete the original. This is how the
         | web app (Unattach) described in the blog post does it.
         | Disclaimer: I am the author.
        
           | teruakohatu wrote:
           | Any chance of an client side app?
        
             | strnisa wrote:
             | It is a client-side app that runs inside the browser. Or do
             | you mean something else?
        
       ___________________________________________________________________
       (page generated 2022-08-14 23:00 UTC)