Bug 17513 - kmail remove attachments from mail
Summary: kmail remove attachments from mail
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Other
: NOR wishlist
Target Milestone: ---
Assignee: Till Adam
URL:
Keywords:
: 47448 57127 63772 68179 80349 84895 98342 106065 120466 (view as bug list)
Depends on:
Blocks:
 
Reported: 2000-12-21 15:03 UTC by Hermann Rochholz
Modified: 2009-12-06 16:58 UTC (History)
21 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Pipe through perl script to remove/detach attachments (6.66 KB, text/plain)
2007-03-04 12:47 UTC, JC Cardot
Details
kmailpt.pl v0.1.1 (7.46 KB, text/plain)
2007-03-07 11:00 UTC, ZJ Laczik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hermann Rochholz 2000-12-21 15:02:19 UTC
(*** This bug was imported into bugs.kde.org ***)

Package: kmail
Version: 2.01
Severity: wishlist
Installed from: Tar/TrueUnix

It would be nice that one can delete attachments out
of mails.

Attachments will be stored anyway and the mail 
can be held that the arrival time of the mail 
can be reproduced.

I do NOT know this feature from any mailer.

Kind regards
Hermann




(submitted via bugs.kde.org)
Comment 1 80984531 2002-06-28 10:26:49 UTC
Yes that would really be a nice feature.

Some people send lots of huge files as mail attachments that then clog up y=
our=20
mail folder.

It would be especially useful in combination with=20
wish #12384 "Save all attachments"

Maybe some remains like this should be left in the message after deleting t=
he=20
attachment:

[Developers_Manual.pdf]

[Installation_Manual.pdf]

(maybe also original file size MIME description ...)

Regards
Philipp
Comment 2 Tom 2002-12-07 02:42:14 UTC
I was going to suggest this too!  Good thing somebody already did. The ability
to delete an attachment from an email would be invaluable, IMO, because
sometimes it's important to keep records of correspondence but there's often no
reason to keep the actual attachments with the email text that was sent.

I'd write the code if I could.....   Does anyone read these wishlists? ;-)
Comment 3 coolian 2003-04-08 22:45:34 UTC
I hope they do, as I would love this. I don't want to see naked pictures of a former girlfriend 
anymore when I am re-reading her poetry. Help save my eyes! 
Comment 4 Ingo Klöcker 2003-04-11 14:38:49 UTC
*** Bug 57127 has been marked as a duplicate of this bug. ***
Comment 5 Martin Hodges 2003-06-02 00:00:28 UTC
Lookout from Office 2000 onwards would do this as would all the versions of 
Windows Messanging but not OE. Essential for those of us using an IMAP server as 
a mail archive. Most HTML mails contain a normal text mail and I would dearly 
like to remove the cru^H^H^Hrubbish that some people attach.
Comment 6 Carsten Burghardt 2003-09-06 13:34:11 UTC
*** Bug 63772 has been marked as a duplicate of this bug. ***
Comment 7 ml 2003-10-18 14:05:15 UTC
I've been using KMail for 2 years now and I daresay it was a nightmare : how many bugs it had that crashed the indexes, compelling me to rebuild them mail after mail (I'm using mbox format for disk space economy).

What I don't understand is why KMail, now a major MUA among the MUAs has not such a feature yet 3 years after the beginning of the project.
Eudora (which I consider as the best MUA ever) has it since the beginning of version 2 (1994 !).
Moreover Eudora doesn't even include the attachements in the Sent mailbox (only links to the attachments are there to remember the mail included attachments when sent).
Both methods (detach attachments in incoming mails and no attachments in outgoing mails) save hundreds of Mo on the disk.

db
Comment 8 Ingo Klöcker 2003-11-14 10:00:59 UTC
*** Bug 68179 has been marked as a duplicate of this bug. ***
Comment 9 Matej Cepl 2003-12-14 17:16:06 UTC
I believe there is a lot of reasons (especially in business context; think about using emails as evidence) why mungling with email messages is discouraged. Moreover, when using OpenPGP it would break signatures, wouldn't it?
Comment 10 Tim Middleton 2003-12-14 18:52:29 UTC
Consider the following situation. My sister often sends me illustrator and photoshop files she is working on. These tend to be in the 5 to 10 meg size range. Now I don't want to delete the emails from my sister, but after viewing/saving the graphics files i certainly don't want them taking up space in my email directories... in many cases she might send me half a dozen versoins of a work in progress... 

Furthermore the attachments in email tend to be BASE64 encoded which increases the size by 1/3, when stored with email. In short email is a crappy enough way to transfer files, but even a worse way to store them. 

