Internet Engineering Task Force (IETF) K. Murchison Request for Comments: 8580 B. Gondwana Updates: 5230, 5435 FastMail Category: Standards Track May 2019 ISSN: 2070-1721
Sieve Extension: File Carbon Copy (FCC)
Abstract
The Sieve email filtering language provides a number of action commands, some of which can generate additional messages on behalf of the user. This document defines an extension to such commands to allow a copy of any generated message to be filed into a target mailbox.
This document updates RFCs 5230 and 5435 by adding a new tagged argument to the Vacation and Notify actions, respectively.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc8580.
Copyright Notice
Copyright (c) 2019 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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
The Sieve email filtering language [RFC5228] provides a number of action commands, some of which can generate additional messages on behalf of the user. It is sometimes desirable for a Sieve user to maintain an archive of the messages generated by these commands.
This extension defines ":fcc", a new optional tagged argument for action commands that generate additional messages. This argument allows a copy of the generated message to be filed into a target mailbox.
The capability string associated with this extension is "fcc".
Each new action that generates additional messages will need to specify how it interacts with the FCC extension. This document specifies the interaction of the FCC extension with the Vacation [RFC5230] and Notify [RFC5435] actions.
Conventions for notations are as described in Section 1.1 of [RFC5228], including use of the "Usage:" label for the definition of the action and the syntax of tagged arguments.
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.
This document specifies ":fcc", a new optional tagged argument that alters the behavior of action commands that generate additional messages on behalf of the user.
Usage: :fcc <mailbox: string>
The ":fcc" tagged argument instructs the Sieve interpreter to file a copy of the generated message into the mailbox provided in the subsequent argument. The semantics and treatment of the mailbox argument are defined to match those of the mailbox argument to the fileinto action specified in Section 4.1 of [RFC5228]. Specifically, use of an invalid mailbox name MAY be treated as an error or result in delivery to an implementation-defined mailbox, and if the specified mailbox doesn't exist, the implementation MAY treat it as an error, create the mailbox, or file the message into an implementation-defined mailbox.
3.1. Interaction with Extensions to the Fileinto Action
Some tagged arguments defined in extensions to the fileinto action can be used together with the ":fcc" tagged argument. The sections below describe these interactions. Tagged arguments in future extensions to the fileinto action need to describe their interaction with the FCC extension, if any.
When any fileinto extension arguments are used with the FCC extension, the corresponding extension MUST be enabled, and the arguments are defined to have the same syntax, semantics, and treatment as they do with the fileinto action.
This document extends the definition of the ":flags" tagged argument (see Section 5 of [RFC5232]) so that it can optionally be used with the ":fcc" tagged argument.
If the optional ":flags" tagged argument is specified with the ":fcc" tagged argument, it instructs the Sieve interpreter to set the IMAP4 flags provided in the subsequent argument when the generated message is filed into the target mailbox.
This document extends the definition of the ":create" tagged argument (see Section 3.2 of [RFC5490]) so that it can optionally be used with the ":fcc" tagged argument.
Usage: :fcc <mailbox: string> [:create]
If the optional ":create" tagged argument is specified with the ":fcc" tagged argument, it instructs the Sieve interpreter to create the target mailbox, if needed, before attempting to file the generated message into the target mailbox.
This document extends the definition of the ":specialuse" tagged argument (see Section 4 of [RFC8579]) so that it can optionally be used with the ":fcc" tagged argument.
If the optional ":specialuse" tagged argument is specified with the ":fcc" tagged argument, it instructs the Sieve interpreter to check whether a mailbox exists with the specific special-use flag assigned to it. If such a mailbox exists, the generated message is filed into the special-use mailbox. Otherwise, the generated message is filed into the target mailbox.
If the optional ":specialuse" and ":create" tagged arguments are both specified with the ":fcc" tagged argument, the Sieve interpreter is instructed to create the target mailbox per Section 4.1 of [RFC8579], if needed.
Copies of messages filed into a mailbox via this extension are REQUIRED to be in the Internet Message Format [RFC5322]. Some messages generated by Sieve actions might already conform to this format and MAY be filed without modification. Messages generated in other formats MUST be encapsulated using constructs from the Internet Message Format [RFC5322] and MIME ([RFC2045], [RFC2046], [RFC2047], [RFC2231]).
The general requirements for encapsulating the copies of messages to be filed are as follows:
o Date: The Date header field is REQUIRED and SHOULD be set to the date and time when the message was generated.
o From: The From header field is REQUIRED and SHOULD be set to the email address of the owner of the Sieve script, unless explicitly overridden by rules for encapsulating a particular message type.
Per Erratum ID 2035 [Err2035],
"Informative advice: Users often have multiple email addresses, and "the email address of the owner of the Sieve script" may offer a choice among several. If the sieve processor recognizes an address belonging to the owner of the Sieve script in the To or Cc fields of the input message, then it's
Murchison & Gondwana Standards Track [Page 5]
RFC 8580 Sieve Extension: FCC May 2019
better to use that address for the From field of the generated message, rather than any other addresses the script's owner may also have".
o To: The To header field is OPTIONAL and MAY be set to the email address of the recipient of the generated message, if available.
o Subject: The Subject header field is OPTIONAL and MAY be generated by setting the subject to the characters "Fcc: " followed by the subject of the message being processed by the Sieve interpreter.
o In-Reply-To: The In-Reply-To header field is OPTIONAL and MAY be set to the Message-ID of the message being processed by the Sieve interpreter.
o Message Body: The body of the filed message is REQUIRED and is composed of one or more MIME parts containing the generated message and any related metadata. The Content-Type header field(s) MUST be set to the appropriate MIME types. If any of the MIME parts include 8-bit or binary data, the Content-Transfer- Encoding header field(s) MUST be set accordingly.
This document extends the Vacation [RFC5230] action (see also "Seconds" parameter [RFC6131] to optionally store a copy of the auto- reply messages into a target mailbox.
Messages generated using the "mailto" [RFC5436] notification method are compliant with MIME and can be filed into the target mailbox without modification.
Messages generated by other notification methods (e.g., "xmpp" [RFC5437]) MUST be encapsulated per Section 4 before being filed. The body of the filed message MUST include the ":message" tagged argument and MAY include one or more of the ":from", ":importance", or ":options" tagged arguments. The MIME type(s) of the body part(s) used to encapsulate the parameters is an implementation decision.
An implementation MAY only support the FCC extension in conjunction with a subset of the notification methods it supports. An error occurs if the FCC extension is used with a notification method that doesn't support it. Notification methods that support the FCC extension can be discovered at runtime using the mechanism described in Section 6.1.
This document defines "fcc", a new notification-capability value for use with the notify_method_capability test (see Section 5 of [RFC5435]. For the "fcc" notification-capability, the notify_method_capability test can match one of the following key-list values:
Murchison & Gondwana Standards Track [Page 7]
RFC 8580 Sieve Extension: FCC May 2019
yes A copy of the notification message sent using the method identified by the notification-uri can be filed into a target mailbox.
no A copy of the notification message sent using the method identified by the notification-uri cannot be filed into a target mailbox.
Note that the "fcc" notify_method_capability test does not require the notification-uri argument to specify anything other than a scheme.
7. Compatibility with the Reject and Extended Reject Actions
Implementations MUST NOT allow use of the FCC extension with the reject and ereject [RFC5429] actions. Allowing use of the FCC extension with these actions would violate the SMTP [RFC5321] principle that a message is either delivered or bounced back to the sender. Namely, the saved copy of the rejection message will contain the original message.
It is an error for a script to use the ":fcc" tagged argument with either of the reject or ereject actions.
The FCC extension is not compatible with any Sieve action that does not generate an additional message on behalf of the user. It is an error for a script to use the ":fcc" tagged argument with any such action.
Murchison & Gondwana Standards Track [Page 8]
RFC 8580 Sieve Extension: FCC May 2019
Future extensions that define actions that generate additional messages on behalf of the user need to describe their compatibility with the FCC extension and describe how to MIME-encapsulate the message, if required.
In addition to the security considerations in [RFC5228], [RFC5230], [RFC5435], and [RFC6131], it should be noted that filing copies of generated messages may cause the Sieve script owner to exceed the allocated storage (quota) on the mail system, thereby preventing delivery of future messages destined for the owner.
In addition to the privacy considerations in [RFC5228], [RFC5230], [RFC5435], and [RFC6131], it should be noted that a copy of a generated message filed into a shared or public mailbox (as opposed to a private mailbox) could expose private information about the Sieve script owner to third parties. For instance, users that have access to the shared/public mailbox might discover that the Sieve script owner is on holiday or might discover the owner's physical location.
Description: Returns whether a copy of the notification message sent using the method identified by the notification-uri parameter to the notify_method_capability test can be filed into a target mailbox.
Syntax: Can contain one of two values: "yes" or "no". Values MUST be in lowercase.
The authors would like to thank the following individuals for contributing their ideas and supporting this specification: Ned Freed, Stan Kalisch, and Alexey Melnikov.
Authors' Addresses
Kenneth Murchison FastMail US LLC 1429 Walnut Street, Suite 1201 Philadelphia, PA 19102 United States of America
Email: murch@fastmailteam.com
Bron Gondwana FastMail Pty Ltd Level 2, 114 William Street Melbourne, VIC 3000 Australia