Internet-Draft | Sieve Process iMIP | July 2023 |
Murchison, et al. | Expires 11 January 2024 | [Page] |
This document describes the "processcalendar" extension to the Sieve email filtering language. The "processcalendar" extension gives Sieve the ability to process machine-readable calendar data that is encapsulated in an email message using Multipurpose Internet Mail Extensions (MIME).¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 11 January 2024.¶
Copyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
Users frequently receive invites, replies, and cancellations for events, tasks, etc. via Internet mail messages. It is sometimes desirable to have such messages automatically parsed and the enclosed calendar data added to, updated on, or deleted from the user's calendars.¶
Typically such messages are based on the iCalendar Message-Based Interoperability Protocol (iMIP) [RFC6047]. However, sometimes the enclosed iCalendar [RFC5545] data does not include an iTIP method property (see [RFC5546], Section 1.4), such as a travel itinerary or public event, or the enclosed data may be in some other machine-readable format (E.g. JSCalendar [I-D.ietf-calext-jscalendarbis]).¶
This document defines an extension to the Sieve language [RFC5228] that enables scripts to process machine-readable calendar data that is encapsulated in an email message using MIME [RFC2045]. Specifically, this extension provides the ability to alter items on a user's calendars referenced in the encapsulated calendar data.¶
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.¶
This document uses terminology and concepts from iCalendar [RFC5545] and iTIP [RFC5546] to describe the processing of calendar data, but this extension can be used with any machine-readable calendar data format that can express similar concepts.¶
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.¶
Sieve interpreters that implement this extension MUST have an identifier of "processcalendar" for use with the capability mechanism.¶
Usage: processcalendar [ :addresses <string-list> ] [ :nonitip ] [ :updatesonly / :calendarid <string> ] [ :deletecanceled ] [ :outcome <variablename: string> ] [ :errstr <variablename: string> ]¶
The "processcalendar" action can be used with or without the "variables" [RFC5229] extension. When the "variables" extension is enabled in a script using <require "variables">, the script can use the ":outcome" (Section 4.6) and ":errstr" (Section 4.7) arguments to the "processcalendar" 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].¶
Unless the ":nonitip" (Section 4.2) argument is used, "processcalendar" 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:¶
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:¶
The "processcalendar" action does not cancel the implicit keep.¶
The optional :addresses argument is used to specify email addresses that belong to the recipient in addition to the addresses known to the implementation.¶
The optional :nonitip argument is used to tell the implementation that it can process calendar data that is not an iTIP message - it does not contain METHOD and/or ORGANIZER properties.¶
If :nonitip is omitted, the implementation MUST ignore calendar data that does not contain METHOD and ORGANIZER properties.¶
The optional :updatesonly argument is used to limit the messages processed to those targeting existing calendar objects only. If the message contains a new calendar object (initial invitation), the implementation MUST NOT add the object to a calendar.¶
If :updatesonly is omitted, new calendar objects (initial invitations) may be added to one of the user's calendars.¶
The optional :calendarid argument specifies the identifier of the calendar onto which new calendar objects (initial invitations) should placed.¶
If :calendarid is omitted, new calendar objects will be placed on the user's "default" calendar as determined by the implementation.¶
The optional :deletecanceled argument is used to tell the implementation that if it receives a cancellation message, it should remove the associated calendar object from the calendar.¶
If :deletecanceled is omitted, the associated calendar object will be marked as canceled and will remain on the calendar.¶
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:¶
The optional :errstr argument specifies the name of a variable into which a string describing the reason for the outcome will be stored.¶
The following example specifies email addresses belonging to the user and the identifier of the calendar onto which to place new calendar objects:¶
require [ "processcalendar" ]; processcalendar :addresses [ "me@example.com", "alsome@example.com" ] :calendarid "1ea6d86b-6c7f-48a2-bed3-2a4c40ec281a";¶
The following example tells the interpreter to process flight itineraries from a particular airline:¶
require [ "processcalendar" ]; if allof (address ["from", "sender"] "airline@example.com", header :contains "subject" "itinerary") { processcalendar :nonitip; }¶
The following example adds headers to the message if calendar data isn't processed :¶
require [ "processcalendar", "variables", "editheader" ]; set "processcal_outcome" "no_action"; set "processcal_error" ""; processcalendar :outcome "processcal_outcome" :errstr "processimip_error"; if not string :is "${processcal_outcome}" ["added", "updated"] { addheader "X-ProcessCal-Outcome" "${processcal_outcome}"; addheader "X-ProcessCal-Error" "${processcal_error}"; }¶
< 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".¶
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 are discussed in [RFC5228].¶
TODO: Discuss calendar SPAM.¶
It is believed that this extension doesn't introduce any privacy considerations beyond those in [RFC5228].¶
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:¶
The authors would like to thank the following individuals for contributing their ideas and support for writing this specification: Ned Freed and Alexey Melnikov.¶
Changes since draft-ietf-sieve-processimip-01:¶
Changes since draft-ietf-sieve-processimip-00:¶
Changes since draft-murchison-sieve-processimip-00:¶