dovecot-2.2-pigeonhole: lib-sieve: Upgraded "vnd.dovecot.duplica...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Tue Mar 4 21:29:36 UTC 2014


details:   http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/8c53243b341f
changeset: 1845:8c53243b341f
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Tue Mar 04 22:28:56 2014 +0100
description:
lib-sieve: Upgraded "vnd.dovecot.duplicate" to "duplicate".
Backwards compatibility is provided for vnd.dovecot.duplicate.
Still need to fix the constraint that it must not track duplicates from failed Sieve executions.

diffstat:

 Makefile.am                                                        |    5 +-
 README                                                             |    4 +-
 configure.ac                                                       |    2 +-
 doc/extensions/duplicate.txt                                       |   47 +
 doc/extensions/vnd.dovecot.duplicate.txt                           |   57 -
 doc/rfc/draft-ietf-appsawg-sieve-duplicate-03.txt                  |  728 ++++++++++
 src/lib-sieve/Makefile.am                                          |    2 +-
 src/lib-sieve/plugins/Makefile.am                                  |    1 +
 src/lib-sieve/plugins/duplicate/Makefile.am                        |   20 +
 src/lib-sieve/plugins/duplicate/ext-duplicate-common.c             |  262 +++
 src/lib-sieve/plugins/duplicate/ext-duplicate-common.h             |   46 +
 src/lib-sieve/plugins/duplicate/ext-duplicate.c                    |  107 +
 src/lib-sieve/plugins/duplicate/tst-duplicate.c                    |  416 +++++
 src/lib-sieve/plugins/vnd.dovecot/Makefile.am                      |    3 +-
 src/lib-sieve/plugins/vnd.dovecot/debug/cmd-debug-log.c            |    2 +-
 src/lib-sieve/plugins/vnd.dovecot/debug/ext-debug-common.h         |    2 +-
 src/lib-sieve/plugins/vnd.dovecot/debug/ext-debug.c                |    2 +-
 src/lib-sieve/plugins/vnd.dovecot/duplicate/Makefile.am            |   20 -
 src/lib-sieve/plugins/vnd.dovecot/duplicate/ext-duplicate-common.c |  231 ---
 src/lib-sieve/plugins/vnd.dovecot/duplicate/ext-duplicate-common.h |   45 -
 src/lib-sieve/plugins/vnd.dovecot/duplicate/ext-duplicate.c        |   50 -
 src/lib-sieve/plugins/vnd.dovecot/duplicate/tst-duplicate.c        |  364 -----
 src/lib-sieve/sieve-extensions.c                                   |   18 +-
 src/plugins/sieve-extprograms/cmd-execute.c                        |    2 +-
 src/plugins/sieve-extprograms/cmd-filter.c                         |    2 +-
 src/plugins/sieve-extprograms/cmd-pipe.c                           |    2 +-
 src/plugins/sieve-extprograms/ext-execute.c                        |    2 +-
 src/plugins/sieve-extprograms/ext-filter.c                         |    2 +-
 src/plugins/sieve-extprograms/ext-pipe.c                           |    4 +-
 src/plugins/sieve-extprograms/sieve-extprograms-common.c           |    4 +-
 src/plugins/sieve-extprograms/sieve-extprograms-common.h           |    6 +-
 src/plugins/sieve-extprograms/sieve-extprograms-plugin.c           |    6 +-
 tests/extensions/duplicate/errors.svtest                           |   54 +
 tests/extensions/duplicate/errors/conflict-vnd.sieve               |    4 +
 tests/extensions/duplicate/errors/conflict.sieve                   |    4 +
 tests/extensions/duplicate/errors/syntax-vnd.sieve                 |   19 +
 tests/extensions/duplicate/errors/syntax.sieve                     |   54 +
 tests/extensions/duplicate/execute-vnd.svtest                      |   20 +
 tests/extensions/duplicate/execute.svtest                          |   41 +
 tests/extensions/vnd.dovecot/duplicate/errors.svtest               |   18 -
 tests/extensions/vnd.dovecot/duplicate/errors/syntax.sieve         |   19 -
 tests/extensions/vnd.dovecot/duplicate/execute.svtest              |   20 -
 42 files changed, 1858 insertions(+), 859 deletions(-)

diffs (truncated from 3053 to 300 lines):

diff -r cf5eba41f6bd -r 8c53243b341f Makefile.am
--- a/Makefile.am	Tue Feb 25 00:49:08 2014 +0100
+++ b/Makefile.am	Tue Mar 04 22:28:56 2014 +0100
@@ -136,9 +136,10 @@
 	tests/extensions/editheader/utf8.svtest \
 	tests/extensions/editheader/protected.svtest \
 	tests/extensions/editheader/errors.svtest \
+	tests/extensions/duplicate/errors.svtest \
+	tests/extensions/duplicate/execute.svtest \
+	tests/extensions/duplicate/execute-vnd.svtest \
 	tests/extensions/vnd.dovecot/debug/execute.svtest \