Not that KMail has to do things this way but I'm just recalling how The Bat (which i previously used) used to do things. It did not store attachments in its mail database ever. All attachments are stripped while mail is coming in and placed in a special holding directory. The mails then refer to the binaries in the holding area. When the message was deleted the associated binary would be deleted as well. This was not only every efficient (didn't have to decode attachments every time one wanted to view/save one), but it was also extremely convenient. One could simply browse the attachment directory when looking for files one knew one received via mail. One could also delete the files either from the email interface, or simply on the disk.
Comment 11 Krishna Sethuraman 2003-12-14 20:17:25 UTC
---
I believe there is a lot of reasons (especially in business context; think about using emails as evidence) why mungling with email messages is discouraged. Moreover, when using OpenPGP it would break signatures, wouldn't it?
---

Good point; however, currently mailscanner (?) and some other software automatically scans for viruses and strips them out, automunging the mail.  I think providing the end-user the option to detach attachments, automatedly or otherwise, is preferable.

When the auto-detachment is done as as end-user choice, I see the workflow benefit as significant.  One can always keep a copy of the mail in its original form at the server end or in a separate 'log' mailbox -- providing auditability/traceability while allowing faster day-to-day mail manipulation.
Comment 12 Hamish Harvey 2003-12-15 11:56:19 UTC
---
I believe there is a lot of reasons (especially in business context; think about using emails as evidence) why mungling with email messages is discouraged.
---

Same could be said for deleting messages at all. Are we to keep all emails, complete with their attachments, in case we need to use them in evidence? A company may institute such a policy, by all means, but that isn't a reason for not providing the feature in KMail.
Comment 13 Thomas Zander 2003-12-15 16:06:53 UTC
Ok, many reasons have been given in support of this feature; I miss the 'Outlook has it' reason.. :-).
Comment 14 Eugene Nine 2003-12-15 16:15:21 UTC
Maybe because outlook couldn't do it, at least not without a third party app to pull them from the .pst or run on your excange server.  I would like to see this as well, pull the attachemts off and leave them in the same folders even.  This would allow searching of files to find them.  Back when I was stuck using Outlook and someone would ask me to find a file I had to search my documents folder then search in Outlook just in case I forgot to save the attachmet and thats not even mentioning haveing to delete them to keep from hitting the 2G limit on a pst.  Just a couple of ther reasons I made the switch.  Keep it flexable, make a setting to allow to seperate the attachments or leave them attached. 
Comment 15 Harshad 2004-01-08 05:42:23 UTC
This is a highly desirable feature. This will set apart KMail from all the email clients I know of. Moreover, it seems very easy to implement.

PS. This feature is the third highest voted, at the moment. A small fix should satisfy a lot of users out there...
Comment 16 Andreas Feldner 2004-01-08 09:57:01 UTC
As for comment #9: I don't believe deleting attachments would break signatures. AFAIK, signatures are implemented in a way that each mime part of the mail is signed separately (or not signed at all, built-in OpenPGP). Of course, neither mail header information nor the mime structure itself is signed, because that will/can be changed by any transfer agent (you can forward a signed mail as attachment, and the attachment is still correctly signed - some automated spam scanners change suspicious mails that way).
So, deleting attachments (= whole MIME parts of the message), while leaving the body alone, would not break a PGP signature on the body.
Comment 17 Thiago Macieira 2004-01-08 14:56:09 UTC
Replying to comment #16: PGP/MIME signatures sign a whole MIME section of the e-mail. When you send a signed e-mail with attachment, the tree looks like this:

Content-Type: multipart/signed
- Content-Type: multipart/mixed
-- Content-Type: text/plain -- the body of your e-mail
-- Content-Type: whatever -- your attachment
- Content-Type: application/pgp-signature

The signature signs the whole "multipart/mixed" section.

Then again, if you mess with existing e-mails, signatures should be dropped anyways, since they are no longer how you received them originally.
Comment 18 David Cornish 2004-01-08 15:05:11 UTC
Would it not be reasonable to check if an e-mail was signed and if so, warn the user before stripping attachments that the digital signature will be removed?  That way if the signature is important enough to be kept, the user will know that they need to keep the attachment and therefore cancel the operation.
Comment 19 Bartosz Malinowski 2004-03-18 12:13:26 UTC
> I miss the 'Outlook has it' reason.. :-). 

"The Bat!" has it--- :)))


 
 
 
Comment 20 Casper Planken 2004-03-18 14:06:16 UTC
> I miss the 'Outlook has it' reason.. :-). 

