Hi,
I've recently wrote SIEVE extension that allows to set IMAP flags on
delivery. I will appreciate any feedback from the mailing list.
Cheers,
Alexey Melnikov
------------------------------------------
SMTP/POP3/IMAP4/ACAP servers creation team
Epsylon Technologies, Russia
http://www.taxxi.com
Imap Development Kit (my own product)
http://194.87.43.111/homerus/mail/idk/index.htm
Fax (in San Diego, California): 1 (619) 8393837
------------------------------------------
Network Working Group
Internet Draft: Sieve -- IMAP flag Extension A. Melnikov
Document: draft-melnikov-sieve-imapflags-00.txt Epsylon Technologies
Expires: 22 April 1999 22 October 1998
Sieve -- IMAP flag Extension
Status of this memo
This document is an Internet-Draft. 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.''
To learn the current status of any Internet-Draft, please check the
``1id-abstracts.txt'' listing contained in the Internet-Drafts
Shadow Directories on ftp.is.co.za (Africa), ftp.nordu.net
(Europe), munnari.oz.au (Pacific Rim), ds.internic.net (US East
Coast), or ftp.isi.edu (US West Coast).
The protocol discussed in this document is experimental and subject
to change. Persons planning on either implementing or using this
protocol are STRONGLY URGED to get in touch with the author before
embarking on such a project.
Copyright
Copyright (C) The Internet Society 1998. All Rights Reserved.
Abstract
Recent discussions have shown that it was desirable to set
different [IMAP] flags on message delivery. (This can be done, for
example, by SIEVE interpreter that works as a part of Mail Delivery
Agent (MDA)).
This document describes an extension to the Sieve mail filtering
language for setting [IMAP] flags.
Melnikov Expires April 1999 [Page 1]
Internet Draft Sieve -- IMAP flag Extension October 1998
0. Meta-information on this draft
This information is intended to facilitate discussion. It will be
removed when this document leaves the Internet-Draft stage.
0.1. Discussion
This draft is intended to be compared with the Sieve mail filtering
language, an Internet-Draft being discussed on the MTA Filters
mailing list at <ietf-mta-filters(_at_)imc(_dot_)org>. Subscription
requests
can be sent to <ietf-mta-filters-request(_at_)imc(_dot_)org> (send an
email
message with the word "subscribe" in the body). More information on
the mailing list along with a WWW archive of back messages is
available at <http://www.imc.org/ietf-mta-filters/>.
1. Introduction
This is an extension to the Sieve language defined by [SIEVE] for
setting [IMAP] flags. It defines new action "setflag".
This document doesn't dictate how SIEVE interpreter can set [IMAP]
flags. In particular, SIEVE interpreter may work as an IMAP client,
or may have direct access to the mailstore.
SIEVE interpreters, that doesn't support integration with IMAP
SHOULD ignore this extension.
Conventions for notations are as in [SIEVE] section 1.1, including
use of [KEYWORDS].
2. Capability Identifier
Sieve implementations that implement setflag action have an
identifier of "IMAPFLAGS" for use with the capability mechanism.
3. Setflag Action
Syntax: setflag <list-of-flags>
Setflag is used for setting [IMAP] flags. It should be used
together with keep or fileinto. It MUST be ignored if mailstore
doesn't support the storing of any flags.
Flags can be set only for message that is currently processed by
SIEVE. When called with keep, setflag sets flags in user's main
mailbox. When called with fileinto, setflag sets flags in the
mailbox, indicated by the parameter.
Melnikov Expires April 1999 [Page 2]
Internet Draft Sieve -- IMAP flag Extension October 1998
The order of setflag/fileinto or setflag/keep is not important in
the script. Multiple occurrences of setflag are treated additive.
This mean, that the following two actions
setflag "\Deleted";
setflag "\Answered";
produce the same result as single action
setflag ["\Deleted", "\Answered"];
Server MUST ignore all flags that it can't store permanently. This
mean, in particular, that if user's main mailbox can't store any
flags, then the following SIEVE script produces no actions
Example: if size over 500K setflag "\Deleted";
More substantial example is:
Example:
if header "from" contains "boss(_at_)frobnitzm(_dot_)edu" {
setflag "\Flagged";
fileinto "INBOX.From Boss";
}
4. Interaction with Other Sieve Actions
Sieve actions sometimes prohibit each other in order to make
filtering scripts less likely to cause serious problems.
It is strongly discouraged to use setflag action together with
forward, reject and discard, because these actions don't allow
keeping received message.
SIEVE interpreter MUST ignore setflag command, when it is used with
forward, reject and discard (or similar). SIEVE verifier SHOULD
reject script, which contains setflag together with forward, reject
and discard (or similar).
5. Other Considerations
This extension intentionally doesn't allow setting [IMAP] flags on
arbitrary message in IMAP store.
6. Security Considerations
Security considerations are discussed in the [IMAP] and [SIEVE].
It is belived that this extension doesn't introduce any
additional security concerns.
Melnikov Expires April 1999 [Page 3]
Internet Draft Sieve -- IMAP flag Extension October 1998
6. Formal Grammar
The grammar used in this section is the same as the ABNF described in
[ABNF].
action =/ setflag ;; "setflag" is now a legal action
setflag = "setflag" WSP string-list
;; a list of [IMAP] flags
7. Author's Address
Alexey Melnikov
Epsylon Technologies
121293, Russia, Moscow,
general Ermolov street, 6 - 90
Email: mel(_at_)demo(_dot_)ru
Melnikov Expires April 1999 [Page 4]
Internet Draft Sieve -- IMAP flag Extension October 1998
Appendices
Appendix A. References
[ABNF] Crocker, D., "Augmented BNF for Syntax Specifications: ABNF",
Internet Mail Consortium, RFC 2234, November, 1997.
[KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", Harvard University, RFC 2119, March 1997.
[SIEVE] Showalter, T., "Sieve: A Mail Filtering Language", Carenegie
Mellon, Work in Progress.
[IMAP] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1",
University of Washington, RFC 2060, December 1996.
Appendix B. Full Copyright Statement
Copyright (C) The Internet Society 1997. All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.
Melnikov Expires April 1999 [Page 5]