[Docs] [txt|pdf] [Tracker] [Email] [Nits]

Versions: 00 01 02 03 04 05 06 07 08 RFC 5490

Internet Draft                                             A. Melnikov
Expires: April 2007                                          Isode Ltd
                                                          October 2006


         The SIEVE mail filtering language - extension for accessing
                             mailbox metadata
              draft-melnikov-sieve-imapext-metadata-00.txt

Status of this Memo

   By submitting this Internet-Draft, each author represents that any
   applicable patent or other IPR claims of which he or she is aware
   have been or will be disclosed, and any of which he or she becomes
   aware will be disclosed, in accordance with Section 6 of BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   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."

   The list of current Internet-Drafts can be accessed at
        http://www.ietf.org/ietf/1id-abstracts.txt
   The list of Internet-Draft Shadow Directories can be accessed at
        http://www.ietf.org/shadow.html.

   A revised version of this draft document will be submitted to the
   RFC editor as a Proposed Standard for the Internet Community.
   Discussion and suggestions for improvement are requested.
   Distribution of this draft is unlimited.


Abstract

   This memo defines and extension to the SIEVE mail filtering language
   (RFC 3028) for accessing IMAP mailbox and server annotations.

1.   Introduction

   This memo defines and extension to the SIEVE mail filtering language
   (RFC 3028) for accessing IMAP mailbox and server annotations.
   This allows to customize Sieve engine behaviour based on mailbox
   annotations.


2.   Conventions Used in this Document

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in
   this document are to be interpreted as described in RFC 2119.

   Conventions for notations are as in [SIEVE] section 1.1.

3.  mailbox and mboxmetadata Sieve extensions

3.1.  Test mailbox_exists

      Usage:   mailbox_exists <mailbox-names: string-list>

   The "mailbox_exists" test is true if the mailbox listed in the
   mailbox-names argument exist in the mailstore.
   <<Add some text saying that this making sense only if used with
   an IMAP mailstore or similar.>>
   Note that this test MUST return false for a mailbox which exists
   but is not accessible (for example due to access control
   restrictions) to the user in whose context the Sieve script runs.

   The capability string for use with the require command is "mailbox"
   or "mboxmetadata".

   Example: The following example assumes that the Sieve engine
    also supports "reject" [REJECT] and "fileinto" [SIEVE]. However
    these extensions are not required in order to implement the
    "mailbox".

             require ["fileinto", "reject", "mailbox"];
             if mailbox_exists "Partners" {
                fileinto "Partners";
             } else {
                reject "This message was not accepted by the Mailstore";
             }


3.2  Test metadata

      Usage:   metadata [MATCH-TYPE] [COMPARATOR]
               [":shared" / ":private"] <mailbox: string>
               <annotation-name: string> <key-list: string-list>

   This test retrieves the "value.priv" or "value.shared" of the mailbox
   annotation "annotation-name" for the mailbox "mailbox"
   [MBOX-ANNOTATIONS]. The retrieved value is compared to the
   "key-list". The test returns true <<if the annotation exists and>>
   its value matches any of the keys.

   The default annotation type is ":private". The default match type is
   ":is". The default comparator is "i;ascii-casemap".

   The capability string for use with the require command is
   "mboxmetadata".

   Example: The following example assumes that the Sieve engine
    also supports "variables" [Variables] and "notify" [NOTIFY] and
    "envelope" [SIEVE] extensions. However these extensions are not
    required in order to implement the "mboxmetadata".

        require ["notify", "mboxmetadata", "variables", "envelope"];

        if metadata :matches :private "INBOX"
           "/vendor/isode/notification-uri" "*" {
            set "notif_uri" "${0}";
        }

        if not string :is "${notif_uri}" "none" {
            # :matches is used to get the MAIL FROM address
            if envelope :all :matches "from" "*" {
                set "env_from" " [really: ${1}]";
            }

            # :matches is used to get the value of the Subject header
            if header :matches "Subject" "*" {
                set "subject" "${1}";
            }

            # :matches is used to get the address from the From header
            if address :matches :all "from" "*" {
                set "from_addr" "${1}";
            }

            notify :method "${notif_uri}"
                   :message "${from_addr}${env_from}: ${subject}";
        }

4.   Security Considerations

   <<TBD>>


5.   IANA Considerations

   IANA is requested to add the following registrations to the list of
   Sieve extensions:

   Capability name: "mailbox"
   Description:     adds tests for checking for mailbox existence.
   RFC number:      this RFC
   Contact address: The Sieve discussion list <ietf-mta-filters@imc.org>

   Capability name: "mboxmetadata"
   Description:     adds tests for checking for mailbox existence,
                    checking for mailbox metadata item existence
                    and for retriving of a mailbox metadata value.
   RFC number:      this RFC
   Contact address: The Sieve discussion list <ietf-mta-filters@imc.org>


6.   References

6.1  Normative References

   [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
   Requirement Levels", RFC 2119, March 1997.

   [SIEVE] Showalter, T. and P. Guenther, "Sieve: An Email Filtering
   Language", Work-in-progress, draft-ietf-sieve-3028bis-XX.txt

   [MBOX-ANNOTATIONS] Daboo, C., "IMAP METADATA Extension",
   work in progress, draft-daboo-imap-annotatemore-XX.txt


6.2  Informative References

   [Variables] Homme, K., "Sieve Extension: Variables", work in
   progress, draft-ietf-sieve-variables-XX.txt

   [NOTIFY] Melnikov, A. (Ed.), Leiba, B. (Ed.), Segmuller, W. and
   T. Martin, "Sieve Extension: Notifications", work in progress,
   draft-ietf-sieve-notify-XX.txt

   [REJECT] Elvey, M. and A. Melnikov, The SIEVE mail filtering language
   - reject extension", work in progress,
   draft-ietf-sieve-refuse-reject-XX.txt


7.   Acknowledgments

   Thanks to Cyrus Daboo for initial motivation for this draft.


8.   Author's Addresses

   Alexey Melnikov
   Isode Limited
   5 Castle Business Village
   36 Station Road
   Hampton, Middlesex, TW12 2BX
   UK

   Email: Alexey.Melnikov@isode.com


9.   Intellectual Property Rights Statement

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed
   to pertain to the implementation or use of the technology described
   in this document or the extent to which any license under such
   rights might or might not be available; nor does it represent that
   it has made any independent effort to identify any such rights.
   Information on the procedures with respect to rights in RFC
   documents can be found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use
   of such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository
   at http://www.ietf.org/ipr.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at ietf-
   ipr@ietf.org.

10.  Full Copyright Statement

   Copyright (C) The Internet Society (2006).

   This document is subject to the rights, licenses and restrictions
   contained in BCP 78, and except as set forth therein, the authors
   retain all their rights.

   This document and the information contained herein are provided on
   an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE
   REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND
   THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES,
   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT
   THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR
   ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
   PARTICULAR PURPOSE.

   Acknowledgement

   Funding for the RFC Editor function is currently provided by the
   Internet Society.


11.  Change Log and Open Issues

  <<NOTE to the RFC editor: please delete this section before
  publication.>>

11.1 Open Issues

   1) Add a test for annotation existence? - Yes
   2) Do we need a test for server annotations? - Probably yes
   3) Add support for other LIST-EXTENDED options?

11.2 Change Log

   00   First revision


Html markup produced by rfcmarkup 1.107, available from http://tools.ietf.org/tools/rfcmarkup/