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.
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.
*** This bug has been marked as a duplicate of bug 436089 ***