dovecot-2.2-pigeonhole: lib-sieve: Finished implementation of in...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Thu Sep 20 01:22:55 EEST 2012
details: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/7e2dbfc9206d
changeset: 1669:7e2dbfc9206d
user: Stephan Bosch <stephan at rename-it.nl>
date: Thu Sep 20 00:22:36 2012 +0200
description:
lib-sieve: Finished implementation of include extension.
Added support for the :optional tag of the include command.
Changed Sieve script API in the process; opening the script is now available as a separate step.
diffstat:
Makefile.am | 1 +
README | 6 +-
TODO | 2 -
doc/rfc/draft-ietf-sieve-include-05.txt | 784 --------------------
doc/rfc/include.rfc6609.txt | 787 +++++++++++++++++++++
src/lib-sieve/plugins/include/cmd-include.c | 87 +-
src/lib-sieve/plugins/include/ext-include-binary.c | 112 ++-
src/lib-sieve/plugins/include/ext-include-binary.h | 15 +-
src/lib-sieve/plugins/include/ext-include-common.c | 96 +-
src/lib-sieve/plugins/include/ext-include-common.h | 11 +-
src/lib-sieve/plugins/include/ext-include.c | 3 +
src/lib-sieve/sieve-lexer.c | 4 +-
src/lib-sieve/sieve-script-dict.c | 63 +-
src/lib-sieve/sieve-script-file.c | 16 +-
src/lib-sieve/sieve-script-private.h | 27 +-
src/lib-sieve/sieve-script.c | 189 +++-
src/lib-sieve/sieve-script.h | 24 +-
src/lib-sieve/sieve.c | 8 +-
src/lib-sievestorage/sieve-storage-script.c | 18 +-
src/managesieve/cmd-getscript.c | 5 +-
src/plugins/lda-sieve/lda-sieve-plugin.c | 4 +-
tests/extensions/include/execute/optional.sieve | 5 +
tests/extensions/include/included/optional-1.sieve | 9 +
tests/extensions/include/included/optional-2.sieve | 9 +
tests/extensions/include/optional.svtest | 40 +
25 files changed, 1264 insertions(+), 1061 deletions(-)
diffs (truncated from 2982 to 300 lines):
diff -r ea0eef5b5578 -r 7e2dbfc9206d Makefile.am
--- a/Makefile.am Thu Sep 20 00:18:10 2012 +0200
+++ b/Makefile.am Thu Sep 20 00:22:36 2012 +0200
@@ -76,6 +76,7 @@
tests/extensions/include/variables.svtest \
tests/extensions/include/once.svtest \
tests/extensions/include/twice.svtest \
+ tests/extensions/include/optional.svtest \
tests/extensions/include/rfc.svtest \
tests/extensions/include/execute.svtest \
tests/extensions/imap4flags/basic.svtest \
diff -r ea0eef5b5578 -r 7e2dbfc9206d README
--- a/README Thu Sep 20 00:18:10 2012 +0200
+++ b/README Thu Sep 20 00:22:36 2012 +0200
@@ -109,8 +109,7 @@
relational (RFC 5231): fully supported.
imap4flags (RFC 5232): fully supported.
subaddress (RFC 5233): fully supported, but with limited configurability.
- spamtest and virustest (RFC 5235): fully supported (v0.1.16+), but
- currently considered experimental.
+ spamtest and virustest (RFC 5235): fully supported (v0.1.16+).
date (RFC 5260; Section 4): fully supported (v0.1.12+).
editheader (RFC 5293): fully supported (v0.3.0+).
reject (RFC 5429; Section 2.2): fully supported.
@@ -121,8 +120,7 @@
ihave (RFC 5463): fully supported (v0.2.4+).
mailbox (RFC 5490; Section 3): fully supported (v0.1.10+), but ACL
permissions are not verified for mailboxexists.
- include (draft v05; not latest version): almost fully supported, but
- interaction with ManageSieve is not in accordance with specification.
+ include (RFC 6609): fully supported (v0.4.0+)
regex (draft v08; not latest version): almost fully supported, but
UTF-8 is not supported.
diff -r ea0eef5b5578 -r 7e2dbfc9206d TODO
--- a/TODO Thu Sep 20 00:18:10 2012 +0200
+++ b/TODO Thu Sep 20 00:22:36 2012 +0200
@@ -21,8 +21,6 @@
of script storage like LDAP or SQL database.
- Implement read/write script storages for using ManageSieve with dict
database
-* Update include extension to latest draft (v13 currently):
- - Implement :optional tag.
* Implement index extension
* Add normalize() method to comparators to normalize the string before matching
(for efficiency).
diff -r ea0eef5b5578 -r 7e2dbfc9206d doc/rfc/draft-ietf-sieve-include-05.txt
--- a/doc/rfc/draft-ietf-sieve-include-05.txt Thu Sep 20 00:18:10 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,784 +0,0 @@
-
-
-
-Network Working Group C. Daboo
-Internet-Draft A. Stone
-Intended status: Standards Track July 12, 2010
-Expires: January 13, 2011
-
-
- Sieve Email Filtering: Include Extension
- draft-ietf-sieve-include-05
-
-Abstract
-
- The Sieve Email Filtering "include" extension permits users to
- include one Sieve script inside another. This can make managing
- large scripts or multiple sets of scripts much easier, and allows a
- site and its users to build up libraries of scripts. Users are able
- to include their own personal scripts or site-wide scripts.
-
-Status of this Memo
-
- This Internet-Draft is submitted in full conformance with the
- provisions of BCP 78 and BCP 79.
-
- Internet-Drafts are working documents of the Internet Engineering
- Task Force (IETF). Note that other groups may also distribute
- working documents as Internet-Drafts. The list of current Internet-
- Drafts is at http://datatracker.ietf.org/drafts/current/.
-
- 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."
-
- This Internet-Draft will expire on January 13, 2011.
-
-Copyright Notice
-
- Copyright (c) 2010 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. Code Components extracted from this document must
- include Simplified BSD License text as described in Section 4.e of
- the Trust Legal Provisions and are provided without warranty as
- described in the Simplified BSD License.
-
-
-
-Daboo & Stone Expires January 13, 2011 [Page 1]
-
-Internet-Draft Sieve Extension: Include July 2010
-
-
- This document may contain material from IETF Documents or IETF
- Contributions published or made publicly available before November
- 10, 2008. The person(s) controlling the copyright in some of this
- material may not have granted the IETF Trust the right to allow
- modifications of such material outside the IETF Standards Process.
- Without obtaining an adequate license from the person(s) controlling
- the copyright in such materials, this document may not be modified
- outside the IETF Standards Process, and derivative works of it may
- not be created outside the IETF Standards Process, except to format
- it for publication as an RFC or to translate it into languages other
- than English.
-
-
-Table of Contents
-
- 1. Introduction and Overview . . . . . . . . . . . . . . . . . . 5
- 2. Conventions Used in This Document . . . . . . . . . . . . . . 5
- 3. Include Extension . . . . . . . . . . . . . . . . . . . . . . 5
- 3.1. General Considerations . . . . . . . . . . . . . . . . . . 5
- 3.2. Control Structure include . . . . . . . . . . . . . . . . 6
- 3.3. Control Structure return . . . . . . . . . . . . . . . . . 10
- 3.4. Interaction with Variables . . . . . . . . . . . . . . . . 10
- 3.4.1. Control Structure global . . . . . . . . . . . . . . . 10
- 3.4.2. Variables Namespace global . . . . . . . . . . . . . . 12
- 4. Security Considerations . . . . . . . . . . . . . . . . . . . 12
- 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13
- 5.1. "include" Extension Registration . . . . . . . . . . . . . 13
- 6. References . . . . . . . . . . . . . . . . . . . . . . . . . . 13
- 6.1. Normative References . . . . . . . . . . . . . . . . . . . 13
- 6.2. Informative References . . . . . . . . . . . . . . . . . . 13
- Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 13
- Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 13
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Daboo & Stone Expires January 13, 2011 [Page 2]
-
-Internet-Draft Sieve Extension: Include July 2010
-
-
-Change History (to be removed prior to publication as an RFC)
-
- Changes from ietf-04 to ietf-05:
-
- a. Integrate review from Barry Leiba.
-
- Changes from ietf-03 to ietf-04:
-
- a. No changes.
-
- Changes from ietf-02 to ietf-03:
-
- a. Setting a variable then calling global on it is an error
- (something like 'use strict').
-
- b. Specify that the 'global' keyword is only available when
- 'variables' has also been required.
-
- c. Uploading a script that includes a nonexistent script is not an
- error at upload time.
-
- Changes from ietf-01 to ietf-02:
-
- a. Require that script names must be constant strings, not subject
- to variable expansion.
-
- b. Try the phrase immediate script instead of current script.
-
- c. Clarify that "global 'varname'" and "global.varname" refer to the
- same variable.
-
- d. Drop the requirement the global keywords come after require and
- before anything else.
-
- Changes from ietf-00 to ietf-01:
-
- a. Replaced import/export with global.
-
- b. Added :once modifier to include.
-
- c. Added global namespace to see if it holds water.
-
- Changes from daboo-06 to ietf-00:
-
- a. None
-
- Changes from -05 to -06:
-
-
-
-
-Daboo & Stone Expires January 13, 2011 [Page 3]
-
-Internet-Draft Sieve Extension: Include July 2010
-
-
- a. Aaron Stone joins as author.
-
- b. Removed | characters from the script examples.
-
- c. Updated draft references to published RFCs.
-
- Changes from -04 to -05:
-
- a. Fixed examples.
-
- b. Relaxed requirement that imported/exported variables be set
- before being used.
-
- Changes from -03 to -04:
-
- a. Fixed missing 2119 definitions.
-
- b. Defined interaction with variables through use of import and
- export commands.
-
- Changes from -02 to -03:
-
- a. Refreshing expired draft (updated for nits).
-
- b. Syntax -> Usage.
-
- c. Updated to 3028bis reference.
-
- Changes from -01 to -02:
-
- a. Minor formatting changes only - refreshing expired draft.
-
- Changes from -00 to -01:
-
- a. Added IPR boiler plate.
-
- b. Re-ordered sections at start to conform to RFC style.
-
- c. Moved recursion comment into General Considerations section.
-
- d. Switched to using optional parameter to indicate personal vs
- global.
-
- e. Explicitly state that an error occurs when a missing script is
- included.
-
-
-
-
-
-
-Daboo & Stone Expires January 13, 2011 [Page 4]
-
-Internet-Draft Sieve Extension: Include July 2010
-
-
-1. Introduction and Overview
-
- It's convenient to be able to break SIEVE [RFC5228] scripts down into
- smaller components which can be reused in a variety of different
- circumstances. For example, users may want to have a default script
- and a special 'vacation' script, the latter being activated when the
- user goes on vacation. In that case the default actions should
- continue to be run, but a vacation command should be executed first.
- One option is to edit the default script to add or remove the
- vacation command as needed. Another is to have a vacation script
- that simply has a vacation command and then includes the default
- script.
-
-
-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 [RFC2119].
-
- Conventions for notations are as in SIEVE [RFC5228] Section 1.1.
-
- The following key phrases are used to describe scripts and script
More information about the dovecot-cvs
mailing list