Open Bug 1397247 Opened 7 years ago Updated 2 years ago

filtering for content in attachment mime-header not working, for example: X-Mozilla-Altered: AttachmentDetached;

Categories

(Thunderbird :: Filters, enhancement)

52 Branch
enhancement

Tracking

(Not tracked)

People

(Reporter: oliver.brendel, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0 Build ID: 20170824053622 Steps to reproduce: I created a filter, where "body" should contain "AttachmentDetached" (lable added when detaching an attachment from the email), and as an action had a label set. I have tried this on an IMAP account (online). Actual results: from several hundred emails witch detached files (in a thousand), one was found (an apple mail, perhaps a format error ;-) Basically, it seems that one cannot find text in the mime- headers just before the attachments. Expected results: Should have found an labelled properly all my emails Could be an easy workaround for Bug 305485 might be related to Bug 834763
I don't see what makes you say that AttachmentDetached appears in the body of the e-mail. It doesn't. It appears in a MIME part of the message which is NOT the body, see example below. So a body search shouldn't find it. --------------6432816F6942E99FD41279F4 Content-Type: application/pdf; name="BVG-Preise-2016.pdf" Content-Disposition: attachment; filename="BVG-Preise-2016.pdf" X-Mozilla-External-Attachment-URL: file:///D:/Desktop/BVG-Preise-2016xxx.pdf X-Mozilla-Altered: AttachmentDetached; date="Fri Sep 08 12:27:09 2017" You deleted an attachment from this message. The original MIME headers for the attachment were: Content-Type: application/pdf; name="BVG-Preise-2016.pdf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="BVG-Preise-2016.pdf" --------------6432816F6942E99FD41279F4--
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
I agree, but it might have included the mime headers. The title of this bug is "filtering for content in attachment mime-header not working", which is still valid : in the filter dialogue, there is no item "filter on content in MIME part", Cheers Oliver
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
So you're saying that you created a filter with a customised header "X-Mozilla-Altered" looking for "contains" "AttachmentDetached". I tried that and it doesn't work. Filtering headers only lets you filter on message headers, not headers in message parts. I can make that an enhancement.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: filtering for content in attachment mime-header not working → filtering for content in attachment mime-header not working, for example: X-Mozilla-Altered: AttachmentDetached;
Yes, probably this is an enhancement, as a work-around for Bug 305485 (which has not advanced for many years) Thanks for considering this Cheers

I think this feature would be very useful, since it could allow to create automated filters based on Content-Type's of attachments.
An example use case where this would prove to be very useful would be to automatically filter Calendar Invites (i.e. content-type: text/calendar).
Another example would be to automatically tag (or rather, flag) messages that do not contain a PGP signature (i.e. content-type: application/pgp-signature).

Severity: normal → S3

Just updating oder bugs : I retested with version TB 102.10.0, and it does still not work : searching in content "X-Mozilla-Altered" for "AttachmentDetached" gives no results.

You need to log in before you can comment on or make changes to this bug.