Bug 181868

Summary: KMail needs attachment filtering
Product: [Applications] kmail Reporter: Vanessa Ezekowitz <vanessaezekowitz>
Component: filteringAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: wishlist CC: jtamate, xavier
Priority: NOR    
Version: 1.9.10   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Vanessa Ezekowitz 2009-01-25 15:14:48 UTC
Version:           1.9.10 (using KDE 3.5.10)
OS:                Linux
Installed from:    Ubuntu Packages

I would like to see a feature added where Kmail can be set to look for attachments that match certain criteria (filename, size, animated or not, etc.) and then perform an action on just the matching attachments (in my case, I would have it delete the offending data).

This would be extremely useful for dealing with Incredimail users' emails, where each email sent has attached to it an animated GIF that not only takes up my hard disk space, but is also annoying and distracting.  I receive a couple dozen such messages a day via a mailing list, and most of them have other content that is worth keeping, so I can't just filter on "message body: contains: some pattern" and delete whole emails.
Comment 1 Jaime Torres 2009-01-26 17:59:13 UTC
In kmail 1.11.0 (kde 4.2), there is already a way to delete attachements from mails, but this task is manual.

Enabling a way to filter the attachments would be, indeed, very nice.

I think it would be enought to include the category attachment to the filter criteria and a 'remove attachment' filter action.

Comment 2 Xavier Brochard 2009-02-06 16:18:51 UTC
Agree with you, we enned a "attachment" criteria. A lot of users will not understand the workaround with user-defined criteria like:
<Content-type> <contain> "Multipart/Mixed-message"
or
<Content-Type> <matches regexp> "application|multipart|message|model|audio|image|video"
which define attachments
Comment 3 Xavier Brochard 2009-02-06 16:25:52 UTC
Looks similar to #33535 and #65449
However, both bugs are marks as RESOLVED and FIXED because of a patch implemented in KDE 3.3 that add a criteria "mail has attachment".
But this doesn't work in latest Kmail 1.11.0 (KDE 4.2) and Kmail 1.9.9 (KDE 3.5.10).
Comment 4 Jonathan Marten 2009-06-30 15:42:05 UTC

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