Sieve Email Filtering: Extension for Processing iMIP Messages
Internet-Draft draft-murchison-sieve-processimip-00
Kenneth Murchison
Fastmail US LLC
1429 Walnut Street - Suite 1201
Philadelphia
PA
19102
USA
murch@fastmailteam.com
Ricardo Signes
Fastmail US LLC
1429 Walnut Street - Suite 1201
Philadelphia
PA
19102
USA
rjbs@fastmailteam.com
Matthew Horsfall
Fastmail US LLC
1429 Walnut Street - Suite 1201
Philadelphia
PA
19102
USA
alh@fastmailteam.com
ART
Sieve
This document describes the "processimip" extension to the Sieve email filtering language. The "processimip" extension gives Sieve the ability to process messages using the iCalendar Message-Based Interoperability Protocol (iMIP).

Open Issues
1. The Cyrus implementation used at Fastmail also adds an :invitesonly option to the processimip action in order to emulate existing functionality elsewhere within our stack. Is there any interest in formalizing this option? This may be superfluous as it might not make sense to auto-process an initial invitation but then NOT auto-process future updates to an event.
Introduction
Users typically receive invites, replies, and cancelations for events, tasks, etc. via Internet mail messages. It is sometimes desirable to have such messages automatically parsed and the attached iCalendar objects added to, updated on, or deleted from the user's calendars.
This document defines an extension to the Sieve language that enables scripts to process messages using the iCalendar Message-Based Interoperability Protocol (iMIP). Specifically, this extension provides the ability to alter iCalendar objects on a user's calendars referenced in iMIP messages.
Conventions Used in This Document
Conventions for notations are as in Section 1.1 of [RFC5228], including use of the "Usage:" label for the definition of action and tagged arguments syntax.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
Capability Identifier
Sieve interpreters that implement this extension have an identifier of "processimip" for use with the capability mechanism.
Process iMIP Action

Usage: processimip [ :addresses <string-list> ]
                   [ :updatesonly | :calendarid <string> ]
                   [ :deletecanceled ]
                   [ :outcome <variablename: string> ]
                   [ :errstr <variablename: string> ]

The "processimip" action can be used with or without the "variables" extension. When the "variables" extension is enabled in a script using <require "variables">, the script can use the ":outcome" and ":errstr" arguments to the "processimip" action described below. When the "variables" extension is not enabled, the ":outcome" and ":errstr" arguments MUST NOT be used and MUST cause an error according to [RFC5228].
"processimip" MUST NOT process a message unless it is a well-formed iMIP message and one of the recipient user's email addresses matches the Calendar User Address (see Section 3.3.3 of [RFC5545]) of the intended target of the message, as determined by the iTIP method (see Section 1.4 of [RFC5546]) of the message:
- "REPLY": Value of the "Organizer" property (see Section 3.8.4.1 of [RFC5545])
- "REQUEST", "CANCEL", "ADD": Value of one of the "Attendee" properties (see Section 3.8.4.3 of [RFC5545])
The recipient user's email address matches the Calender User Address of the target if the Calendar User Address is in the form of a mailto URI and the email address matches the "addr-spec" of the URI.
An email address is considered to belong to the recipient if it is one of:
1. an email address known by the implementation to be associated with the recipient,
2. the final envelope recipient address if it's available to the implementation, or
3. an address specified by the script writer via the :addresses argument.
The "processimip" action does not cancel the implicit keep.
Addresses Argument
The optional :addresses argument is used to specify email addresses that belong to the recipient in addition to the addresses known to the implementation.
Updates Only Argument
The optional :updatesonly argument is used to limit the messages processed to those targeting existing iCalendar objects only. If the message contains a new iCalendar object (initial invitation), the implementation MUST NOT add the object to a calendar.
If :updatesonly is omitted, new iCalendar objects (initial invitations) may be added to one of the user's calendars.
Calendar ID Argument
The optional :calendarid argument specifies the identifier of the calendar onto which new iCalendar objects (initial invitations) should placed.
If :calendarid is omitted, new iCalendar objects will be placed on the user's "default" calendar as determined by the implementation.
Delete Canceled Argument
The optional :deletecanceled argument is used to tell the implementation that if it receives a cancelation message, it should remove the associated iCalendar object from the calendar.
If :deletecanceled is omitted, the associated iCalendar object will be marked as canceled and will remain on the calendar.
Outcome Argument
The optional :outcome argument specifies the name of a variable into which one of the following strings specifying the outcome of the action will be stored:
- "no_action": No action was performed (E.g., the message wasn't an iMIP message, or the message contained a new iCalendar object but the ":updatesonly" argument was used)
- "added": A new iCalendar object was added to a calendar
- "update": An iCalendar resource was updated or canceled
- "error": An error processing the iMIP message occurred
Error String Argument
The optional :errstr argument specifies the name of a variable into which a string describing the reason for the outcome will be stored.
Examples
TODO: Actually add examples.
Implementation Status
< RFC Editor: before publication please remove this section and the reference to [RFC7942] >
This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on a proposal described in [RFC7942]. The description of implementations in this section is intended to assist the IETF in its decision processes in progressing drafts to RFCs. Please note that the listing of any individual implementation here does not imply endorsement by the IETF. Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors. This is not intended as, and must not be construed to be, a catalog of available implementations or their features. Readers are advised to note that other implementations may exist.
According to [RFC7942], "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature. It is up to the individual working groups to use this information as they see fit".
Cyrus Server
The open source Cyrus Server project is a highly scalable enterprise mail system which supports Sieve email filtering at the point of final delivery. This production level Sieve implementation supports all of the requirements described in this document. This implementation is freely distributable under a BSD style license from Computing Services at Carnegie Mellon University.
Security Considerations
Security considerations are discussed in [RFC5228].
TODO: Discuss calendar SPAM.
Privacy Considerations
It is believed that this extension doesn't introduce any privacy considerations beyond those in [RFC5228].
IANA Considerations
Registration of Sieve Extension
This document defines the following new Sieve extension to be added to the registry defined in Section 6.2 of [RFC5228] and located here: https://www.iana.org/assignments/sieve-extensions/sieve-extensions.xhtml#sieve-extensions
IANA are requested to add a capability to the Sieve Extensions registry:
- To: iana@iana.org
- Subject: Registration of new Sieve extension
- Capability name: processimip
- Description: Adds the "processimip" action command to add and update iCalendar objects on a user's calendars.
- RFC number: RFC XXXX
- Contact address: The Sieve discussion list <sieve@ietf.org>
Acknowledgments
The authors would like to thank the following individuals for contributing their ideas and support for writing this specification: Ned Freed and Alexey Melnikov.
References
Normative References
Informative References
[RFC5228]
[RFC2119]
[RFC8174]
[RFC5545]
[RFC5546]
[RFC7942]

Change History (To be removed by RFC Editor before publication)
Changes since draft-murchison-sieve-processimip-00:
1. Document name change only.