"Out-look" or "Look-out" reason? ;)
Comment 21 Bartosz Malinowski 2004-03-18 20:02:40 UTC
>  "Out-look" or "Look-out" reason? ;)

The latter, definitely. :)

b.
Comment 22 Christian Loose 2004-04-27 09:53:55 UTC
*** Bug 80349 has been marked as a duplicate of this bug. ***
Comment 23 David Precious 2004-06-04 19:16:47 UTC
I'd love this feature.  It's the one biggest thing that I'd like to see implemented in KMail.
Comment 24 Gerold Strobel 2004-06-13 15:41:46 UTC
Go for it. This would be really cool...and needed

I'll donate 100 EUR to the KDE project as soon as this is implemented.
Comment 25 Stephan Binner 2004-06-13 16:17:35 UTC
> I'll donate 100 EUR to the KDE project as soon as this is implemented.

Do you know this guy from down-under who implements stuff against pledges which he says he will use to help cover travel expenses to KDE events elsewhere on the earth? 100 Euro would be more than sufficient to make this wish his next target: http://kontact.org/shopping/sanders.php

Of course you may also donate to the KDE project and he may profit indirectly from travel reimbursements independent from implementing this feature.
Comment 26 Philipp Lehman 2004-06-15 10:34:51 UTC
On a related note, Pine can optionally strip attachments from outgoing messages as they are saved in the sent-messages folder.
Comment 27 Carsten Burghardt 2004-07-11 11:25:35 UTC
*** Bug 84895 has been marked as a duplicate of this bug. ***
Comment 28 Simon Bock 2004-07-14 10:35:54 UTC
I'd like to emphasize Comment #5 - especially for IMAP mail archive usage, this would save a lot.
No Re-Downloading of the silly attachment to a valuable eMail, and less space to argue about with the server admin...
What's the priority of this to the KMail developers ?
It has been around quite a while as I see...
Thanks!
Comment 29 Albert Thuswaldner 2004-08-17 16:19:09 UTC
Why not use this and somehow incoporate it into kmail: 

Http://www.pldaniels.com/ripmime/

It's under the BSD-license so there should not be a problem. 
Comment 30 Mathias Homann 2004-10-26 20:10:35 UTC
i want this too!
reason:
celebrimbor:/var/spool/imap/user/lemmy/Archiv/Job/Bewerbungen # du -sch .
191M    .
celebrimbor:/var/spool/imap/user/lemmy/Archiv/Job/Bewerbungen # ls *.| wc -l
    179

(my imap folder where i store job applications i have sent. but i definitively dont want to store each one with the attached 5 megs of cv and certificates and such...
Comment 31 Robert Delahunt 2004-12-11 14:59:38 UTC
First, I think KMail already does an excellent job.  Maybe what you want is a "please delete all email attachments" or "please delete attachments matching this extension / name / wildcard", which would be nice.  However, remember that Security Focus a while back said that KMail > Outlook. >:D
Comment 32 Hugo Costelha 2004-12-11 15:13:24 UTC
I think (as I do) people want this not because of security reasons, but simply because sometimes we want to keep messages but not some (or all) the attachemnts of those messages. As time goes by the space occupied by our e-mail folders get bigger and bigger, and this way it wouldn't become so huge so rapidly.

And ofcourse kmail does an excelent job, that's way we all use it... ;)

Hugo
Comment 33 Stephan Binner 2005-02-02 00:00:49 UTC
*** Bug 98342 has been marked as a duplicate of this bug. ***
Comment 34 Mathias Homann 2005-03-12 18:33:31 UTC
i think this should not be implemented as a filter for incoming mails only.
its ESPECIALLY in SENT mails where you really do not NEED to have the attachment twice or more often; once on disk (you did send it yourself after all), once in every mail in your Sent folder that contains it as an attachment.
Comment 35 Mathias Homann 2005-03-12 18:41:16 UTC
i mean, it would be nice to have a filter action that strips attachments from mails, but it would also be nice to open a mail, save an attachment, then keep the mail in some archive folder but REMOVE the attachment from the mail.

and YES i DO understand that this would break any gpg signature. but face it, how many gpg signed mails do you get?
besides, it would be simple to either warn the user about it, refuse to strip attachments from signed mails, or insert a line "this mail used to have a vaild gpg signature from $sender but an attachment has been removed by the recipicient and the signature is not valid anymore" or the likes.
Comment 36 Simon Bock 2005-03-12 20:00:40 UTC
Well, for my part I have moved over to Mozilla Thunderbird precisely because developers there finally addressed this feature. If you look at their bugzilla ID 2920, youl'll realize that it took ages over there as well. Developers seem to hate this feature.
Nevertheless it saves a _lot_ of space (and time, especially when using IMAP).
And now mos modern MUAs have it.
KMail should, too. And of course adjustable via prefs, for Sent (placing a link to the file instead of the file), as filter and manually.
Just my two cents.
Comment 37 Nathaniel Taylor 2005-03-12 22:48:26 UTC
I agree that abilty to remove attachments from sent and received mail 
would be extremely useful.  
Likewise, ability to keep just the plain text part of an email (or even strip all-html emails down to plain text).
Extending this further, converting other silly formats (e.g. m$word used to mail about one page of text in several tens or hundreds of KB) to text and putting the text back in the email would be nice too.  I already do this with a script, but a <buzz> seemlessly integrated system </buzz> would be better still.

One reason for this, from my perspective, is that it is nice to be able to keep a record of all correspondence, without piling up literally hundreds of times the necessary data for this record (plain text is very small!).

__________Now the specific point:___________
Please don't worry about "evidence" notions or any imagined/invented need to 
avoid changing emails from how the author wanted them.
     a) it is always possible to change emails anyway, e.g. by opening the file ~/Mail/inbox/cur/<file> with a text editor:  building into kmail makes it much easier but isn't suddenly providing some new potential for tricks!
     b) as pointed out already, there are many MTAs already that scan and modify emails.
     c) if kmail is worried about unacceptance in some environments if it has this feature, the feature could be put into kdeaddons or some other package, which could then be omitted from the worried organisation's installations.

