Mozilla VPN is currently experiencing an outage. Our team is actively working to resolve the issue. Please check the status page for real-time updates. Thank you for your patience.

为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Filter by attachment Content-Type only works for some messages

  • 2 个回答
  • 2 人有此问题
  • 20 次查看
  • 最后回复者为 basinilya

more options

I need to filter calendar events. All such messages have an attachment with Content-Type: text/calendar.

Here: http://forums.mozillazine.org/viewtopic.php?p=724059&sid=c5807de9790f2a3ac3c3ed36531297c4#p724059 I found that a body filter also applies to attacment headers.

I created a test filter "Body contains text/calendar" with the action to mark matched messages as unread. When I run the filter on my inbox, only some calendar messages are affected:

Here's an extract from a message that matches:

   Content-Type: multipart/mixed; boundary="001a1144413e115b8c055e744899"
   ...    
   </span></span>
   </body>
   </html>
   
   --001a1144413e115b87055e744897
   Content-Type: text/calendar; charset="UTF-8"; method=REQUEST
   Content-Transfer-Encoding: 7bit
   
   BEGIN:VCALENDAR
   ...    


And here's an extract from a message that does not match:

   Content-Type: multipart/alternative;
   	boundary="_002_FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF_"
   ...    
   38zzLfaIt905RaHpwW10gxDaRM7fugsiycNfVW3ThPWAV0jAVl2v4DdneUk=
   
   --_002_FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF_
   Content-Type: text/calendar; charset="utf-8"; method=REQUEST
   Content-Transfer-Encoding: base64
   
   VKeoFC+u2MIsA+disK1yxSRWLpQJSbDdI1vXTzvVobC3rN+UqxzEd4HUhCnxlPH3rPFCuzefeDea
   ...
I need to filter calendar events. All such messages have an attachment with Content-Type: text/calendar. Here: http://forums.mozillazine.org/viewtopic.php?p=724059&sid=c5807de9790f2a3ac3c3ed36531297c4#p724059 I found that a body filter also applies to attacment headers. I created a test filter "Body contains text/calendar" with the action to mark matched messages as unread. When I run the filter on my inbox, only some calendar messages are affected: Here's an extract from a message that matches: Content-Type: multipart/mixed; boundary="001a1144413e115b8c055e744899" ... </span></span> </body> </html> --001a1144413e115b87055e744897 Content-Type: text/calendar; charset="UTF-8"; method=REQUEST Content-Transfer-Encoding: 7bit BEGIN:VCALENDAR ... And here's an extract from a message that does not match: Content-Type: multipart/alternative; boundary="_002_FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF_" ... 38zzLfaIt905RaHpwW10gxDaRM7fugsiycNfVW3ThPWAV0jAVl2v4DdneUk= --_002_FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF_ Content-Type: text/calendar; charset="utf-8"; method=REQUEST Content-Transfer-Encoding: base64 VKeoFC+u2MIsA+disK1yxSRWLpQJSbDdI1vXTzvVobC3rN+UqxzEd4HUhCnxlPH3rPFCuzefeDea ...

所有回复 (2)

more options

re : I created a test filter "Body contains text/calendar"

Suggest you try : 'Content-Type' 'contains' 'calendar'

I've just tested a filter using 'Content-Type' 'contains' 'alternative' which I ran manually on Inbox and everything was correctly moved as specified in filter.

Please note that filters run in the order listed, so if an email has already been filtered by another filter then it will not be able to filter as expected because email is not there.

more options

Toad-Hall said

Suggest you try : 'Content-Type' 'contains' 'calendar'

This didn't work, because only the first occurrence of Content-Type is matched. Besides, the word "calendar" would give too many false positives. 'Body' 'contains' behaves differently for the two messages in my example. I can search the insights of the attachments in both of them, even though the second one is base64-encoded, but only in the first message I can search the attachment headers.