draft-freed-sieve-ihave-03.txt   draft-freed-sieve-ihave-04.txt 
Network Working Group N. Freed Network Working Group N. Freed
Internet-Draft Sun Microsystems Internet-Draft Sun Microsystems
Intended status: Standards Track October 9, 2008 Intended status: Standards Track December 25, 2008
Expires: April 12, 2009 Expires: June 28, 2009
Sieve Email Filtering: Ihave Extension Sieve Email Filtering: Ihave Extension
draft-freed-sieve-ihave-03 draft-freed-sieve-ihave-04
Status of this Memo Status of this Memo
By submitting this Internet-Draft, each author represents that any This Internet-Draft is submitted to IETF in full conformance with the
applicable patent or other IPR claims of which he or she is aware provisions of BCP 78 and BCP 79.
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 Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet- other groups may also distribute working documents as Internet-
Drafts. Drafts.
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."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on April 12, 2009. This Internet-Draft will expire on June 28, 2009.
Copyright Notice
Copyright (c) 2008 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document.
Abstract Abstract
This document describes the "ihave" extension to the Sieve email This document describes the "ihave" extension to the Sieve email
filtering language. The "ihave" extension provides a means to write filtering language. The "ihave" extension provides a means to write
scripts that can take advantage of optional Sieve features but can scripts that can take advantage of optional Sieve features but can
still run when those optional features are not available. The still run when those optional features are not available. The
extension also defines a new error control command intended to be extension also defines a new error control command intended to be
used to report situations where no combination of available used to report situations where no combination of available
extensions satisfies the needs of the script. extensions satisfies the needs of the script.
skipping to change at page 3, line 6 skipping to change at page 3, line 18
specify the extensions a particular sieve needs; an error results if specify the extensions a particular sieve needs; an error results if
the script's require clause calls for an extension that isn't the script's require clause calls for an extension that isn't
available. This mechanism is sufficient in most situations. available. This mechanism is sufficient in most situations.
However, there can be cases where a script may be able to take However, there can be cases where a script may be able to take
advantage of an extension if it is available but can still operate if advantage of an extension if it is available but can still operate if
it is not, possibly with some degradation of functionality. Cases it is not, possibly with some degradation of functionality. Cases
can also arise where a script would prefer one extension but can can also arise where a script would prefer one extension but can
employ a different one if the first one is not available. employ a different one if the first one is not available.
The "ihave" extension provides a means to write scripts that make use The "ihave" extension provides a means to write scripts that make use
of extensions only when they are actually available. Ihave defines a of extensions only when they are actually available. It defines a
new ihave test that takes a list of capability names as an argument new ihave test that takes a list of capability names as an argument
and succeeds if and only if all of those capabilities are present. and succeeds if and only if all of those capabilities are present.
Additionally, specification of the "ihave" extension in the require Additionally, specification of the "ihave" extension in the require
clause disables parse time checking of extension use in scripts; run- clause disables parse time checking of extension use in scripts; run-
time checking must be used instead. This makes it possible to write time checking must be used instead. This makes it possible to write
portable scripts that can operate in multiple environments making portable scripts that can operate in multiple environments making
effective use of whatever extensions are available even though effective use of whatever extensions are available even though
differing sets of extensions are provided in different places. differing sets of extensions are provided in different places.
The "ihave" extension also defines a new error control command. The "ihave" extension also defines a new error control command.
skipping to change at page 4, line 26 skipping to change at page 4, line 37
1. Use of a given extension is allowed subsequent to the successful 1. Use of a given extension is allowed subsequent to the successful
evaluation of an ihave test on that extension all the way to the evaluation of an ihave test on that extension all the way to the
end of the script, even outside the block enclosed by the ihave end of the script, even outside the block enclosed by the ihave
test. In other words, subsequent to a successful ihave things test. In other words, subsequent to a successful ihave things
operate just as if the extension had been specified in the operate just as if the extension had been specified in the
script's require clause. The extension cannot be used prior to script's require clause. The extension cannot be used prior to
the evaluation of such a test and a runtime error MUST be the evaluation of such a test and a runtime error MUST be
generated if such usage is attempted. However, subsequent use of generated if such usage is attempted. However, subsequent use of
that extension may still need to be conditionally handled via an that extension may still need to be conditionally handled via an
ihave test to deal with the case where it is not supported. The ihave test to deal with the case where it is not supported.
extension cannot be used prior to the evaluation of such a test
and a runtime error MUST be generated if such usage is attempted.
2. Sieve interpreters normally have the option of checking extension 2. Sieve interpreters normally have the option of checking extension
use at either parse time or execution time. The specification of use at either parse time or execution time. The specification of
"ihave" in a script's require clause changes this behavior: "ihave" in a script's require clause changes this behavior:
Scripts MUST either defer extension checking to run time or else Scripts MUST either defer extension checking to run time or else
take the presence of ihave tests into account at parse time. take the presence of ihave tests into account at parse time.
Note that since ihave can be used inside of anyof, allof, and not Note that since ihave can be used inside of anyof, allof, and not
tests full parse time checking of ihave may be very difficult to tests full parse time checking of ihave may be very difficult to
implement. implement.
3. Although it makes little sense to do so, an extension can be 3. Although it makes little sense to do so, an extension can be
specified in both the require control statement and in an ihave specified in both the require control statement and in an ihave
test. If this is done and the extension has been implemented the test. If this is done and the extension has been implemented the
extension can be used anywhere in the script and an ihave test of extension can be used anywhere in the script and an ihave test of
that extension will always return true. that extension will always return true.
4. Ihave accepts a list of capabilities. The ihave test fails and 4. The ihave test accepts a list of capabilities. The test fails
none of the capabilities are enabled if any of the specified and none of the capabilities are enabled if any of the specified
capabilities are unavailable. capabilities are unavailable.
5. The Sieve base specification does not require that interpreters 5. The Sieve base specification does not require that interpreters
evaluate arguments in any particular order or that test evaluate arguments in any particular order or that test
evaluation be short-circuited. If ihave is enabled the evaluation be short-circuited. If ihave is enabled the
interpreter MUST short-circuit tests, i.e., not perform more interpreter MUST short-circuit tests, i.e., not perform more
tests than necessary to find the result. Additionally, tests than necessary to find the result. Additionally,
evaluation order MUST be left to right if ihave is enabled. evaluation order MUST be left to right if ihave is enabled.
Ihave is designed to be used with extensions that add tests, actions, The ihave extension is designed to be used with other extensions that
comparators, or arguments. It MUST NOT be used with extensions that add tests, actions, comparators, or arguments. Implementations MUST
change the underlying Sieve grammer or extensions like variables NOT allow it to be used with extensions that change the underlying
[RFC5229] that change how the content of Sieve scripts are Sieve grammer or extensions like encoded-character [RFC5228] or
interpreted. variables [RFC5229] that change how the content of Sieve scripts are
interpreted. The test MUST fail and the extension MUST NOT be
enabled if such usage is attempted.
5. Error Control 5. Error Control
Usage: error <message: string> Usage: error <message: string>
The error control causes script execution to terminate with a run- The error control causes script execution to terminate with a run-
time error. The message argument provides a text description of the time error. The message argument provides a text description of the
error condition that SHOULD be included in any generated report error condition that SHOULD be included in any generated report
regarding the error. Section 2.10.6 of [RFC5228] describes how run- regarding the error. Section 2.10.6 of [RFC5228] describes how run-
time errors are handled in Sieve. time errors are handled in Sieve.
skipping to change at page 8, line 4 skipping to change at line 304
Author's Address Author's Address
Ned Freed Ned Freed
Sun Microsystems Sun Microsystems
800 Royal Oaks 800 Royal Oaks
Monrovia, CA 91016-6347 Monrovia, CA 91016-6347
USA USA
Phone: +1 909 457 4293 Phone: +1 909 457 4293
Email: ned.freed@mrochek.com Email: ned.freed@mrochek.com
Full Copyright Statement
Copyright (C) The IETF Trust (2008).
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, THE IETF TRUST 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.
Intellectual Property
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.
 End of changes. 9 change blocks. 
19 lines changed or deleted 29 lines changed or added

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