‘Remove attachment’ option
Reported by Mark | June 28th, 2012 @ 06:36 PM
When storage on one’s mail service get close to the limit, it is useful to delete large attachments. However, one often wants to keep the original emails, and just remove the bulky attachment.
Mail.app can do this ('Message -> Remove Attachments’), and it would be handy to have a ‘Remove Attachment’ feature too in MailMate.
Comments and changes to this ticket
-
benny June 28th, 2012 @ 09:51 PM
- State changed from new to accepted
I would like such a feature myself. It is a non-trivial feature, in other words, don't expect it soon.
-
Philip December 15th, 2013 @ 10:50 PM
Might be worth looking at how Postbox does this as it works even with Gmail accounts (last time I used it, which was a while ago). It allows you to "detach" the attachments to your computer and changes the reference in the email to refer to the file locally. Thus the attachments still appear in the email but the files aren't on the server. Very sweet solution.
-
Marc Weidenbaum January 17th, 2014 @ 10:36 PM
Just adding a vote for this. Removing attachments has been a great way to manage my inbox size, yet retain a history of correspondence.
-
Ingo Lantschner February 18th, 2015 @ 07:27 AM
May I add an other +1 :-) It's one of the very few reasons, why I still have to use Apples Mail.
-
Alan March 11th, 2016 @ 10:20 AM
Another +1 for this one. I have to fire Thunderbird back up to delete attachments regularly.
-
Asaf Keller March 15th, 2016 @ 11:22 AM
I, too, would very much appreciate the ability to remove attachments.
-
benny June 13th, 2016 @ 08:36 AM
I haven't made any progress on this feature, but it's certainly one of the popular ones. I'll bump its priority, but I cannot make any promises.
(The tricky part is that such a feature requires re-uploading the message to the server since there is no way to tell an IMAP server to remove an attachment from a message.)
-
Gilbert Osmond October 4th, 2016 @ 01:32 AM
Bought MailMate 3 or 4 months ago, first time signed up for the forums here.
Bumping / +1'ing this feature. I have tons of messages in various IMAP folders with 20 & 30MB attachments. I've long since save as'ed the attachments to external Finder folders. Would like to purge the attachments (only) from the messages to free up remote IMAP storage.
-
Marco Smith October 27th, 2016 @ 02:55 PM
Bump! This feature is essential. Those of us who receive many attachments every day need a way to remove attachments both from local and from IMAP. Thanks!
-
T Bob December 11th, 2016 @ 12:16 PM
Bump again! This is essential for dealing with people who reply-all without stripping out the attachment. One thread can fill up my inbox so quickly!
-
Adrian Gill December 12th, 2016 @ 05:45 AM
I agree, much needed feature, please add as soon as possible, e.g. if the full solution is too complex for now, could there be some kind of workaround?
-
benny December 13th, 2016 @ 11:22 AM
@Adrian: A workaround would involve creating a script which could strip the attachment, delete the original message, and upload the new message. But this would likely involve a lot more work than I would have to do to implement this feature. I promise to look into exactly how much work this feature involves.
-
benny December 16th, 2016 @ 10:48 AM
There has been some progress on this features. It's still highly experimental. Enable the following preference:
defaults write com.freron.MailMate MmTwoPointOhFeaturesEnabled -bool YES
Then fetch the latest test release: Hold down ⌥ when clicking “Check Now” in the Software Update preferences pane (r5316). You should find a “Remove Attachment” option in the context sensitive menu of each attachment.
Be careful and look out for any bugs especially ones leading to loss of data. Note that undo works and that there is a custom key binding named
removeAttachments:
available which removes all attachments of all selected messages (no GUI for this yet). Be especially careful with using this since bugs could have disastrous effects.I've planned some improvements and options, but the most important part is that the basics work (removing and uploading the change to the IMAP server).
-
Edwin Willems December 16th, 2016 @ 05:18 PM
Have the latest version (I think) - Version 2.0BETA (6068) - but can't find that option...
-
benny December 16th, 2016 @ 06:16 PM
@Edwin: I haven't updated the 2.0BETA with this feature yet. It's only in the latest 1.9.6 test version (r5316).
-
Adrian Gill December 16th, 2016 @ 09:35 PM
Hi Benny,
I followed your instructions, and downloaded the latest which happened to be r5317.
As you stated, there's now a "Remove Attachment" option in the context menu for each attachment in an email.
To test this I went through the majority of emails I have with attachments and removed them. It has worked flawlessly every time so far - thank you! So your initial "experiment" seems to be working very well.
I like the approach you've taken, as it gives flexibility to choose which attachments to remove, and which to leave. With Apple's Mail app, if I remember correctly, it's "all or nothing", so it's nice to have a choice.
However, if at some point you decide to add an additional option, to allow removing all the attachments at once, I think that would also be very useful. I know I would find it so.
Many people seem to take the approach of filling up their emails with images and "junk" that are unwanted by the recipient. Such may have a purpose at first, in explaining their company, or providing a "brand", but after one or 2 emails, they're redundant, and possibly annoying as they often take up a lot of bytes, especially when they come in multiples of 5, which is often the case. Sadly the senders rarely have the courtesy to remove them from further emails to the same person.
To now have the ability to remove all such is excellent, so many thanks for taking time to resolve that.
I found no problems with this new option to-date, though will of course let you know if something shows up later. -
Adrian Gill December 16th, 2016 @ 09:47 PM
Hi Benny,
Followed the instructions you gave having downloaded r5317, then went through the majority of my mail that has attachments.
So far the new "Remove Attachment" option has worked flawlessly every time, so my thanks for taking time to resolve that, however experimental it is at the moment.
I like being able to choose which attachments to leave or not, unlike Apple Mail which I remember as being "all or nothing" - I feel that's an excellent approach. If in future you decide to add an additional feature to remove all attachments at once, I think that would also be useful, as I found that I did that with many of the emails I had with attachments (maybe 50% or more).
People seem too ready to take up space with images, banners, advertising, etc. that after one or two emails are redundant. It becomes annoying as they don't have the courtesy to remove such in further emails to the same person. So to now have the ability to remove all these space-taking, unwanted items, that are sometimes in multiple batches in the same email, and often add hundreds of kilobytes, is very welcome.
Thanks again,
Adrian -
Adrian Gill December 16th, 2016 @ 09:49 PM
Apologies I basically put the same thing twice, but it was "marked as spam" and I couldn't see the update. Not sure why it doesn't like me, but hopefully one or other of the updates is recognized as okay
-
benny December 18th, 2016 @ 12:06 PM
- State changed from accepted to fixcommitted
@Adrian: I'm marking all of your comments as not spam, but apparently that has not helped. I'm unfortunately not notified when comments are marked as spam :(
Note that I did add a custom key binding named
removeAttachments:
. It's a bit cumbersome, but you can setup a key binding for that. I'll be adding a “Remove Attachments” menu item for that although I'll probably not make a default key binding at first.I've done various GUI changes and some additions to this feature in the so-called 2.0BETA. This is a version of MailMate which is almost identical to 1.9.6, but it has a few new experimental features which probably won't be official before I some day do a 2.0 release. You can write me via “Help ▸ Send Feedback” if you would like a link to that. Here's what I wrote in the release notes:
- New: “Remove” button for attachments.
- New: Format string for creating sub folder for an attachment based on header values (General preferences pane).
- New: Insertion of local
file:
link when removing attachments. - New: Option to disable insertion of local
file:
link (General preferences pane).
Essentially this allows you to very easily save and then remove an attachment. It can, e.g., be saved in
~/Downloads/<account name>/<IMAP folder name/
or maybe~/Downloads/MailMate/<from name>
or whatever suits you best. When removing it then MailMate inserts afile:
URL in the email in order to still make it easy to find (as long as it still exists on disk). One can hit “Save” and then “Remove”, but it's also possible to hit “Remove” while holding down ⌥ to automatically do the save. If you save to a custom location then this path is inserted when removing the attachment. Finally, it's possible to setup custom key bindings, e.g., one could make one for( "saveAttachmentsInDownloads:", "removeAttachments:" )
in order to automatically save all attachments in the default download location and then remove the attachments (while inserting links). This would also work when selecting multiple messages. All of it should also work with undo/redo.Keep in mind that none of this has been heavily tested.
There's a known issue with Gmail for which the original message with the attachment(s) ends up in the “[Gmail]/All Mail” mailbox. I'm still not sure how/if I can work around that.
You can still add comments to this ticket, but I'm now considering this feature to be fully implemented (with a bit of bells and whistles).
-
Ingo Lantschner February 14th, 2017 @ 09:59 AM
Thanks Benny for implementing that feature! I discovered the context-menue (right-click on an attachment) yesterday! Works fine, no data-loss so long.
May be you want to implement an additional button near Quick Look and Save so that also newbies can find that feature?
-
benny February 14th, 2017 @ 10:24 AM
@Ingo: There's a 2.0 BETA which has a few more features than 1.9.6. This includes a “Remove” button and also a menu item to “Remove Attachments” from a selection of emails. It can currently be found here: http://updates.mailmate-app.com/2.0/archives/MailMate2Beta.tbz
-
Ingo Lantschner February 14th, 2017 @ 10:49 AM
So it is already implemented and even more powerfull - great! Thanks!
-
Marco Smith February 14th, 2017 @ 10:55 AM
I've also been testing this feature from day one and it's working like a charm - MUCH better than in Apple Mail. Thank you so much Benny!
-
benny February 14th, 2017 @ 11:21 AM
Thanks for the feedback. An important way to verify that it works as expected is to either check the message in another email client after it has been updated (well, deleted and replaced) or use “Message ▸ Reset...” in MailMate which forces MailMate to forget the message and then re-download it.
-
Marco Smith February 14th, 2017 @ 11:27 AM
Benny, thanks for the update. I checked as you suggested and it seems that Mailmate duplicates the emails in which I delete the attachments. It then keeps one copy with no attachment and one with the attachment.
-
Marco Smith February 14th, 2017 @ 11:30 AM
Checked again:
When I remove the attachment locally it says it was removed. If I check in Gmail (online) I can still see the attachment.
If I click reset locally I have now two copies in Mailmate - one with attachment and one without. -
benny February 14th, 2017 @ 12:10 PM
@Marco: I can reproduce this if the one with the attachment is in “[Gmail]/All Mail” and the one without is in “INBOX” (if that's where it was originally). It happens because MailMate does not move the old email to the Trash, but instead deletes it in the mailbox itself -- this is also the correct behavior. It also seems to happen no matter what IMAP settings I use in the Gmail web interface.
I'm not really sure how to work around this issue. It might work if I make a special case for Gmail where it moves the old copy to the Trash folder instead of trying to delete it permanently. You might be able to convince me to try this :) The downside of this is that the email is then going to be downloaded to the Trash folder in MailMate which is a waste of time/bandwidth. Hmm, this means that it would be better if MailMate simply did not try to “emulate” updating the message, but instead explicitly created a copy in MailMate without the attachment and uploaded this while moving the original to the Trash mailbox. It might sound like it's the same thing, but it's different in the sense that it'll avoid the extra download.
If anyone has better ideas with regard to how to work around this issue then let me know.
-
Marco Smith February 14th, 2017 @ 12:12 PM
Thanks for the feedback. The solution you propose sounds good tome.
-
Ingo Lantschner February 14th, 2017 @ 01:17 PM
@benny: Thanks for telling me how to test that thoroughly. I sent two mails from one of my mailboxes to an other one - one has been S/MIME signed the other not. Than I removed the attachment in both e-mails and quit MailMate. After that I started Apple Mail.
- The signed message displays fine in Apple Mail. Apple Mail also tells me, that the message has been tampered with - which is correct.
- The unsigned message is bit confused: A question mark appears and the text, telling me that the attachment has been removed is displayed as an attachment ;-) But this can be also because the attachment was an image in that case whereas the other wan an odt-file (zipped-xml I think).
Going back to Mail Mate: Both messages are displayed fine - but the signed message is still green as if it has not been changed! Even Message > Reset ... does not change that status.
Now I know why you had concerns when implementing that feature ;-)
-
Ingo Lantschner February 14th, 2017 @ 01:18 PM
S/MIME status is "tampered" (can not verify) which is OK here.
-
Ingo Lantschner February 14th, 2017 @ 01:23 PM
In MailMate the signature is shown as valid, which is NOT ok in that case (I guess).
-
benny February 14th, 2017 @ 02:41 PM
@Ingo: It does appear there is a serious error here. Thanks for letting me know. I'll look into it.
-
benny February 15th, 2017 @ 03:56 PM
@Ingo: Hold down ⌥ when clicking “Check Now” in the Software Update preferences pane. I've fixed the (quite embarrassing) bug and also improved various aspects of the error messages. It's now also better at reporting certain types of signature verification errors -- also when messages are both encrypted and signed (this also affects OpenPGP).
@Marco: I have not tried to work around the Gmail issue. It's not straightforward to do and I need to give it more thought.
-
Ingo Lantschner February 21st, 2017 @ 04:24 PM
Thanks benny for the really fast fix! I got the stable Version 1.9.6 (5347) in the meantime and tested the behavior of signed e-mails after removal of an attachment.
The status changes to "Bad signature for S/MIME message." (yellow) as expected.
Clicking on Show Details I get a confusing message, as it first says that the message has been signed with an untrusted certificate and below the certificate is marked as valid.
But I am not sure, if these dialog-boxes are under your control or just a system-thing.
Anyway, I would consider this a detail.
-
benny February 21st, 2017 @ 04:27 PM
There's a difference between signature and certificate. The signature is bad which means that it cannot be verified that the certificate was used to sign the message (the message might have been tampered with -- in this case it was intentionally done by removing an attachment). The certificate itself is valid.
Thanks for the feedback.
-
Ingo Lantschner February 21st, 2017 @ 04:32 PM
Just checked that same message (attachment removed with MailMate) with Apple Mail. It's displayed correctly. The dialog box explaining the reason for the failed verification of the s/mime certificate is better in Apple-Mail (makes more sense).
It's in German and translates more or less to to: "the message has been tampered or damaged after it has been signed by ingo@lantsch... ".
-
benny February 21st, 2017 @ 04:33 PM
Ah sorry, I was looking at the banner error message. I can see what you mean now and I'll see if I can do something about it.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Mac OS X email client.
People watching this ticket
Attachments
Referenced by
- 635 Feature Request: Option to discard attachments in Trash Removing attachments is (another) one of those long stand...