I'm impressed by how early Eudora is reported as having this feature.
And I'm a little surprised by how kmail is still without, about 5 years after its suggestion.
But I should point myself out as someone who certainly won't be defecting to anything else:  kmail is the only MUA (I know of) that treats identities, incoming accounts and outgoing accounts properly (i.e. as not necessarily related!) and gives such flexible options for each identity -- it is amazingly good.

Comment 38 Pascal Niklaus 2005-03-13 09:00:04 UTC
I too would welcome the possibility to remove attachment. A normal workflow is to save important docs you receive by mail in another directory, but often one does not want to delete the original mail because it contains important infos. But if the attachment is large, it would be nice to be able to remove it (but a commend should be added to the mail that the attachment had been there, and its lengths and maybe a md5sum to identify it).

I have seen several references to Eudora in this thread and would like to comment on that. I think Eudora has a particularly poor way to handle attachments because they are kept separate from the mails they belong too. In fact, if you delete a mail the attachment stays, which is not very sensible (think of SPAM). Also, if you receive attachments with the same name Eudora will start to number them with suffixex 1,2,3 etc, and it is difficult to keep track of them.
Comment 39 Mathias Homann 2005-03-13 13:55:21 UTC
re: simon bock
where in thunderbird can you remove attachments from stored mails? i got the latest release here (1.0) and i cant find it...
Comment 40 Simon Bock 2005-03-15 11:00:35 UTC
Re: Mathias Hormann

Since the beginning of 2004, you can do this via Extension:
http://forums.mozillazine.org/viewtopic.php?p=537478#537478
http://www.supportware.net/mozilla/AttachmentTools.xpi

The extension works very well, although the feature has been considered important enough for integration into the trunk.

It is established in the current Release Candidate 1.1 builds, and will be officially in the trunk for 1.1

Has been a long story, discussed in https://bugzilla.mozilla.org/show_bug.cgi?id=2920 since 1999 (when this feature appaered in Outlook, too.)
Comment 41 Karsten Dambekalns 2005-04-24 10:42:31 UTC
Well, I fully agree - this is missing, and hitting hard.

mutt has this feature, too. It refuses to delete attachments from signed mails, btw.
Comment 42 Thiago Macieira 2005-05-21 16:32:43 UTC
*** Bug 106065 has been marked as a duplicate of this bug. ***
Comment 43 Bastian Venthur 2005-10-10 10:43:07 UTC
I'd like to see this feature too. The argument "no other mailclient has this feature, so we don't need it too" seems not very reasonable to me -- if the userbase wants this feature, it should be considered.
Comment 44 Shriramana Sharma 2005-10-23 15:20:02 UTC
Late betas of the Mozilla Suite (even before it became SeaMonkey) had this feature. Maybe the latest Thunderbird has it.

But this is immaterial. What we want is for KMail to have it. KMail has so many other great features that both SeaMonkey Mail and Thunderbird have not, and this should also be there. I've cast 20 votes.
Comment 45 Peer Frank 2005-10-23 18:23:52 UTC
The number of votes (since 2000!) makes it clear that this feature is badly needed. Is there any activity on the subject ? Is it a big deal ? The simplest option: remove attachment and replace with file name would be be tremendous. kmail should not have to do more.
Comment 46 Bastian Venthur 2005-10-23 18:45:05 UTC
Please just simply copy the features of Thunderbird. Allthough I've used it temporary (to remove my attachments from my imap account) -- I found a serious usability bug in TB which KMail should not simply copy:

You can only remove all atachments from *one* mail at once. 

Imagine a list of hunreds (thousands!) of mails with attachments you want to remove. The simplest solution would (should!) be: mark all mails / rightclick / remove attachements / ready.

In TB you cannot remove attachments of more than one mail at once.
Comment 47 mani 2005-10-24 12:27:14 UTC
taking reference to the last post (I'm not using TB):
is it only possible to remove *all* attachments from an email or can you selectively remove *any* attachment from one email?
Comment 48 Bastian Venthur 2005-10-24 12:33:40 UTC
you can remove all attachments at once or just a/the single/marked one/s.

But more important is the point, that you cannot mark more than one mail and let TB remove all attachments.
Comment 49 Stephan Herrmann 2005-11-23 22:08:14 UTC
Even pine lets you delete attachments before saving a message.
So what I do _frequently_ is: shut-down kmail, start pine, delete
attachments, save message (which is much less comfortable than in kmail
of course), restart kmail. 
Life could be so much simpler ;-)
Comment 50 Carsten Burghardt 2006-01-19 19:39:19 UTC
*** Bug 120466 has been marked as a duplicate of this bug. ***
Comment 51 GB 2006-02-03 10:26:26 UTC
This wish is up to #3 rank in the most voted for bugs.
Is nobody looking at the votes? Does no developer long for the glory?
:-)
Comment 52 Hermann Schwarting 2006-02-15 00:28:55 UTC
This is the workaround I use: I installed alterMIME from [ http://www.pldaniels.com/altermime/ ] (package 'altermime' on Debian) and created a filter rule for it. Use the filter action "Pipe Through" with 'altermime --removeall --input=-'. Be sure not to apply this filter to all incoming messages. You might apply it to all outgoing messages. Choose a nice name and icon and add it to the Apply Filter menu. Now you can remove all attachments of single or whole selections of messages.
Comment 53 David Precious 2006-02-15 10:27:29 UTC
Great workaround from Hermann Schwarting using alterMIME - not quite as nice as having the facility built in to kmail, but at least it works!

Someone buy that man a beer :-)
Comment 54 Bastian Venthur 2006-02-15 12:04:52 UTC
WARNING: Don't use this filter with dIMAP, I've just lost a few hundred mails!