-	tests/extensions/vnd.dovecot/duplicate/errors.svtest \
-	tests/extensions/vnd.dovecot/duplicate/execute.svtest \
 	tests/deprecated/notify/basic.svtest \
 	tests/deprecated/notify/mailto.svtest \
 	tests/deprecated/notify/errors.svtest \
diff -r cf5eba41f6bd -r 8c53243b341f README
--- a/README	Tue Feb 25 00:49:08 2014 +0100
+++ b/README	Tue Mar 04 22:28:56 2014 +0100
@@ -120,6 +120,7 @@
     mailbox (RFC 5490; Section 3): fully supported (v0.1.10+), but ACL
         permissions are not verified for mailboxexists.
     include (RFC 6609): fully supported (v0.4.0+)
+    duplicate (draft v03): fully supported (v0.4.3+).
     regex (draft v08; not latest version): almost fully supported, but
         UTF-8 is not supported.
 
@@ -135,9 +136,6 @@
 
     vnd.dovecot.debug (v0.3.0+):
         Allows logging debug messages
-    vnd.dovecot.duplicate (v0.3.1+):
-        Allows detecting duplicate message deliveries based on message ID and
-        other criteria.
     vnd.dovecot.pipe (v0.4.0+; sieve_extprograms plugin):
         Implements piping messages to a pre-defined set of external programs
     vnd.dovecot.filter (v0.4.0+; sieve_extprograms plugin):
diff -r cf5eba41f6bd -r 8c53243b341f configure.ac
--- a/configure.ac	Tue Feb 25 00:49:08 2014 +0100
+++ b/configure.ac	Tue Mar 04 22:28:56 2014 +0100
@@ -122,9 +122,9 @@
 src/lib-sieve/plugins/ihave/Makefile
 src/lib-sieve/plugins/editheader/Makefile
 src/lib-sieve/plugins/metadata/Makefile
+src/lib-sieve/plugins/duplicate/Makefile
 src/lib-sieve/plugins/vnd.dovecot/Makefile
 src/lib-sieve/plugins/vnd.dovecot/debug/Makefile
-src/lib-sieve/plugins/vnd.dovecot/duplicate/Makefile
 src/lib-sieve-tool/Makefile
 src/lib-sievestorage/Makefile
 src/lib-managesieve/Makefile
