draft-ietf-extra-sieve-special-use-00.txt   draft-ietf-extra-sieve-special-use-01.txt 
EXTRA S. Bosch EXTRA S. Bosch
Internet-Draft Dovecot Oy Internet-Draft Dovecot Oy
Intended status: Standards Track September 13, 2017 Intended status: Standards Track January 7, 2018
Expires: March 17, 2018 Expires: July 11, 2018
Sieve Email Filtering: Delivering to Special-Use Mailboxes Sieve Email Filtering: Delivering to Special-Use Mailboxes
draft-ietf-extra-sieve-special-use-00 draft-ietf-extra-sieve-special-use-01
Abstract Abstract
The SPECIAL-USE capability of the IMAP protocol (RFC 6154) allows The SPECIAL-USE capability of the IMAP protocol (RFC 6154) allows
clients to identify special-use mailboxes; e.g., where draft or sent clients to identify special-use mailboxes; e.g., where draft or sent
messages should be put. This simplifies client configuration. In messages should be put. This simplifies client configuration. In
contrast, the Sieve mail filtering language (RFC 5228) currently has contrast, the Sieve mail filtering language (RFC 5228) currently has
no such capability. This memo defines a Sieve extension that fills no such capability. This memo defines a Sieve extension that fills
this gap: it adds a test for checking whether a special-use attribute this gap: it adds a test for checking whether a special-use attribute
is assigned for a particular mailbox or any mailbox, and it adds the is assigned for a particular mailbox or any mailbox, and it adds the
skipping to change at page 1, line 38 skipping to change at page 1, line 38
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on March 17, 2018. This Internet-Draft will expire on July 11, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
skipping to change at page 2, line 45 skipping to change at page 2, line 45
SPECIAL-USE capability [SPECIAL-USE], IMAP clients can also configure SPECIAL-USE capability [SPECIAL-USE], IMAP clients can also configure
these attributes dynamically based on user preference. these attributes dynamically based on user preference.
Unlike the IMAP protocol, the Sieve mail filtering language [SIEVE] Unlike the IMAP protocol, the Sieve mail filtering language [SIEVE]
currently cannot freely access these special-use mailbox attributes. currently cannot freely access these special-use mailbox attributes.
Particularly, the Sieve interpreter cannot find an anonymous mailbox Particularly, the Sieve interpreter cannot find an anonymous mailbox
that has a particular special-use attribute assigned. This would be that has a particular special-use attribute assigned. This would be
very useful for example to find the user's Spam mailbox at delivery. very useful for example to find the user's Spam mailbox at delivery.
In Sieve, limited access to the special-use attributes is provided In Sieve, limited access to the special-use attributes is provided
using the "mboxmetadata" extension [MAILBOX], which allows testing using the "mboxmetadata" extension [SIEVE-MAILBOX], which allows
for the presence of a special-use attribute in the "/private/ testing for the presence of a special-use attribute in the "/private/
specialuse" IMAP METADATA [IMAP-METADATA] entry of a mailbox. Still, specialuse" IMAP METADATA [IMAP-METADATA] entry of a mailbox. Still,
not all implementers will be willing to add the complexity of the not all implementers will be willing to add the complexity of the
IMAP METADATA capability, just to provide access to special-use IMAP METADATA capability, just to provide access to special-use
attributes to the Sieve interpreter. attributes to the Sieve interpreter.
This document defines an extension to the Sieve mail filtering This document defines an extension to the Sieve mail filtering
language that adds the ability to freely access mailbox special-use language that adds the ability to freely access mailbox special-use
attributes. It adds a test called "specialuse_exists" that checks attributes. It adds a test called "specialuse_exists" that checks
whether a special-use attribute is assigned for a particular mailbox whether a special-use attribute is assigned for a particular mailbox
or - if omitted - any mailbox. It also adds the ability to file or - if omitted - any mailbox. It also adds the ability to file
skipping to change at page 3, line 51 skipping to change at page 3, line 51
a. the indicated mailbox exists, a. the indicated mailbox exists,
b. that mailbox allows the user in whose context the Sieve script b. that mailbox allows the user in whose context the Sieve script
runs to "deliver" messages into it, and runs to "deliver" messages into it, and
c. that mailbox has all of the special-use flags listed in the c. that mailbox has all of the special-use flags listed in the
"special-use-flags" argument assigned to it. "special-use-flags" argument assigned to it.
Refer to the specification of the "mailboxexists" test in Section 3.1 Refer to the specification of the "mailboxexists" test in Section 3.1
of RFC 5490 [MAILBOX] for a definition of when "delivery" of messages of RFC 5490 [SIEVE-MAILBOX] for a definition of when "delivery" of
into a mailbox is deemed possible. messages into a mailbox is deemed possible.
4. ":specialuse" Argument to "fileinto" Command 4. ":specialuse" Argument to "fileinto" Command
Usage: fileinto [:specialuse <special-use-flag: string>] Usage: fileinto [:specialuse <special-use-flag: string>]
<mailbox: string> <mailbox: string>
Normally, the "fileinto" command delivers the message in the mailbox Normally, the "fileinto" command delivers the message in the mailbox
specified using its positional mailbox argument. However, if the specified using its positional mailbox argument. However, if the
optional ":specialuse" argument is also specified, the "fileinto" optional ":specialuse" argument is also specified, the "fileinto"
command first checks whether a mailbox exists with the specified command first checks whether a mailbox exists with the specified
skipping to change at page 4, line 32 skipping to change at page 4, line 32
o An anonymous special-use mailbox, which has at least the special- o An anonymous special-use mailbox, which has at least the special-
use flag specified with the ":specialuse" argument assigned to it. use flag specified with the ":specialuse" argument assigned to it.
o The default mailbox named by the positional string argument of the o The default mailbox named by the positional string argument of the
"fileinto" command, which is used when the special-use mailbox is "fileinto" command, which is used when the special-use mailbox is
not found. not found.
The special-use flag specified with the ":specialuse" argument MUST The special-use flag specified with the ":specialuse" argument MUST
conform to the "use-attr" syntax described in Section 6 of RFC6154 conform to the "use-attr" syntax described in Section 6 of RFC6154
[MAILBOX]. Implementations SHOULD handle an invalid special-use flag [SIEVE-MAILBOX]. Implementations SHOULD handle an invalid special-
in the same way as an invalid mailbox name is handled. The string use flag in the same way as an invalid mailbox name is handled. The
parameter of the ":specialuse" argument is not a constant string, string parameter of the ":specialuse" argument is not a constant
which means that variable substitutions are allowed when the string, which means that variable substitutions are allowed when the
"variables" extension [VARIABLES] is active. In that case, the "variables" extension [VARIABLES] is active. In that case, the
syntax of the special-use flag is only verified at runtime. syntax of the special-use flag is only verified at runtime.
If neither the special-use mailbox nor the default mailbox exists, If neither the special-use mailbox nor the default mailbox exists,
the "fileinto" action MUST proceed exactly as it does in case the the "fileinto" action MUST proceed exactly as it does in case the
":specialuse" is argument is absent and the mailbox named by its ":specialuse" is argument is absent and the mailbox named by its
positional argument does not exist. The various options for handling positional argument does not exist. The various options for handling
this situation are described in Section 4.1 of RFC5228 [SIEVE]. this situation are described in Section 4.1 of RFC5228 [SIEVE].
More than one mailbox can have a particular special-use flag More than one mailbox can have a particular special-use flag
skipping to change at page 5, line 13 skipping to change at page 5, line 13
to its existence, the Sieve interpreter MUST NOT subsequently attempt to its existence, the Sieve interpreter MUST NOT subsequently attempt
delivery in the indicated default mailbox as a fall-back. Instead, delivery in the indicated default mailbox as a fall-back. Instead,
it MUST proceed exactly as it does in case the ":specialuse" argument it MUST proceed exactly as it does in case the ":specialuse" argument
is absent and delivery to the mailbox named by its positional is absent and delivery to the mailbox named by its positional
argument fails. This prevents the situation where messages are argument fails. This prevents the situation where messages are
unexpectedly spread over two mailboxes in case transient or unexpectedly spread over two mailboxes in case transient or
intermittent delivery failures occur. intermittent delivery failures occur.
4.1. Interaction with ":create" Argument to "fileinto" Command 4.1. Interaction with ":create" Argument to "fileinto" Command
The "mailbox" extension [MAILBOX] adds the optional ":create" The "mailbox" extension [SIEVE-MAILBOX] adds the optional ":create"
argument to the "fileinto" command. If the optional ":create" argument to the "fileinto" command. If the optional ":create"
argument is specified with "fileinto", it instructs the Sieve argument is specified with "fileinto", it instructs the Sieve
interpreter to create the specified mailbox if needed, before interpreter to create the specified mailbox if needed, before
attempting to deliver the message into the specified mailbox. attempting to deliver the message into the specified mailbox.
When combined with the ":specialuse" argument, the ":create" argument When combined with the ":specialuse" argument, the ":create" argument
instructs the Sieve interpreter to create the specified default instructs the Sieve interpreter to create the specified default
mailbox if needed. This need arises when both the special-use and mailbox if needed. This need arises when both the special-use and
the default mailbox are not found. the default mailbox are not found.
skipping to change at page 6, line 36 skipping to change at page 6, line 36
} }
if allof( if allof(
environment "imap.cause" "COPY", environment "imap.cause" "COPY",
specialuse_exists "${mailbox}" "\\Junk") { specialuse_exists "${mailbox}" "\\Junk") {
redirect "spam-report@example.org"; redirect "spam-report@example.org";
} }
7. Security Considerations 7. Security Considerations
Security considerations are discussed in [SIEVE] and [SPECIAL-USE]. Security considerations are discussed in [SIEVE], [VARIABLES], and
It is believed that this extension does not introduce any additional [SPECIAL-USE]. It is believed that this extension does not introduce
security concerns. any additional security concerns.
8. IANA Considerations 8. IANA Considerations
The following template specifies the IANA registration of the Sieve The following template specifies the IANA registration of the Sieve
extension specified in this document: extension specified in this document:
To: iana@iana.org To: iana@iana.org
Subject: Registration of new Sieve extension Subject: Registration of new Sieve extension
Capability name: special-use Capability name: special-use
skipping to change at page 7, line 23 skipping to change at page 7, line 23
mailbox that has a particular IMAP special-use mailbox that has a particular IMAP special-use
attribute assigned. attribute assigned.
RFC number: this RFC RFC number: this RFC
Contact address: Sieve mailing list <sieve@ietf.org> Contact address: Sieve mailing list <sieve@ietf.org>
This information should be added to the list of sieve extensions This information should be added to the list of sieve extensions
given on http://www.iana.org/assignments/sieve-extensions. given on http://www.iana.org/assignments/sieve-extensions.
9. Acknowledgements 9. Acknowledgements
Thanks to Barry Leiba, Alexey Melnikov, Ken Murchison, and Ned Freed Thanks to Stan Kalisch, Barry Leiba, Alexey Melnikov, Ken Murchison,
for reviews and suggestions. and Ned Freed for reviews and suggestions.
Thanks to the authors of RFC5490 [SIEVE-MAILBOX] from which some
descriptive text is borrowed in this document.
10. References 10. References
10.1. Normative References 10.1. Normative References
[IMAP-METADATA] [IMAP-METADATA]
Daboo, C., "The IMAP METADATA Extension", RFC 5464, DOI Daboo, C., "The IMAP METADATA Extension", RFC 5464,
10.17487/RFC5464, February 2009, DOI 10.17487/RFC5464, February 2009,
<http://www.rfc-editor.org/info/rfc5464>. <http://www.rfc-editor.org/info/rfc5464>.
[KEYWORDS] [KEYWORDS]
Bradner, S., "Key words for use in RFCs to Indicate Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[MAILBOX] Melnikov, A., "The Sieve Mail-Filtering Language --
Extensions for Checking Mailbox Status and Accessing
Mailbox Metadata", RFC 5490, March 2009.
[SIEVE] Guenther, P. and T. Showalter, "Sieve: An Email Filtering [SIEVE] Guenther, P. and T. Showalter, "Sieve: An Email Filtering
Language", RFC 5228, January 2008. Language", RFC 5228, January 2008.
[SIEVE-MAILBOX]
Melnikov, A., "The Sieve Mail-Filtering Language --
Extensions for Checking Mailbox Status and Accessing
Mailbox Metadata", RFC 5490, March 2009.
[SPECIAL-USE] [SPECIAL-USE]
Leiba, B. and J. Nicolson, "IMAP LIST Extension for Leiba, B. and J. Nicolson, "IMAP LIST Extension for
Special-Use Mailboxes", RFC 6154, DOI 10.17487/RFC6154, Special-Use Mailboxes", RFC 6154, DOI 10.17487/RFC6154,
March 2011, <http://www.rfc-editor.org/info/rfc6154>. March 2011, <http://www.rfc-editor.org/info/rfc6154>.
[VARIABLES] [VARIABLES]
Homme, K., "Sieve Email Filtering: Variables Extension", Homme, K., "Sieve Email Filtering: Variables Extension",
RFC 5229, January 2008. RFC 5229, January 2008.
10.2. Informative References 10.2. Informative References
 End of changes. 13 change blocks. 
25 lines changed or deleted 29 lines changed or added

This html diff was produced by rfcdiff 1.46. The latest version is available from http://tools.ietf.org/tools/rfcdiff/