| < draft-ietf-sieve-imap-sieve-03.txt | draft-ietf-sieve-imap-sieve-04.txt > | |||
|---|---|---|---|---|
| Sieve Working Group B. Leiba | Sieve Working Group B. Leiba | |||
| Internet-Draft Huawei Technologies | Internet-Draft Huawei Technologies | |||
| Intended status: Standards Track March 6, 2012 | Intended status: Standards Track May 30, 2012 | |||
| Expires: September 7, 2012 | Expires: December 1, 2012 | |||
| Support for Internet Message Access Protocol (IMAP) Events in Sieve | Support for Internet Message Access Protocol (IMAP) Events in Sieve | |||
| draft-ietf-sieve-imap-sieve-03 | draft-ietf-sieve-imap-sieve-04 | |||
| Abstract | Abstract | |||
| Sieve defines an email filtering language that can, in principle, | Sieve defines an email filtering language that can, in principle, | |||
| plug into any point in the processing of an email message. As | plug into any point in the processing of an email message. As | |||
| defined in the base specification, it plugs into mail delivery. This | defined in the base specification, it plugs into mail delivery. This | |||
| document defines how Sieve can plug into points in the IMAP protocol | document defines how Sieve can plug into points in the IMAP protocol | |||
| where messages are created or changed, adding the option of user- | where messages are created or changed, adding the option of user- | |||
| defined or installation-defined filtering (or, with Sieve extensions, | defined or installation-defined filtering (or, with Sieve extensions, | |||
| features such as notifications). | features such as notifications). | |||
| Note | ||||
| [[anchor1: RFC Editor: Please remove this note prior to | ||||
| publication.]] | ||||
| This document defines extensions to IMAP and Sieve. It is the work | ||||
| of the Sieve Working Group, but had previously been in the lemonade | ||||
| mailing list, as draft-ietf-lemonade-imap-sieve. | ||||
| 1. Discussion of this document should be taken to the Sieve mailing | ||||
| list at mailto:sieve@ietf.org | ||||
| 2. Subscription requests can be sent to | ||||
| mailto:sieve@ietf.org?body=subscribe (send an email message with | ||||
| the word "subscribe" in the body). | ||||
| 3. A WWW archive of back messages is available at | ||||
| http://www.ietf.org/mail-archive/web/sieve/index.html | ||||
| 4. Older messages, which were posted to the lemonade mailing list, | ||||
| are archived at | ||||
| http://www.ietf.org/mail-archive/web/lemonade/index.html | ||||
| Status of this Memo | Status of this Memo | |||
| This Internet-Draft is submitted in full conformance with the | This Internet-Draft is submitted in full conformance with the | |||
| provisions of BCP 78 and BCP 79. | provisions of BCP 78 and BCP 79. | |||
| 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 7, 2012. | This Internet-Draft will expire on December 1, 2012. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2012 IETF Trust and the persons identified as the | Copyright (c) 2012 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 | |||
| described in the Simplified BSD License. | described in the Simplified BSD License. | |||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 5 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
| 1.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 5 | 1.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
| 1.2. Differences Between IMAP Events and Mail Delivery . . . . 5 | 1.2. Differences Between IMAP Events and Mail Delivery . . . . 4 | |||
| 1.3. Conventions used in this document . . . . . . . . . . . . 6 | 1.3. Conventions used in this document . . . . . . . . . . . . 5 | |||
| 1.4. Notes from Reviews, and To-Do Items . . . . . . . . . . . 6 | ||||
| 2. The IMAP Events in Sieve Extension . . . . . . . . . . . . 8 | 2. The IMAP Events in Sieve Extension . . . . . . . . . . . . 6 | |||
| 2.1. The "imapsieve" Capability Strings . . . . . . . . . . . . 8 | 2.1. The "imapsieve" Capability Strings . . . . . . . . . . . . 6 | |||
| 2.2. Existing IMAP Functions Affected by IMAP events in | 2.2. Existing IMAP Functions Affected by IMAP events in | |||
| Sieve . . . . . . . . . . . . . . . . . . . . . . . . . . 8 | Sieve . . . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 2.2.1. The IMAP APPEND Command . . . . . . . . . . . . . . . . . 8 | 2.2.1. The IMAP APPEND Command . . . . . . . . . . . . . . . . . 7 | |||
| 2.2.2. The IMAP MULTIAPPEND Command . . . . . . . . . . . . . . . 9 | 2.2.2. The IMAP MULTIAPPEND Command . . . . . . . . . . . . . . . 7 | |||
| 2.2.3. The IMAP COPY Command . . . . . . . . . . . . . . . . . . 9 | 2.2.3. The IMAP COPY Command . . . . . . . . . . . . . . . . . . 7 | |||
| 2.2.4. Changes to IMAP Message Flags . . . . . . . . . . . . . . 9 | 2.2.4. Changes to IMAP Message Flags . . . . . . . . . . . . . . 7 | |||
| 2.3. New Functions Defined by IMAP events in Sieve . . . . . . 9 | 2.3. New Functions Defined by IMAP events in Sieve . . . . . . 8 | |||
| 2.3.1. Interaction with Metadata . . . . . . . . . . . . . . . . 10 | 2.3.1. Interaction with Metadata . . . . . . . . . . . . . . . . 8 | |||
| 3. Applicable Sieve Actions and Interactions . . . . . . . . 11 | 3. Applicable Sieve Actions and Interactions . . . . . . . . 10 | |||
| 3.1. The Implicit Keep . . . . . . . . . . . . . . . . . . . . 11 | 3.1. The Implicit Keep . . . . . . . . . . . . . . . . . . . . 10 | |||
| 3.2. The Keep Action . . . . . . . . . . . . . . . . . . . . . 11 | 3.2. The Keep Action . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 3.3. The Fileinto Action . . . . . . . . . . . . . . . . . . . 11 | 3.3. The Fileinto Action . . . . . . . . . . . . . . . . . . . 10 | |||
| 3.4. The Redirect Action . . . . . . . . . . . . . . . . . . . 12 | 3.4. The Redirect Action . . . . . . . . . . . . . . . . . . . 11 | |||
| 3.5. The Discard Action . . . . . . . . . . . . . . . . . . . . 12 | 3.5. The Discard Action . . . . . . . . . . . . . . . . . . . . 11 | |||
| 3.6. The Notify Action . . . . . . . . . . . . . . . . . . . . 13 | 3.6. The Notify Action . . . . . . . . . . . . . . . . . . . . 12 | |||
| 3.7. The Addheader and Deleteheader Actions . . . . . . . . . . 13 | 3.7. The Addheader and Deleteheader Actions . . . . . . . . . . 12 | |||
| 3.8. The Setflag, Deleteflag, and Removeflag Actions . . . . . 13 | 3.8. The Setflag, Deleteflag, and Removeflag Actions . . . . . 12 | |||
| 3.9. MIME Part Tests and Replacement . . . . . . . . . . . . . 13 | 3.9. MIME Part Tests and Replacement . . . . . . . . . . . . . 12 | |||
| 3.10. Spamtest and Virustest . . . . . . . . . . . . . . . . . . 14 | 3.10. Spamtest and Virustest . . . . . . . . . . . . . . . . . . 13 | |||
| 3.11. Inapplicable Actions . . . . . . . . . . . . . . . . . . . 14 | 3.11. Inapplicable Actions . . . . . . . . . . . . . . . . . . . 13 | |||
| 4. Interaction With Sieve Environment . . . . . . . . . . . . 15 | 4. Interaction With Sieve Environment . . . . . . . . . . . . 14 | |||
| 4.1. Base Sieve Environment Items: location and phase . . . . . 15 | 4.1. Base Sieve Environment Items: location and phase . . . . . 14 | |||
| 4.2. New Sieve Environment Items: imapuser and imapemail . . . 15 | 4.2. New Sieve Environment Items: imapuser and imapemail . . . 14 | |||
| 4.3. New Sieve Environment Item: cause . . . . . . . . . . . . 15 | 4.3. New Sieve Environment Item: cause . . . . . . . . . . . . 14 | |||
| 4.4. New Sieve Environment Item: mailbox . . . . . . . . . . . 16 | 4.4. New Sieve Environment Item: mailbox . . . . . . . . . . . 15 | |||
| 4.5. New Sieve Environment Item: changedflags . . . . . . . . . 16 | 4.5. New Sieve Environment Item: changedflags . . . . . . . . . 15 | |||
| 4.6. Interaction With Sieve Tests (Comparisons) . . . . . . . . 16 | 4.6. Interaction With Sieve Tests (Comparisons) . . . . . . . . 15 | |||
| 5. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 17 | ||||
| 6. Security Considerations . . . . . . . . . . . . . . . . . 18 | 5. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 16 | |||
| 7. IANA Considerations . . . . . . . . . . . . . . . . . . . 19 | 6. Security Considerations . . . . . . . . . . . . . . . . . 17 | |||
| 7.1. Registration of "imapsieve" IMAP capability . . . . . . . 19 | ||||
| 7.2. Registration of imapsieve Sieve extension . . . . . . . . 19 | ||||
| 7.3. Registration of environment item: cause . . . . . . . . . 19 | ||||
| 7.4. Registration of environment item: mailbox . . . . . . . . 20 | ||||
| 7.5. Registration of environment item: changedflags . . . . . . 20 | ||||
| 7.6. Registration of environment item: imapuser . . . . . . . . 20 | ||||
| 7.7. Registration of environment item: imapemail . . . . . . . 21 | ||||
| 7.8. Registration of IMAP METADATA mailbox entry name . . . . . 21 | ||||
| 7.9. Registration of IMAP METADATA server entry name . . . . . 22 | ||||
| 8. References . . . . . . . . . . . . . . . . . . . . . . . . 23 | 7. IANA Considerations . . . . . . . . . . . . . . . . . . . 18 | |||
| 8.1. Normative References . . . . . . . . . . . . . . . . . . . 23 | 7.1. Registration of "imapsieve" IMAP capability . . . . . . . 18 | |||
| 8.2. Non-Normative References . . . . . . . . . . . . . . . . . 23 | 7.2. Registration of "imapsieve" Sieve extension . . . . . . . 18 | |||
| 7.3. Registration of Sieve Environment Items . . . . . . . . . 18 | ||||
| 7.3.1. Registration of Sieve Environment Item: cause . . . . . . 18 | ||||
| 7.3.2. Registration of Sieve Environment Item: mailbox . . . . . 19 | ||||
| 7.3.3. Registration of Sieve Environment Item: changedflags . . . 19 | ||||
| 7.3.4. Registration of Sieve Environment Item: imapuser . . . . . 19 | ||||
| 7.3.5. Registration of Sieve Environment Item: imapemail . . . . 19 | ||||
| 7.4. Registration of IMAP METADATA Mailbox Entry Name . . . . . 19 | ||||
| 7.5. Registration of IMAP METADATA Server Entry Name . . . . . 20 | ||||
| Author's Address . . . . . . . . . . . . . . . . . . . . . 25 | 8. References . . . . . . . . . . . . . . . . . . . . . . . . 21 | |||
| 8.1. Normative References . . . . . . . . . . . . . . . . . . . 21 | ||||
| 8.2. Informative References . . . . . . . . . . . . . . . . . . 21 | ||||
| Author's Address . . . . . . . . . . . . . . . . . . . . . 23 | ||||
| 1. Introduction | 1. Introduction | |||
| 1.1. Overview | 1.1. Overview | |||
| Some applications have a need to apply Sieve filters [RFC5228] in | Some applications have a need to apply Sieve filters [RFC5228] in | |||
| contexts other than initial mail delivery. This is especially true | contexts other than initial mail delivery. This is especially true | |||
| in diverse service environments, such as when the client is | in diverse service environments, such as when the client is | |||
| sporadically connected, is connected through a high-latency or high- | sporadically connected, is connected through a high-latency or high- | |||
| cost channel, or is on a limited-function device. For such clients, | cost channel, or is on a limited-function device. For such clients, | |||
| skipping to change at page 6, line 8 ¶ | skipping to change at page 5, line 8 ¶ | |||
| a large number of messages at once. Implementations will have to | a large number of messages at once. Implementations will have to | |||
| deal with such situations as a "COPY" action or flag changes on | deal with such situations as a "COPY" action or flag changes on | |||
| dozens, or even thousands of messages. | dozens, or even thousands of messages. | |||
| Other issues might surface as this extension is deployed and | Other issues might surface as this extension is deployed and | |||
| experience with it develops. | experience with it develops. | |||
| 1.3. Conventions used in this document | 1.3. Conventions used in this document | |||
| The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
| "SHOULD", "SHOULD NOT", "MAY", and "OPTIONAL" in this document are to | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | |||
| be interpreted as described in [RFC2119]. | document are to be interpreted as described in [RFC2119]. | |||
| 1.4. Notes from Reviews, and To-Do Items | ||||
| [[anchor3: This section should be resolved and removed prior to | ||||
| publication.]] | ||||
| Stephan Bosch: 4) Invoking the Sieve script linked to the mailbox for | ||||
| every possible event seems inefficient, especially when only one | ||||
| event (e.g. APPEND) is of interest. Whould a means to explicitly | ||||
| select which events are applicable for a (mailbox, script) pair be | ||||
| useful? | ||||
| Barry: We did discuss the general issue of multiple scripts, and I | ||||
| had originally planned to have separate scripts for each event | ||||
| type ("cause"). In the end, we decided that was too complicated, | ||||
| and could be added as a later extension if it turns out to be | ||||
| important. | ||||
| Stephan Bosch: 6) Allowing redirect seems risky. What if I | ||||
| accidently 'drag' in my mailclient the content of some enormous | ||||
| mailing list mailbox to a Sieve-enabled mailbox with a redirect? | ||||
| Shouldn't this at least be bounded somehow? | ||||
| Barry: I don't know if we can specify what to do -- I don't know | ||||
| if we KNOW what to do -- but I've incorporated this into my answer | ||||
| to (7), below. | ||||
| Stephan Bosch: 7) Since this document essentially defines a whole new | ||||
| context in which Sieve scripts can be executed, it can be helpful for | ||||
| the reader to have an introductory section that outlines and | ||||
| summarizes the main differences between the new and the familiar | ||||
| context, e.g. things like the lack of an envelope as pointed out | ||||
| earlier on this list, the undesirability of sending responses back to | ||||
| senders, etc. | ||||
| Barry: I've added a section to the introduction, "Differences | ||||
| Between IMAP Events and Mail Delivery". Please review it, and see | ||||
| if there's stuff to add. | ||||
| To Do: "Interaction with Metadata": Add text requiring ManageSieve, | ||||
| and giving ManageSieve URI in IMAP capability. | ||||
| To Do: "Interaction with Metadata": Add ManageSieve action to set | ||||
| metadata item. | ||||
| 2. The IMAP Events in Sieve Extension | 2. The IMAP Events in Sieve Extension | |||
| 2.1. The "imapsieve" Capability Strings | 2.1. The "imapsieve" Capability Strings | |||
| An IMAP server advertises support for IMAP events in Sieve through | An IMAP server advertises support for IMAP events in Sieve through | |||
| the capability string "imapsieve". A server that advertises | the "imapsieve" capability. A server that advertises "imapsieve" is | |||
| "imapsieve" is claiming to be in compliance with this specification | claiming to be in compliance with this specification in all aspects. | |||
| in all aspects. | The syntax of the "imapsieve" capability string is defined as | |||
| follows: | ||||
| capability /= "IMAPSIEVE=" sieveurl-server | ||||
| ; <sieveurl-server> is defined in RFC 5804, Section 3 | ||||
| Only one "imapsieve" capability string, specifying one sieveurl- | ||||
| server, can be present. | ||||
| The corresponding Sieve implementation uses the Sieve capability | The corresponding Sieve implementation uses the Sieve capability | |||
| string "imapsieve", and Sieve scripts that depend upon the IMAP | string "imapsieve", and Sieve scripts that depend upon the IMAP | |||
| events MUST include that string in their "required" lists. | events MUST include that string in their "required" lists. | |||
| Implementations that support IMAP events in Sieve MUST also support | Implementations that support IMAP events in Sieve MUST also support | |||
| IMAP Metadata [RFC5464] and Sieve Environment [RFC5183], because | IMAP Metadata [RFC5464] and Sieve Environment [RFC5183], because | |||
| Metadata is used to associate scripts with IMAP mailboxes and | Metadata is used to associate scripts with IMAP mailboxes and | |||
| Environment defines an important way for Sieve scripts to test the | Environment defines an important way for Sieve scripts to test the | |||
| conditions under which they have been invoked. Notwithstanding the | conditions under which they have been invoked. Notwithstanding the | |||
| skipping to change at page 10, line 28 ¶ | skipping to change at page 8, line 32 ¶ | |||
| shared value of that metadata name (its "value.shared" attribute) | shared value of that metadata name (its "value.shared" attribute) | |||
| MUST be the name of the Sieve script that will be invoked in response | MUST be the name of the Sieve script that will be invoked in response | |||
| to the IMAP event. Note that only the value.shared attribute is | to the IMAP event. Note that only the value.shared attribute is | |||
| used; any value.priv attributes are ignored. | used; any value.priv attributes are ignored. | |||
| This specifies the mechanism for "activating" a script for a given | This specifies the mechanism for "activating" a script for a given | |||
| mailbox (or for all mailboxes), but does not specify a mechanism for | mailbox (or for all mailboxes), but does not specify a mechanism for | |||
| creating, storing, or validating the script. Implementations MUST | creating, storing, or validating the script. Implementations MUST | |||
| support ManageSieve [RFC5804], and can use the PUTSCRIPT command to | support ManageSieve [RFC5804], and can use the PUTSCRIPT command to | |||
| store the script without using the SETACTIVE command to activate it. | store the script without using the SETACTIVE command to activate it. | |||
| In any case, the script name that is specified in the /IMAPSieve/ | ||||
| Script metadata entry is in a form that depends upon how the server | Script names used in "/IMAPSieve/Script" metadata entries are the | |||
| handles the storing of Sieve scripts. Script names used here MUST | script names used on the corresponding ManageSieve server. If an | |||
| match script names used by METADATA. | "/IMAPSieve/Script" metadata entry contains a script name that | |||
| doesn't exist in the ManageSieve server, then no Sieve script will be | ||||
| invoked for IMAP Sieve events. | ||||
| Only one Sieve script may currently be defined per mailbox, | Only one Sieve script may currently be defined per mailbox, | |||
| eliminating the complexity and possible ambiguity involved with | eliminating the complexity and possible ambiguity involved with | |||
| coordinating the results of multiple scripts. Any sub-filtering is | coordinating the results of multiple scripts. Any sub-filtering is | |||
| done in the Sieve script. For example, if it's only necessary to | done in the Sieve script. For example, if it's only necessary to | |||
| deal with flag changes, but not with new messages appended or copied, | deal with flag changes, but not with new messages appended or copied, | |||
| the Sieve script will still be invoked for all events, and the script | the Sieve script will still be invoked for all events, and the script | |||
| is responsible for checking the event type. | is responsible for checking the event type. | |||
| The possibility is open for an extension to add support for multiple | The possibility is open for an extension to add support for multiple | |||
| skipping to change at page 12, line 22 ¶ | skipping to change at page 11, line 22 ¶ | |||
| events in Sieve. It causes the message to be sent, as specified in | events in Sieve. It causes the message to be sent, as specified in | |||
| the base Sieve specification, to the designated address. If the Copy | the base Sieve specification, to the designated address. If the Copy | |||
| extension [RFC3894] is available and the :copy option is specified, | extension [RFC3894] is available and the :copy option is specified, | |||
| the implicit keep is retained; otherwise, redirect cancels the | the implicit keep is retained; otherwise, redirect cancels the | |||
| implicit keep, as specified in the base Sieve specification. | implicit keep, as specified in the base Sieve specification. | |||
| It's possible that a message processed in this way does not have the | It's possible that a message processed in this way does not have the | |||
| information necessary to be redirected properly. It might lack | information necessary to be redirected properly. It might lack | |||
| necessary header information, and there might not be appropriate | necessary header information, and there might not be appropriate | |||
| information for the MAIL FROM command. In such cases, the "redirect" | information for the MAIL FROM command. In such cases, the "redirect" | |||
| action uses Message Submission [RFC4409], and it is up to the Sieve | action uses Message Submission [RFC6409], and it is up to the Sieve | |||
| engine to supply the missing information. The redirect address is, | engine to supply the missing information. The redirect address is, | |||
| of course, used for the "RCPT TO", and the "MAIL FROM" SHOULD be set | of course, used for the "RCPT TO", and the "MAIL FROM" SHOULD be set | |||
| to the address of the owner of the mailbox. The message submission | to the address of the owner of the mailbox. The message submission | |||
| server is allowed, according to the Message Submission protocol, to | server is allowed, according to the Message Submission protocol, to | |||
| perform necessary fix-up to the message (see section 8 of RFC 4409). | perform necessary fix-up to the message (see section 8 of RFC 6409). | |||
| It can also reject the submission attempt, if the message is too ill- | It can also reject the submission attempt, if the message is too ill- | |||
| formed for submission. | formed for submission. | |||
| For APPEND, MULTIAPPEND, and COPY, the message is stored into the | For APPEND, MULTIAPPEND, and COPY, the message is stored into the | |||
| target mailbox in addition to being redirected. For flag changes, | target mailbox in addition to being redirected. For flag changes, | |||
| the message remains in its original mailbox. | the message remains in its original mailbox. | |||
| If a keep action is NOT also in effect, the original message is then | If a keep action is NOT also in effect, the original message is then | |||
| marked with the \Deleted flag (and a flag-change Sieve script is NOT | marked with the \Deleted flag (and a flag-change Sieve script is NOT | |||
| invoked). The implementation MAY then expunge the original message | invoked). The implementation MAY then expunge the original message | |||
| skipping to change at page 18, line 5 ¶ | skipping to change at page 16, line 40 ¶ | |||
| if environment :matches "mailbox" "*" { | if environment :matches "mailbox" "*" { | |||
| set "mailbox" "${1}"; | set "mailbox" "${1}"; | |||
| } | } | |||
| if allof (hasflag "\\Flagged", | if allof (hasflag "\\Flagged", | |||
| not environment :contains "changedflags" "\\Flagged") { | not environment :contains "changedflags" "\\Flagged") { | |||
| notify :message "Important message in ${mailbox}" | notify :message "Important message in ${mailbox}" | |||
| "xmpp:tim@example.com?message;subject=SIEVE"; | "xmpp:tim@example.com?message;subject=SIEVE"; | |||
| } | } | |||
| Example 3: | ||||
| This shows an example IMAP CAPABILITY response when this extension is | ||||
| supported. The client has done STARTTLS with the server, and is now | ||||
| inspecting capabilities. (The untagged CAPABILITY response is split | ||||
| here for readability only, but will be in one response message.) | ||||
| C: A01 CAPABILITY | ||||
| S: * CAPABILITY IMAP4rev1 AUTH=PLAIN UIDPLUS LIST-EXTENDED | ||||
| ACL IMAPSIEVE=sieve://sieve.example.com MULTISEARCH | ||||
| S: A01 OK done | ||||
| 6. Security Considerations | 6. Security Considerations | |||
| It is possible to introduce script processing loops by having a Sieve | It is possible to introduce script processing loops by having a Sieve | |||
| script that is triggered by flag changes use the actions defined in | script that is triggered by flag changes use the actions defined in | |||
| the IMAP4Flags extension [RFC5232]. Implementations MUST take steps | the IMAP4Flags extension [RFC5232]. Implementations MUST take steps | |||
| to prevent such loops. One way to avoid this problem is that if a | to prevent such loops. One way to avoid this problem is that if a | |||
| script is invoked by flag changes, and that script further changes | script is invoked by flag changes, and that script further changes | |||
| the flags, those flag changes SHOULD NOT trigger a Sieve script | the flags, those flag changes SHOULD NOT trigger a Sieve script | |||
| invocation. | invocation. | |||
| skipping to change at page 19, line 9 ¶ | skipping to change at page 18, line 9 ¶ | |||
| the applicable notification-method documents for loop-prevention | the applicable notification-method documents for loop-prevention | |||
| information. This extension does not change any of that advice. | information. This extension does not change any of that advice. | |||
| Other security considerations are discussed in IMAP [RFC3501], and | Other security considerations are discussed in IMAP [RFC3501], and | |||
| Sieve [RFC5228], as well as in some of the other extension documents. | Sieve [RFC5228], as well as in some of the other extension documents. | |||
| 7. IANA Considerations | 7. IANA Considerations | |||
| 7.1. Registration of "imapsieve" IMAP capability | 7.1. Registration of "imapsieve" IMAP capability | |||
| This document defines a new IMAP capability. IANA is asked to add | IANA is asked to add "IMAPSIEVE=" to the IMAP 4 Capabilities | |||
| "imapsieve" to the IMAP 4 Capabilities registry. | registry, according to the IMAP 4 specification [RFC3501]. | |||
| (http://www.iana.org/assignments/imap4-capabilities) | ||||
| 7.2. Registration of imapsieve Sieve extension | 7.2. Registration of "imapsieve" Sieve extension | |||
| The following template specifies the IANA registration of the Sieve | The following information should be added to the Sieve Extensions | |||
| extension specified in this document: | registry, according to the Sieve specification [RFC5228]. (http:// | |||
| www.iana.org/assignments/sieve-extensions/sieve-extensions.xml) | ||||
| To: iana@iana.org | To: iana@iana.org | |||
| Subject: Registration of new Sieve extension | Subject: Registration of new Sieve extension | |||
| Capability name: imapsieve | Capability name: imapsieve | |||
| Description: Add Sieve processing for IMAP events. | Description: Add Sieve processing for IMAP events. | |||
| 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 | 7.3. Registration of Sieve Environment Items | |||
| given on http://www.iana.org/assignments/sieve-extensions. | ||||
| 7.3. Registration of environment item: cause | The following subsections register items in the Sieve Environment | |||
| Items registry, according to the Environment extension [RFC5183]. | ||||
| (http://www.iana.org/assignments/sieve-environment-items/ sieve- | ||||
| environment-items.xml) | ||||
| The following template specifies the IANA registration of a sieve | 7.3.1. Registration of Sieve Environment Item: cause | |||
| environment item specified in this document: | ||||
| To: iana@iana.org | To: iana@iana.org | |||
| Subject: Registration of new Sieve environment item | Subject: Registration of new Sieve environment item | |||
| Item name: cause | Item name: cause | |||
| Description: The name of the action that caused the script to be | Description: The name of the action that caused the script to be | |||
| invoked. Its value is one of the following: | invoked. Its value is one of the following: | |||
| o APPEND (for invocations resulting from APPEND or MULTIAPPEND) | o APPEND (for invocations resulting from APPEND or MULTIAPPEND) | |||
| o COPY (for invocations resulting from COPY) | o COPY (for invocations resulting from COPY) | |||
| o FLAG (for invocations resulting from flag changes) | o FLAG (for invocations resulting from flag changes) | |||
| RFC number: this RFC | RFC number: [[this RFC]] | |||
| Contact address: | Contact address: Sieve mailing list <sieve@ietf.org> | |||
| Sieve mailing list <sieve@ietf.org> | ||||
| This information should be added to the list of sieve environment | ||||
| item names given in the Environment extension [RFC5183]. | ||||
| 7.4. Registration of environment item: mailbox | ||||
| The following template specifies the IANA registration of a sieve | 7.3.2. Registration of Sieve Environment Item: mailbox | |||
| environment item specified in this document: | ||||
| To: iana@iana.org | To: iana@iana.org | |||
| Subject: Registration of new Sieve environment item | Subject: Registration of new Sieve environment item | |||
| Item name: mailbox | Item name: mailbox | |||
| Description: The name of the mailbox that the affected message is in, | Description: The name of the mailbox that the affected message is in, | |||
| in the case of existing messages, or is targeted to be stored into, | in the case of existing messages, or is targeted to be stored into, | |||
| in the case of new messages. The value of this item is fixed when | in the case of new messages. The value of this item is fixed when | |||
| the script begins, and, in particular, MUST NOT change as a result of | the script begins, and, in particular, MUST NOT change as a result of | |||
| any action, such as "fileinto". | any action, such as "fileinto". | |||
| RFC number: this RFC | RFC number: [[this RFC]] | |||
| Contact address: | Contact address: Sieve mailing list <sieve@ietf.org> | |||
| Sieve mailing list <sieve@ietf.org> | ||||
| This information should be added to the list of sieve environment | ||||
| item names given in the Environment extension [RFC5183]. | ||||
| 7.5. Registration of environment item: changedflags | ||||
| The following template specifies the IANA registration of a sieve | 7.3.3. Registration of Sieve Environment Item: changedflags | |||
| environment item specified in this document: | ||||
| To: iana@iana.org | To: iana@iana.org | |||
| Subject: Registration of new Sieve environment item | Subject: Registration of new Sieve environment item | |||
| Item name: changedflags | Item name: changedflags | |||
| Description: If the script was invoked because of flag changes to an | Description: If the script was invoked because of flag changes to an | |||
| existing message, this contains the name(s) of the flag(s) that have | existing message, this contains the name(s) of the flag(s) that have | |||
| changed. Otherwise, the value of this item MUST be the empty string. | changed. Otherwise, the value of this item MUST be the empty string. | |||
| RFC number: this RFC | RFC number: [[this RFC]] | |||
| Contact address: | Contact address: Sieve mailing list <sieve@ietf.org> | |||
| Sieve mailing list <sieve@ietf.org> | ||||
| This information should be added to the list of sieve environment | ||||
| item names given in the Environment extension [RFC5183]. | ||||
| 7.6. Registration of environment item: imapuser | ||||
| The following template specifies the IANA registration of a sieve | 7.3.4. Registration of Sieve Environment Item: imapuser | |||
| environment item specified in this document: | ||||
| To: iana@iana.org | To: iana@iana.org | |||
| Subject: Registration of new Sieve environment item | Subject: Registration of new Sieve environment item | |||
| Item name: imapuser | Item name: imapuser | |||
| Description: The identity (IMAP login ID) of the IMAP user that | Description: The identity (IMAP login ID) of the IMAP user that | |||
| caused the action. | caused the action. | |||
| RFC number: [[this RFC]] | ||||
| Contact address: Sieve mailing list <sieve@ietf.org> | ||||
| RFC number: this RFC | 7.3.5. Registration of Sieve Environment Item: imapemail | |||
| Contact address: | ||||
| Sieve mailing list <sieve@ietf.org> | ||||
| This information should be added to the list of sieve environment | ||||
| item names given in the Environment extension [RFC5183]. | ||||
| 7.7. Registration of environment item: imapemail | ||||
| The following template specifies the IANA registration of a sieve | ||||
| environment item specified in this document: | ||||
| To: iana@iana.org | To: iana@iana.org | |||
| Subject: Registration of new Sieve environment item | Subject: Registration of new Sieve environment item | |||
| Item name: imapemail | Item name: imapemail | |||
| Description: The primary email address of the IMAP user that caused | Description: The primary email address of the IMAP user that caused | |||
| the action (the user identified by "imapuser"). | the action (the user identified by "imapuser"). | |||
| RFC number: this RFC | RFC number: [[this RFC]] | |||
| Contact address: | Contact address: Sieve mailing list <sieve@ietf.org> | |||
| Sieve mailing list <sieve@ietf.org> | ||||
| This information should be added to the list of sieve environment | 7.4. Registration of IMAP METADATA Mailbox Entry Name | |||
| item names given in the Environment extension [RFC5183]. | ||||
| 7.8. Registration of IMAP METADATA mailbox entry name | The following information should be added to the IMAP METADATA | |||
| Mailbox Entry Registry, according to the Metadata extension | ||||
| The following template specifies the IANA registration of an IMAP | [RFC5464]. | |||
| METADATA entry name specified in this document: | (http://www.iana.org/assignments/imap-metadata/imap-metadata.xml) | |||
| To: iana@iana.org | To: iana@iana.org | |||
| Subject: IMAP METADATA Registration | Subject: IMAP METADATA Registration | |||
| Please register the following IMAP METADATA item: | Please register the following IMAP METADATA item: | |||
| [x] Entry [ ] Attribute | [x] Entry [ ] Attribute | |||
| [x] Mailbox [ ] Server | [x] Mailbox [ ] Server | |||
| Name: /IMAPSieve/Script | Name: /IMAPSieve/Script | |||
| Description: This entry name is used to define mailbox metadata | Description: This entry name is used to define mailbox metadata | |||
| associated with IMAP events in Sieve for the associated mailbox. | associated with IMAP events in Sieve for the associated mailbox. | |||
| Specifically, this specifies the Sieve script that will be invoked | Specifically, this specifies the Sieve script that will be invoked | |||
| when IMAP events occur on the specified mailbox. | when IMAP events occur on the specified mailbox. | |||
| Content-type: text/plain; charset=utf-8 | Content-type: text/plain; charset=utf-8 | |||
| RFC number: this RFC | RFC number: [[this RFC]] | |||
| Contact person: Sieve mailing list | Contact address: Sieve mailing list <sieve@ietf.org> | |||
| Contact email: sieve@ietf.org | ||||
| This information should be added to the list of IMAP METADATA item | ||||
| names given in the Metadata extension [RFC5464]. | ||||
| 7.9. Registration of IMAP METADATA server entry name | 7.5. Registration of IMAP METADATA Server Entry Name | |||
| The following template specifies the IANA registration of an IMAP | The following information should be added to the IMAP METADATA Server | |||
| METADATA entry name specified in this document: | Entry Registry, items according to the Metadata extension [RFC5464]. | |||
| (http://www.iana.org/assignments/imap-metadata/imap-metadata.xml) | ||||
| To: iana@iana.org | To: iana@iana.org | |||
| Subject: IMAP METADATA Registration | Subject: IMAP METADATA Registration | |||
| Please register the following IMAP METADATA item: | Please register the following IMAP METADATA item: | |||
| [x] Entry [ ] Attribute | [x] Entry [ ] Attribute | |||
| [ ] Mailbox [x] Server | [ ] Mailbox [x] Server | |||
| Name: /IMAPSieve/Script | Name: /IMAPSieve/Script | |||
| Description: This entry name is used to define metadata associated | Description: This entry name is used to define metadata associated | |||
| globally with IMAP events in Sieve for the associated server. | globally with IMAP events in Sieve for the associated server. | |||
| Specifically, this specifies the Sieve script that will be invoked | Specifically, this specifies the Sieve script that will be invoked | |||
| when IMAP events occur on any mailbox in the server that does not | when IMAP events occur on any mailbox in the server that does not | |||
| have its own mailbox-level /IMAPSieve/Script entry. | have its own mailbox-level /IMAPSieve/Script entry. | |||
| Content-type: text/plain; charset=utf-8 | Content-type: text/plain; charset=utf-8 | |||
| RFC number: this RFC | RFC number: [[this RFC]] | |||
| Contact person: Sieve mailing list | Contact address: Sieve mailing list <sieve@ietf.org> | |||
| Contact email: sieve@ietf.org | ||||
| This information should be added to the list of IMAP METADATA item | ||||
| names given in the Metadata extension [RFC5464]. | ||||
| 8. References | 8. References | |||
| 8.1. Normative References | 8.1. Normative References | |||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] 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. | |||
| [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION | [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION | |||
| 4rev1", RFC 3501, March 2003. | 4rev1", RFC 3501, March 2003. | |||
| [RFC3502] Crispin, M., "Internet Message Access Protocol (IMAP) - | [RFC3502] Crispin, M., "Internet Message Access Protocol (IMAP) - | |||
| MULTIAPPEND Extension", RFC 3502, March 2003. | MULTIAPPEND Extension", RFC 3502, March 2003. | |||
| [RFC3894] Degener, J., "Sieve Extension: Copying Without Side | [RFC3894] Degener, J., "Sieve Extension: Copying Without Side | |||
| Effects", RFC 3894, October 2004. | Effects", RFC 3894, October 2004. | |||
| [RFC4409] Gellens, R. and J. Klensin, "Message Submission for Mail", | ||||
| RFC 4409, April 2006. | ||||
| [RFC5183] Freed, N., "Sieve Email Filtering: Environment Extension", | [RFC5183] Freed, N., "Sieve Email Filtering: Environment Extension", | |||
| RFC 5183, May 2008. | RFC 5183, May 2008. | |||
| [RFC5228] Guenther, P. and T. Showalter, "Sieve: An Email Filtering | [RFC5228] Guenther, P. and T. Showalter, "Sieve: An Email Filtering | |||
| Language", RFC 5228, January 2008. | Language", RFC 5228, January 2008. | |||
| [RFC5232] Melnikov, A., "Sieve Email Filtering: Imap4flags | [RFC5232] Melnikov, A., "Sieve Email Filtering: Imap4flags | |||
| Extension", RFC 5232, January 2008. | Extension", RFC 5232, January 2008. | |||
| [RFC5464] Daboo, C., "The IMAP METADATA Extension", RFC 5464, | [RFC5464] Daboo, C., "The IMAP METADATA Extension", RFC 5464, | |||
| February 2009. | February 2009. | |||
| [RFC5804] Melnikov, A. and T. Martin, "A Protocol for Remotely | [RFC5804] Melnikov, A. and T. Martin, "A Protocol for Remotely | |||
| Managing Sieve Scripts", RFC 5804, July 2010. | Managing Sieve Scripts", RFC 5804, July 2010. | |||
| 8.2. Non-Normative References | [RFC6409] Gellens, R. and J. Klensin, "Message Submission for Mail", | |||
| STD 72, RFC 6409, November 2011. | ||||
| 8.2. Informative References | ||||
| [RFC4315] Crispin, M., "Internet Message Access Protocol (IMAP) - | [RFC4315] Crispin, M., "Internet Message Access Protocol (IMAP) - | |||
| UIDPLUS extension", RFC 4315, December 2005. | UIDPLUS extension", RFC 4315, December 2005. | |||
| [RFC5230] Showalter, T. and N. Freed, "Sieve Email Filtering: | [RFC5230] Showalter, T. and N. Freed, "Sieve Email Filtering: | |||
| Vacation Extension", RFC 5230, January 2008. | Vacation Extension", RFC 5230, January 2008. | |||
| [RFC5235] Daboo, C., "Sieve Email Filtering: Spamtest and Virustest | [RFC5235] Daboo, C., "Sieve Email Filtering: Spamtest and Virustest | |||
| Extensions", RFC 5235, January 2008. | Extensions", RFC 5235, January 2008. | |||
| End of changes. 44 change blocks. | ||||
| 210 lines changed or deleted | 130 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||