As usual dIMAP suport is *very* broken and nobody seems to care :(
Comment 55 Bastian Venthur 2006-02-15 13:55:09 UTC
PS: How to reproduce: just remove some attachments, and see how kmail fails to propagate the changes to the server (by checking your mail on another box or by ssh'ing to the mailserver)

Now 'recreate the index' and watch kmail deleting of your mails in this directory :(
Comment 56 Jedd 2006-02-15 13:59:21 UTC
Well, with local mail directory it works a treat.  Thanks,
Hermann -- much appreciated.

It'd be nice to have a reference in the email body to say
that an attachment (and maybe a name and size of same?) has
been deleted -- any ideas on how to implement this one?  I'm
guessing 'pipe through' a shell script that calls AlterMIME
to append a given text suffix *and* remove the attachment,
perhaps?

I notice that with the AlterMIME filter (as above) when I
applied it to some messages, the little paperclip (in the
message index list) still appears next to the particular
message.  This is handy as it lets me know that there used
to be an attachment to the message, but I'm not sure if that's
a bug with KMail, an oversight with the way AlterMIME removes
the attachment and modifies the original mail, or what.  Ie,
I'm not sure if that paper-clip reminder will still be there
against each message in the future.
Comment 57 Eugene Nine 2006-03-02 14:40:32 UTC
I'll add my vote as well.  There should be a detach as well as save option in the menu.  Possibly show a different icon when the attachment is detached and/or make a note in the message body (Lotus Notes down this when an attachment is deleted).
Also make is available in a filter so that we can say all messages from <adderss> detach and store attachment in this folder and move message to that folder.
Comment 58 Shriramana Sharma 2006-03-03 03:17:01 UTC
> There should be a detach as well as save option

What is the difference between "detach" and "save"? The Save option already exists. Detach is to save and delete.

There should be the current "Save", and also a "Detach" and a "Delete" option for people who don't want to save the attachment but want to remove it.
Comment 59 Darthwonka 2006-04-03 22:43:41 UTC
Just FYI, Mozilla Thunderbird 1.5 has this functionality now.

+1 vote from me
+5 for my co-workers.
Comment 60 Jakub Panachida 2006-06-10 09:27:51 UTC
Before KMail I was using mutt and it has the feature since I remember.
Comment 61 quercus 2006-06-13 10:41:29 UTC
I'd like to advocate for the Eudora method of handling attachments: incoming attachments are always stripped from the message and saved in a folder; links are used for all attachments. I wouldn't care if this was an option, as long as I can make it automatic and universal. Thunderbird can't do that.

Comment #38 states that deleting a message in Eudora doesn't remove the attachments. It's true that moving a message to the trash doesn't delete attachments, but deleting a message from the trash does (as an option).

This is must-have feature for me. Sadly, Eudora is the only program I've found that gets this right, and so is one of the apps that binds me to Windows.
Comment 62 Bartosz Malinowski 2006-06-17 12:07:47 UTC
Hello,

I cast my vote for this. Besides Eudora, The Bat! also has this for some time already.

BTW, I strongly invite everybody to vote for this wishlist item: 
Bug 128986: Can't Paste HTML-formatted text into Kmail mail editor window

Kind regards,
b.
 
Comment 63 Bernhard E. Reiter 2006-06-29 20:28:21 UTC
Reassigning to component owner 
because I do not know if Don is actually still working on it.
(Last post of Don to kmail-devel seems to be February 2006 and this
is a most wanted feature.).
Comment 64 Don Sanders 2006-06-30 02:51:12 UTC
That's fine with me. I'm not currently actively working on it.
Comment 65 Eugene Nine 2006-07-10 16:57:57 UTC
How about adding save/delete attachment as an option for the filters as well.  This was we could say all mail from user@domain.com save attachemts to folder y.  
Comment 66 Peer Frank 2006-07-11 07:36:48 UTC
this wish is on the list since 6 years now. What is the prospect of its realisation ?
Comment 67 Nicolas Brisset 2006-07-11 08:10:09 UTC
I guess this will be done as part of the akonadi component currently in development. KDE4 will bring some major refactoring, especially in the PIM area. So, hopefully this will be part of it. Maybe someone with more insight will be able to make a clearer statement, though...
Comment 68 Adam Funk 2006-10-11 16:52:04 UTC
*Please* add this.  The only reason I haven't switched to Thunderbird in order to get this feature is that Thunderbird doesn't suppport maildir format.  I am seriously considering switching to mutt so I can have maildir and deleting attachments.
Comment 69 mail 2006-10-11 17:02:54 UTC
Adam, the solution in comment #52 works fine for local mail storage.
Comment 70 Joe Biden 2006-10-12 04:06:57 UTC
On Wednesday 11 October 2006 11:03, mail@puchalla-online.de wrote:
> ------- Adam, the solution in comment #52 works fine for local mail
> storage.


It seems to make my emails go to never-never land...not in the trash, but they 
just disappear with the command:
altermime --remove-all input=-
in single quotes...
Comment 71 mail 2006-10-12 18:01:18 UTC
Do not use the quotes in the KMail filter, of course. They have been used to separate the command from the text.
altermime is installed?
Comment 72 Joe Biden 2006-10-12 19:58:02 UTC
On Thursday 12 October 2006 12:01, mail@puchalla-online.de wrote:
> ------- Do not use the quotes in the KMail filter, of course. They have
> been used to separate the command from the text. altermime is installed?


Yes, figured it out. It was a permissions issue. All fixed now.
Comment 73 Mathias Homann 2006-10-25 08:13:59 UTC
re #59 where in current TB did you find that?
(current = 1.5.0.7)
Comment 74 Adam Funk 2006-10-25 10:44:22 UTC
(Reply to #73)
Right-click on the attachment in the message display: the options include "Detach" and "Detach all", which are equivalent to "save and delete from the mail" and "save all and delete them from the mail".-
Comment 75 Mathias Homann 2006-10-25 11:59:46 UTC
seems like this feature has the same problems that the extension used to have; when used on mails on an imap server, it produces duplicates of the mails in question, with those duplicates having no attachments anymore... but since the originals dont get deleted, it doesnt really help.
Comment 76 Martin Scharrer 2006-12-08 20:57:12 UTC
I like this feature. There should also be on option to enable this globally but also a per-mail action.

KMail should append some text to the normal body which tells the users that the files existed, which name and size it has and maybe an checksum (MD5, SHA1 or similar) to have at least a chance to know what exact version of the file got sent.
Comment 77 Jean-Philippe Monteiro 2007-01-26 02:29:52 UTC
In the "Tag" created when removing the attachment, what I'd like to see is 

attamment "whatever.xyz" saved to /folder/somewhere/yourcopy/whatever.xyz

or

attachment "whatever.xyz" permanently deleted

That would make it for me. It must then be a per-mail action.

...if this feature is ever to be implemented... :)
Comment 78 Jonathan Marten 2007-01-29 09:59:49 UTC
*** Bug 47448 has been marked as a duplicate of this bug. ***
Comment 79 JC Cardot 2007-03-04 12:47:48 UTC
Created attachment 19878 [details]
Pipe through perl script to remove/detach attachments

I created this script to add the wished behaviour to kmail (remove/detach
attachments).
Set this script as a pipe through (use -q option to ask for attachments to be
removed, or -d to detach, or nothing to remove all attachments), manual filter
in Kmail. Define a keyboard shortcut or better an icon. Then try it. It will
popup some dialog boxes (choose dir to detach to, choose attachment to
remove/detach), and add disclaimers (including hyperlinks to detached files) in
text/plain and text/html parts of the mail body.
It is to be published there (may be today if time allows me):
http://cardot.net/kmailpt with more explanations and screenshots.
Prerequisites: Perl MIME::Parser & MIME::WordDecoder, and Kdialog.
Comment 80 Stephan Herrmann 2007-03-04 18:20:56 UTC
re comment #79:
Really looks great.

Does it work with imap and dimap?
I'm a little bit alarmed by comment #54 (and also #75 regarding TB).
Do theses comments hold in any form for KMail Power Tools?
Comment 81 Olivier LAHAYE 2007-03-05 13:56:00 UTC
Seems wonderfull feature, unfortunatsely, I'm using imap and I'm little bit scared by above comments.

In the meantime (and for long term view), did you heard about the following project:
http://nepomuk-kde.semanticdesktop.org/xwiki/bin/view/Main/
Comment 82 ZJ Laczik 2007-03-07 10:56:28 UTC
I think there was a bug in kmailpt.pl: the source file names were determined incorrectly when copying the attachments. E-mailed JCC a proposed fix, and the files are also attached below.
Comment 83 ZJ Laczik 2007-03-07 11:00:29 UTC
Created attachment 19902 [details]
kmailpt.pl v0.1.1
Comment 84 Marc Dekenah 2007-04-04 15:53:22 UTC
This is just so darn neat! It's what all of us have been waiting for. In fact, this is so cool that with a little modification you can run it as part of the filters that helps sort friends into their own mail folders, and if they send an attachment it automatically detaches the attachment and saves it in an external folder of choice e.g. (under "filter actions") ....
1. move to friend's folder
2. pipe through /usr/local/bin/kmailpt.pl -d <directory/filename>

if directory/filename are not present, then ask "what do I do with this!?"

Comment 85 Mathias Homann 2007-04-04 16:12:04 UTC
does this work reliable with imap/dimap?
Comment 86 Arnout Boelens 2007-04-09 16:13:46 UTC
It doesn't seem to work with imap. For me, a way around this, is to move an email to a local folder, remove its attachments and move it back again.
Comment 87 Peer Frank 2007-04-10 09:34:42 UTC
Jean-Christophe:this script is just great - thank you very much for your contribution which is invaluable !
Comment 88 JC Cardot 2007-04-11 22:00:54 UTC
Thanks for your comments :-)
I'm not using imap so I cannot answer here about compatibility.
Seems it does not work, if I believe the  posts above. Code to fix this is 
welcome.
I've posted a new version of kmailpt (0.2) with the modifications from ZJ 
Laczik among other things, to http://cardot.net/kmailpt
I'm currently working on making it work with gpg encrypted messages, and also 
adding an option to store them decrypted.
@Olivier: I've heard about Nepomuk, and was thinking to add metadata to the 
detached files like a link to the original email (?), the email subject, s.o. 
But I don't know Nepomuk well, so it won't be in next version. Suggestions 
are very welcome!
@Marc: I've written your suggestion into mt todolist. It should be in 0.3.
Comment 89 ZJ Laczik 2007-04-12 01:55:26 UTC
For me, the script works fine with IMAP (I am using KMail v1.9.4). AMPB: do other filter scripts work with your setup and IMAP? I have never used DIMAP, so I cannot comment on that. John
Comment 90 Bernhard E. Reiter 2007-04-12 09:51:18 UTC
Currently we (Kolab-Konsortium) will do something to allow deletion
of email attachments. This is part of our work towards enterprise
stability of kdepim. For the kdepim-enterprise branch see: http://dot.kde.org/1170027049/
Comment 91 Mathias Homann 2007-04-12 10:07:04 UTC
re #90: how the h*ll did you manage to get that past the supporters of reasonings like the one in comment #9?
Comment 92 Bernhard E. Reiter 2007-04-12 11:30:11 UTC
re #90:
The argument I saw from #9 was: 
Modifying email would make it harder to use them as evidence. 
Our position is: That is minor as the user can use any other client
to modify an email on his computer or IMAP server (in the case of Kolab).
So real evidence would only be possible when you have signed archives
and signed by an external party as well.

Also we want to only allow the deletion of an attachment, but keep
the name of the attachment (and maybe a hash) in there as well.
So it would be possible to reconstruct the email if you like
and it is pretty obvious what change was make if you trust the user only to have used KMail/Kontact.

Backup space is pretty expensive, so in quite a few cases I even decide
to break the signature when deleting an attachment. (I use mutt to do this
where you can arbitrarily change an email.)
Comment 93 Erick Mattos 2007-04-22 19:23:15 UTC
I really think this is a real need!

I would like to suggest too that the attachment should be striped off and a small text about meta-data and possibly a link to the file saved in HD be saved in place.  Like telling the name, modified-date, size, etc..  This will be nice even to find the e-mails with attached data because the e-mail will keep something attached anyway. But not the huge Mb attached.

I think this should be an option to right click on emails and possibly a feature in options panel that can configure this to all.
Comment 94 JC Cardot 2007-05-28 13:18:54 UTC
Hi all
I've posted a new version of kmailpt (0.3) to http://cardot.net/kmailpt
It can now handle gpg encrypted emails, store them encrypted or decrypted.
I also added an optional argument to the "detach" command line option in order to be able to create filters that will automatically save attachments to a given directory, without user interaction.
Also there is a very annoying bug in KMail when you detach a file: this is bug #60265 (file:// urls are not highlighted). If you use KmailPT then please vote for it ;)
Do you know if the remove/detach feature will be part of KDE 4?
TIA
Comment 95 Will Stephenson 2007-05-29 14:54:47 UTC
Support for editing attachments and deleting them went into the enterprise 3.5 branch of svn last week - in case anyone wants to try it out before it trickles into 3.5 proper.
Comment 96 FiNeX 2007-06-24 01:09:32 UTC
The "enterprise 3.5 branch" isn't KDE 3.5.7 right?
Comment 97 Thomas McGuire 2007-06-24 12:58:18 UTC
>The "enterprise 3.5 branch" isn't KDE 3.5.7 right? 
Correct, the enterprise branch is a separate branch. See http://websvn.kde.org/branches/kdepim/enterprise/kdepim/

The enterprise branch will hopefully be merged back into trunk (or even 3.5, I don't know).
Comment 98 Till Adam 2007-06-24 14:11:25 UTC
Since 3.5.x is in a hard feature freeze now, this will go into trunk, which means 4.0.
Comment 99 Dotan Cohen 2007-06-26 12:34:26 UTC
Thanks, guys, this will definetly make Kmail more usable for me.
Comment 100 Thomas McGuire 2007-07-17 16:06:05 UTC
Note that bug 132195 might also be fixed if the attachment edit support is merged.
Comment 101 Thomas McGuire 2007-07-23 16:22:51 UTC
This is now fixed by:

>SVN commit 691370 by vkrause:
>
>Merge commits 665628, 668156, 668177, 668963, 674562, 674911 and 675824
>from enterprise branch.
>This contains attachment deletion/editing support for already existing
>mails and inline editing of attachments in the composer.

This will be available in KDE4.
Comment 102 Dotan Cohen 2007-10-04 12:33:43 UTC
Thanks Thomas and everybody else involved. Over six years in bugzilla this one...
Comment 103 Mark van Rossum 2009-03-30 01:13:17 UTC
Did this ever make it into KDE4?

Yes, you can delete the attachment of a sent message, but can you 
simply delete all attachements in a folder?
Comment 104 Bernhard E. Reiter 2009-03-30 12:29:04 UTC
@Mark: Yes, Kontact for KDE4 you can delete single attachments. So this feature made it there. 
No, it does not work on a number of emails, it only works on a single attachment. I guess it would be a new request to have it working on a number of emails.