draft-ietf-extra-sieve-special-use-02.txt | draft-ietf-extra-sieve-special-use-03.txt | |||
---|---|---|---|---|
EXTRA S. Bosch | EXTRA S. Bosch | |||
Internet-Draft Dovecot Oy | Internet-Draft Dovecot Oy | |||
Intended status: Standards Track March 5, 2018 | Intended status: Standards Track September 5, 2018 | |||
Expires: September 6, 2018 | Expires: March 9, 2019 | |||
Sieve Email Filtering: Delivering to Special-Use Mailboxes | Sieve Email Filtering: Delivering to Special-Use Mailboxes | |||
draft-ietf-extra-sieve-special-use-02 | draft-ietf-extra-sieve-special-use-03 | |||
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 September 6, 2018. | This Internet-Draft will expire on March 9, 2019. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2018 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 | |||
skipping to change at page 2, line 15 ¶ | skipping to change at page 2, line 15 ¶ | |||
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 | |||
described in the Simplified BSD License. | described in the Simplified BSD License. | |||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | |||
2. Conventions Used in This Document . . . . . . . . . . . . . . 3 | 2. Conventions Used in This Document . . . . . . . . . . . . . . 3 | |||
3. Test "specialuse_exists" . . . . . . . . . . . . . . . . . . 3 | 3. Test "specialuse_exists" . . . . . . . . . . . . . . . . . . 3 | |||
4. ":specialuse" Argument to "fileinto" Command . . . . . . . . 4 | 4. ":specialuse" Argument to "fileinto" Command . . . . . . . . 4 | |||
4.1. Interaction with ":create" Argument to "fileinto" Command 5 | 4.1. Mailboxes Created Implicitly by the "fileinto" Command . 5 | |||
5. Sieve Capability Strings . . . . . . . . . . . . . . . . . . 5 | 5. Sieve Capability Strings . . . . . . . . . . . . . . . . . . 6 | |||
6. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 5 | 6. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
7. Security Considerations . . . . . . . . . . . . . . . . . . . 6 | 7. Security Considerations . . . . . . . . . . . . . . . . . . . 7 | |||
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 | 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 | |||
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7 | 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 | |||
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 | 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 | |||
10.1. Normative References . . . . . . . . . . . . . . . . . . 7 | 10.1. Normative References . . . . . . . . . . . . . . . . . . 8 | |||
10.2. Informative References . . . . . . . . . . . . . . . . . 8 | 10.2. Informative References . . . . . . . . . . . . . . . . . 9 | |||
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 8 | Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
1. Introduction | 1. Introduction | |||
Commonly, several mailboxes in an IMAP message store [IMAP] have a | Commonly, several mailboxes in an IMAP message store [IMAP] have a | |||
special use; e.g. it is where the user's draft messages are stored, | special use; e.g. it is where the user's draft messages are stored, | |||
where a copy of sent messages are kept, or it is where spam messages | where a copy of sent messages are kept, or it is where spam messages | |||
are filed automatically at delivery. The SPECIAL-USE capability | are filed automatically at delivery. The SPECIAL-USE capability | |||
[SPECIAL-USE] of the IMAP protocol defines mailbox attributes that | [SPECIAL-USE] of the IMAP protocol defines mailbox attributes that | |||
identify these special mailboxes explicitly to the client. This way, | identify these special mailboxes explicitly to the client. This way, | |||
client configuration is simplified significantly. Using the CREATE- | client configuration is simplified significantly. Using the CREATE- | |||
skipping to change at page 4, line 52 ¶ | skipping to change at page 4, line 52 ¶ | |||
"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 in the user's personal namespace can have a | More than one mailbox in the user's personal namespace can have a | |||
particular special-use flag assigned. In case of such ambiguity, the | particular special-use flag assigned. If one of those mailboxes is | |||
mailbox that is chosen for delivery is implementation-defined. | in fact the default mailbox named by the positional string argument | |||
However, while the set of mailboxes to which the involved special-use | of the "fileinto" command, that mailbox MUST be used for delivery. | |||
flags are assigned remains unchanged, implementations MUST ensure | If the default mailbox is not one of the options, the mailbox that is | |||
that the mailbox choice is made consistently, so that the same | chosen for delivery is implementation-defined. However, while the | |||
mailbox is used every time. Conversely, the chosen mailbox MAY | set of mailboxes to which the involved special-use flags are assigned | |||
change once the special-use flag assignments that are relevant for | remains unchanged, implementations SHOULD ensure that the mailbox | |||
the mailbox choice are changed (usually by user interaction). | choice is made consistently, so that the same mailbox is used every | |||
time. Conversely, the chosen mailbox MAY change once the special-use | ||||
flag assignments that are relevant for the mailbox choice are changed | ||||
(usually by user interaction). | ||||
If delivery to the special-use mailbox fails for reasons not relating | If delivery to the special-use mailbox fails for reasons not relating | |||
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. Mailboxes Created Implicitly by the "fileinto" Command | |||
The "mailbox" extension [SIEVE-MAILBOX] adds the optional ":create" | Before attempting to deliver the message into the specified mailbox, | |||
argument to the "fileinto" command. If the optional ":create" | the "fileinto" command may implicitly create the mailbox if it does | |||
argument is specified with "fileinto", it instructs the Sieve | not exist (see Section 4.1 of RFC5228 [SIEVE]). This optional | |||
interpreter to create the specified mailbox if needed, before | behavior can be requested explicitly using the "mailbox" extension | |||
attempting to deliver the message into the specified mailbox. | [SIEVE-MAILBOX], which adds the optional ":create" argument to the | |||
"fileinto" command. If the ":create" argument is specified with | ||||
"fileinto", it instructs the Sieve interpreter to unconditionally | ||||
create the specified mailbox if needed. Note that the ":create" | ||||
argument has no effect when the implicit creation of mailboxes for | ||||
delivery is the default behavior. | ||||
When combined with the ":specialuse" argument, the ":create" argument | When the ":specialuse" argument is present, this behavior does not | |||
instructs the Sieve interpreter to create the specified default | change: the Sieve interpreter will implicitly create the specified | |||
mailbox if needed. This need arises when both the special-use and | default mailbox if needed. This need arises when both the special- | |||
the default mailbox are not found. | use mailbox and the default mailbox are not found. | |||
If the server implementation supports the CREATE-SPECIAL-USE | If the server implementation supports the CREATE-SPECIAL-USE | |||
capability [SPECIAL-USE] for IMAP, i.e. it allows assigning special- | capability [SPECIAL-USE] for IMAP (i.e., it allows assigning special- | |||
use flags to new mailboxes, it SHOULD assign the special-use flag | use flags to new mailboxes) it SHOULD assign the special-use flag | |||
specified with the ":specialuse" argument to the newly created | specified with the ":specialuse" argument to the newly created | |||
mailbox. | mailbox. | |||
5. Sieve Capability Strings | 5. Sieve Capability Strings | |||
A Sieve implementation that defines the "specialuse_exists" test and | A Sieve implementation that defines the "specialuse_exists" test and | |||
the ":specialuse" argument for the "fileinto" command will advertise | the ":specialuse" argument for the "fileinto" command will advertise | |||
the capability string "special-use". | the capability string "special-use". | |||
6. Examples | 6. Examples | |||
The following example saves the message in the mailbox where messages | The following example saves the message in the mailbox where messages | |||
deemed to be junk mail are held. This mailbox is identified using | deemed to be junk mail are held. This mailbox is identified using | |||
the "\Junk" special-use attribute. If no mailbox has this attribute | the "\Junk" special-use attribute. If no mailbox has this attribute | |||
assigned, the message is filed into the mailbox named "Spam". | assigned, the message is filed into the mailbox named "Spam". If the | |||
mailbox named "Spam" does not exist either, the result of this Sieve | ||||
script is implementation-dependent: e.g., it may trigger an error or | ||||
the mailbox may be created implicitly. | ||||
require "fileinto"; | require "fileinto"; | |||
require "special-use"; | require "special-use"; | |||
fileinto :specialuse "\\Junk" "Spam"; | fileinto :specialuse "\\Junk" "Spam"; | |||
The following very similar example handles the case in which neither | The following very similar example explicitly handles the case in | |||
a "\Junk" special-use mailbox nor the "Spam" mailbox exist. In that | which neither a "\Junk" special-use mailbox nor the "Spam" mailbox | |||
case, a mailbox called "Spam" is created, and the message is stored | exist. In that case, a mailbox called "Spam" is created, and the | |||
there. Additionally, the "\Junk" special-use attribute may be | message is stored there. Additionally, the "\Junk" special-use | |||
assigned to it. | attribute may be assigned to it. | |||
require "fileinto"; | require "fileinto"; | |||
require "special-use"; | require "special-use"; | |||
require "mailbox"; | require "mailbox"; | |||
fileinto :specialuse "\\Junk" :create "Spam"; | fileinto :specialuse "\\Junk" :create "Spam"; | |||
The following example is used in a Sieve script that is triggered | The following example is used in a Sieve script that is triggered | |||
from an IMAP event, rather than at message delivery [IMAPSIEVE]. | from an IMAP event, rather than at message delivery [IMAPSIEVE]. | |||
This Sieve script redirects messages to an automated recipient that | This Sieve script redirects messages to an automated recipient that | |||
skipping to change at page 8, line 46 ¶ | skipping to change at page 9, line 34 ¶ | |||
[IMAPSIEVE] | [IMAPSIEVE] | |||
Leiba, B., "Support for Internet Message Access Protocol | Leiba, B., "Support for Internet Message Access Protocol | |||
(IMAP) Events in Sieve", RFC 6785, DOI 10.17487/RFC6785, | (IMAP) Events in Sieve", RFC 6785, DOI 10.17487/RFC6785, | |||
November 2012, <http://www.rfc-editor.org/info/rfc6785>. | November 2012, <http://www.rfc-editor.org/info/rfc6785>. | |||
Author's Address | Author's Address | |||
Stephan Bosch | Stephan Bosch | |||
Dovecot Oy | Dovecot Oy | |||
Lars Sonckin Kaari 10 | Lars Sonckin Kaari 12 | |||
Espoo 02600 | Espoo 02600 | |||
Finland | Finland | |||
Email: stephan.bosch@dovecot.fi | Email: stephan.bosch@dovecot.fi | |||
End of changes. 13 change blocks. | ||||
40 lines changed or deleted | 51 lines changed or added | |||
This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |