Re: [sieve] Fwd: New Version Notification for draft-bosch-sieve-duplicate-01.txt

Kristin Hubner <kristin.hubner@oracle.com> Fri, 15 March 2013 21:09 UTC

Return-Path: <kristin.hubner@oracle.com>
X-Original-To: sieve@ietfa.amsl.com
Delivered-To: sieve@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5ECD521F8499 for <sieve@ietfa.amsl.com>; Fri, 15 Mar 2013 14:09:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.598
X-Spam-Level:
X-Spam-Status: No, score=-6.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, UNPARSEABLE_RELAY=0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hztMfVqv42bn for <sieve@ietfa.amsl.com>; Fri, 15 Mar 2013 14:09:58 -0700 (PDT)
Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) by ietfa.amsl.com (Postfix) with ESMTP id A18D321F8494 for <sieve@ietf.org>; Fri, 15 Mar 2013 14:09:58 -0700 (PDT)
Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r2FL9upC027643 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 15 Mar 2013 21:09:57 GMT
Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r2FL9sNn027254 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 15 Mar 2013 21:09:56 GMT
Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r2FL9sfK023453; Fri, 15 Mar 2013 16:09:54 -0500
Received: from dhcp-amer-vpn-rmdc-anyconnect-10-159-102-202.vpn.oracle.com (/10.159.102.202) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 15 Mar 2013 14:09:53 -0700
Mime-Version: 1.0 (Apple Message framework v1077)
Content-Type: text/plain; charset="us-ascii"
From: Kristin Hubner <kristin.hubner@oracle.com>
In-Reply-To: <513F9A9E.6010008@rename-it.nl>
Date: Fri, 15 Mar 2013 14:09:52 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <9665C4A7-B59A-459C-8134-798A553B5166@oracle.com>
References: <20130210000420.4778.87812.idtracker@ietfa.amsl.com> <5116E5ED.20307@rename-it.nl> <513B1839.3050202@rename-it.nl> <4A7CD266-C585-4389-8098-C3D1C25912B5@isode.com> <513F9A9E.6010008@rename-it.nl>
To: Stephan Bosch <stephan@rename-it.nl>
X-Mailer: Apple Mail (2.1077)
X-Source-IP: ucsinet22.oracle.com [156.151.31.94]
Cc: Sieve mailing list <sieve@ietf.org>
Subject: Re: [sieve] Fwd: New Version Notification for draft-bosch-sieve-duplicate-01.txt
X-BeenThere: sieve@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: SIEVE Working Group <sieve.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/sieve>, <mailto:sieve-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/sieve>
List-Post: <mailto:sieve@ietf.org>
List-Help: <mailto:sieve-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sieve>, <mailto:sieve-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Mar 2013 21:09:59 -0000

A minor comment: I'm not crazy about the ":value" tag name, as I find it
less self-explanatory than I'd prefer.  I'd propose instead ":key", or 
or maybe ":uniqueid".  

Regards,

Kristin

On Mar 12, 2013, at 2:14 PM, Stephan Bosch wrote:

> Hi Alexey,
> 
> On 3/10/2013 3:01 PM, Alexey Melnikov wrote:
>> On 9 Mar 2013, at 11:08, Stephan Bosch <stephan@rename-it.nl> wrote:
>> 
>>> I made a new version of the "duplicate" draft. It should address the comments by Ned and Alexey.
>>> Any thoughts about this?
>> This looks much better, thank you.
>> 
>> One new issue is that I don't understand how :value works. Maybe it is a Sunday morning effect. Maybe you can show an example or two?
> 
> To detect duplicates, some more or less unique identifying string value must be extracted from the message and compared between deliveries. For most cases, the contents of the Message-ID header is the best choice; that is what it is meant for. However, to accommodate more complex uses, the duplicate test has the flexibility to choose a different string value for comparison. Using the :value argument, the string value can be set manually to an arbitrary string. Typically, one would compose this string using variable substitutions. One can for example compose it from parts of a header, the envelope, multiple headers, parts of the message body or even the current date; whatever is appropriate for the application.
> 
> There is one example of the use of :value in the draft (the second one). I should perhaps make the subject header structure a bit more complex to justify its use in this example (because :header would work here as well).
> 
> Another example would be the following scenario. A mail user receives XMPP notifications about new mail through Sieve. Sometimes a single contact sends many messages in a short period of time and the user wants to prevent being notified of all of those messages. He wants to be notified about messages from each person at most once per 30 minutes. He writes the following script:
> 
> require ["variables", "envelope","enotify", "duplicate"];
> 
> if envelope :matches "from" "*" { set "sender" "${1}"; }
> if header :matches "subject" "*" { set "subject" "${1}"; }
> 
> if not duplicate :seconds 1800 :value "${sender}") {
>    notify :message "[SIEVE] ${from}: ${subject}" "xmpp:user@im.example.com";
> }
> 
> So this example uses the message envelope sender rather than the Message-ID header as an identifier for duplicate checking.
> 
> This example can be extended to allow multiple messages from the same sender in close succession as long as the discussed topic is different. This could be done as follows:
> 
> require ["variables", "envelope","enotify", "duplicate"];
> 
> if envelope :matches "from" "*" { set "sender" "${1}"; }
> if header :matches "subject" "*" { set "subject" "${1}"; }
> 
> if string :comparator "i;ascii-casemap" :matches "${subject}" "Re:*" {
>    set "topic" "${1}";
> } else {
>    set "topic" "${subject}";
> }
> 
> if not duplicate :seconds 1800 :value "${sender} ${topic}") {
>    notify :message "[SIEVE] ${from}: ${topic}" "xmpp:user@im.example.com";
> }
> 
> Regards,
> 
> Stephan.
> 
> 
> 
> 
> 
> _______________________________________________
> sieve mailing list
> sieve@ietf.org
> https://www.ietf.org/mailman/listinfo/sieve