Bug 361368 - option to delete multipart/alternative attachments missing, e.g. text/html
Summary: option to delete multipart/alternative attachments missing, e.g. text/html
Status: RESOLVED DUPLICATE of bug 436089
Alias: None
Product: kmail2
Classification: Applications
Component: commands and actions (show other bugs)
Version: 4.14.10
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-04 07:05 UTC by Bernhard E. Reiter
Modified: 2021-05-10 16:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard E. Reiter 2016-04-04 07:05:24 UTC
In Kontact Mail 3.5 it was possible to delete the 
text/html alternative attachments in multipart/alternative emails.
For example by using the context menu in the view that show the email structure
on the text/html alternative and choose "delete attachment".
Kontact Mail 4.14.10 misses this function.
Because it is a functional degration without catering the use case differently I consider it a bug.

Use case:
Often the size of the text/html alternative part is very large compared to the text/plain part
that contains all information. The reader of the email wants to keep a record of the email
in a space saving way.

Scenarios that illustrate the use case:
There is a quota on the email folders when using imap.
Some emails may be required to be kept for archival purposes by tax law.


Reproducible: Always

Steps to Reproduce:
1. look at an html email that is send as multipart/alternative
2. try to delete the text/html branch including the image attachments.

Actual Results:  
Found no way to do it.
Comment 1 Erik Quaeghebeur 2016-05-24 12:48:28 UTC
You can do this using a filter.

See https://github.com/equaeghe/mailfilters/blob/master/alternative2.py for the Python script I use. It could/should be improved still; improvement suggestions welcome. (It says Python 3.4, but should work with 3.4+ as well.) It works well for me, but use at your own risk. Do take into account that the filtering subsystem is a bit flaky... sometimes I need to put a filter in first place to be able to trigger it.

The filter is a match-all-messages pipe-through via /home/equaeghe/.local/bin/alternative2plain, that I only apply manually, via the filter context-submenu or an assigned shortcut key.
Comment 2 Ingo Klöcker 2021-05-10 16:04:17 UTC

*** This bug has been marked as a duplicate of bug 436089 ***