diff -r cf5eba41f6bd -r 8c53243b341f doc/extensions/duplicate.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/extensions/duplicate.txt	Tue Mar 04 22:28:56 2014 +0100
@@ -0,0 +1,47 @@
+Duplicate Extension
+
+Relevant specifications
+=======================
+
+	doc/rfc/draft-ietf-appsawg-sieve-duplicate-03.txt
+
+Description
+===========
+
+The duplicate extension augments the Sieve filtering implementation with a test
+to verify whether the evaluated string value was seen before in an earlier
+execution of the Sieve script. The main application for this new test is 
+detecting and handling duplicate message deliveries, e.g. as caused by
+mailinglists when people reply both to the mailinglist and the user directly.
+
+Refer to doc/rfc/draft-ietf-appsawg-sieve-duplicate-03.txt for a specification
+of the Sieve language extension. Previously, this extension was Dovecot-specific
+and available under the name "vnd.dovecot.duplicate". That implementation
+differs significantly from what is now published as an internet draft, but
+for backwards compatibility the original extension is still supported.
+
+Configuration
+=============
+
+The "duplicate" extension is not enabled by default. 
+
+The following configuration settings are used:
+
+sieve_duplicate_default_period = 14d
+sieve_duplicate_max_period = 7d
+  These options respectively specify the default and the maximum value for the
+  period after which tracked values are purged from the duplicate tracking
+  database. The period is specified in s(econds), unless followed by a d(ay),
+  h(our) or m(inute) specifier character.
+
+Example
+=======
+
+plugin {
+  sieve = ~/.dovecot.sieve
+
+  sieve_extensions = +vnd.dovecot.duplicate
+
+  sieve_duplicate_default_period = 1h
+	sieve_duplicate_max_period = 1d
+}d
diff -r cf5eba41f6bd -r 8c53243b341f doc/extensions/vnd.dovecot.duplicate.txt
--- a/doc/extensions/vnd.dovecot.duplicate.txt	Tue Feb 25 00:49:08 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-Vnd.dovecot.duplicate Extension
-
-Relevant specifications
-=======================
-
-	doc/rfc/spec-bosch-sieve-duplicate.txt
-
-Description
-===========
-
-The vnd.dovecot.duplicate extension augments the Sieve filtering implementation
-with a test to verify whether the evaluated string value was seen before in an
-earlier execution of the Sieve script. The main application for this new test is
-detecting and handling duplicate message deliveries, e.g. as caused by
-mailinglists when people reply both to the mailinglist and the user directly.
-
-This extension is specific to the Pigeonhole Sieve implementation for the
-Dovecot Secure IMAP server. It will therefore most likely not be supported by
-web interfaces or GUI-based Sieve editors.
-
-Refer to doc/rfc/spec-bosch-sieve-duplicate.txt for a specification of the Sieve
-language extension.
-
-Implementation Status
----------------------
-
-The "vnd.dovecot.duplicate" Sieve language extension is vendor-specific with
-draft status and its implementation for Pigeonhole is experimental, which means
-that the language extensions are still subject to change and that the current
-implementation is not thoroughly tested.
-
-Configuration
-=============
-
-The "vnd.dovecot.duplicate" extension is not enabled by default and thus it
-needs to be enabled explicitly by adding it to the `sieve_extensions' or the
-`sieve_global_extensions' setting. 
-
-The following configuration settings are used:
-
-sieve_duplicate_default_period = 12h
-sieve_duplicate_max_period = 2d
-  These options respectively specify the default and the maximum value for the
-  period after which tracked values are purged from the duplicate tracking
-  database. The period is specified in s(econds), unless followed by a d(ay),
-  h(our) or m(inute) specifier character.
-
-Example
-=======
-
-plugin {
-  sieve = ~/.dovecot.sieve
-
-  sieve_extensions = +vnd.dovecot.duplicate
-
-  sieve_duplicate_default_period = 1h
-	sieve_duplicate_max_period = 1d
-}
diff -r cf5eba41f6bd -r 8c53243b341f doc/rfc/draft-ietf-appsawg-sieve-duplicate-03.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/rfc/draft-ietf-appsawg-sieve-duplicate-03.txt	Tue Mar 04 22:28:56 2014 +0100
@@ -0,0 +1,728 @@
+
+
+
+APPSAWG                                                         S. Bosch
+Internet-Draft                                             March 3, 2014
+Intended status: Standards Track
+Expires: September 4, 2014
+
+
+         Sieve Email Filtering: Detecting Duplicate Deliveries
+                 draft-ietf-appsawg-sieve-duplicate-03
+
+Abstract
+
+   This document defines a new test command "duplicate" for the "Sieve"
+   email filtering language.  This test adds the ability to detect
+   duplications.  The main application for this new test is handling
+   duplicate deliveries commonly caused by mailing list subscriptions or
+   redirected mail addresses.  The detection is normally performed by
+   matching the message ID to an internal list of message IDs from
+   previously delivered messages.  For more complex applications, the
+   "duplicate" test can also use the content of a specific header or
+   other parts of the message.
+
+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 September 4, 2014.
+
+Copyright Notice
+
+   Copyright (c) 2014 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
+
+
+
+Bosch                   Expires September 4, 2014               [Page 1]
+
+Internet-Draft    Sieve: Detecting Duplicate Deliveries       March 2014
+
+
+   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.
+
+
+Table of Contents
+
+   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
+   2.  Conventions Used in This Document  . . . . . . . . . . . . . .  3
+   3.  Test "duplicate" . . . . . . . . . . . . . . . . . . . . . . .  3
+     3.1.  Interaction with Other Sieve Extensions  . . . . . . . . .  8
+   4.  Sieve Capability Strings . . . . . . . . . . . . . . . . . . .  8
+   5.  Examples . . . . . . . . . . . . . . . . . . . . . . . . . . .  8
+     5.1.  Example 1  . . . . . . . . . . . . . . . . . . . . . . . .  8
+     5.2.  Example 2  . . . . . . . . . . . . . . . . . . . . . . . .  8
+     5.3.  Example 3  . . . . . . . . . . . . . . . . . . . . . . . .  9
+     5.4.  Example 4  . . . . . . . . . . . . . . . . . . . . . . . . 10
+   6.  Security Considerations  . . . . . . . . . . . . . . . . . . . 11
+   7.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 11
+   8.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 11
+   9.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 12
+     9.1.  Normative References . . . . . . . . . . . . . . . . . . . 12
+     9.2.  Informative References . . . . . . . . . . . . . . . . . . 12
+   Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 13
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Bosch                   Expires September 4, 2014               [Page 2]
+
+Internet-Draft    Sieve: Detecting Duplicate Deliveries       March 2014
+
+
+1.  Introduction
+
+   This document specifies an extension to the Sieve filtering language
+   defined by RFC 5228 [SIEVE].  It adds a test to track whether or not
+   a text string was seen before by the delivery agent in an earlier
+   execution of the Sieve script.  This can be used to detect and handle
+   duplicate message deliveries.
+
+   Duplicate deliveries are a common side-effect of being subscribed to
+   a mailing list.  For example, if a member of the list decides to
+   reply to both the user and the mailing list itself, the user will
+   often get one copy of the message directly and another through the
+   mailing list.  Also, if someone cross-posts over several mailing
+   lists to which the user is subscribed, the user will likely receive a
+   copy from each of those lists.  In another scenario, the user has
+   several redirected mail addresses all pointing to his main mail
+   account.  If one of the user's contacts sends the message to more


More information about the dovecot-cvs mailing list