View Single Post
Old 11 Jan 2022, 03:36 AM   #1
ArtMG
Junior Member
 
Join Date: Oct 2004
Posts: 20
Sieve rule on attachment types without mime extension

Any idea how I could filter on attachment mime type in Sieve?

I have been trying to create a custom sieve rule to handle emails containing iCalendar attachments according to RFC6047, i.e. bearing attachments with a Content-Type of "text/calendar". I have not managed to find any hints in this Fastmail Forum yet, but another forum's post led me to Sieve Extensions for Mime in RFC5703 which would allow me to use

Code:
require ["mime", "fileinto"];

   if header :mime :anychild :contenttype
             "Content-Type" "text/calendar"
Unfortunately, when trying such code out in the Fastmail Sieve tester I get the error
Quote:
line 1: Unsupported feature(s) in "require": "mime"
indicating that RFC5703 Mime Extensions are not yet amongst those supported by Fastmail.

Does anyone have any other suggestions of how I could go about forwarding just the emails containing iCalendar attachments to the external calendar provider I am required to use? Thanks.

PS: I did try if header :matches "X-Attached" [".ics"] which works ok with Google calendar objects having the X-Attached: invite.ics header, but this does not with Microsoft calendar objects that just have the separate mime parts.

Last edited by ArtMG : 11 Jan 2022 at 04:05 AM. Reason: extra info
ArtMG is offline   Reply With Quote