[sieve] Some comments on draft-ietf-sieve-regex-01.txt
Stephan Bosch <stephan@rename-it.nl> Wed, 30 June 2010 15:38 UTC
Return-Path: <stephan@rename-it.nl>
X-Original-To: sieve@core3.amsl.com
Delivered-To: sieve@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 02BC53A6A15 for <sieve@core3.amsl.com>; Wed, 30 Jun 2010 08:38:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 2.096
X-Spam-Level: **
X-Spam-Status: No, score=2.096 tagged_above=-999 required=5 tests=[BAYES_50=0.001, HELO_EQ_NL=0.55, HOST_EQ_NL=1.545]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0ns4lXTzL-Lp for <sieve@core3.amsl.com>; Wed, 30 Jun 2010 08:38:55 -0700 (PDT)
Received: from drpepper.rename-it.nl (drpepper.rename-it.nl [87.249.120.243]) by core3.amsl.com (Postfix) with ESMTP id 6CC343A6848 for <sieve@ietf.org>; Wed, 30 Jun 2010 08:38:54 -0700 (PDT)
Received: from ewi1299.ewi.utwente.nl ([130.89.145.113]:1521) by drpepper.rename-it.nl with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from <stephan@rename-it.nl>) id 1OTzNJ-0005WA-7L for sieve@ietf.org; Wed, 30 Jun 2010 17:39:04 +0200
Message-ID: <4C2B6508.4020609@rename-it.nl>
Date: Wed, 30 Jun 2010 17:38:48 +0200
From: Stephan Bosch <stephan@rename-it.nl>
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
To: sieve@ietf.org
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
X-RenameIT-MailScanner-SpamScore: -3.4 (---)
X-RenameIT-MailScanner-SpamCheck: No, score=-3.4 required=5.0 tests=ALL_TRUSTED, AWL, BAYES_00 autolearn=ham version=3.2.5
Subject: [sieve] Some comments on draft-ietf-sieve-regex-01.txt
X-BeenThere: sieve@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: SIEVE Working Group <sieve.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/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: Wed, 30 Jun 2010 15:38:57 -0000
Hi,
I just took a short look at the latest draft of the Sieve regex
extension. I noticed that the interactions with the variables extension
are specified more explicitly and a set modifier is added. That's very
good. However, I have a few comments on this.
- Current text in section 7.2 of the draft refers to a variable being
used as `a parameter to :regex' (3rd paragraph), which is not entirely
correct since the :regex match type argument has no actual parameters of
its own. I guess `the regular expression provided in the key string
argument of the involved test command' is meant instead.
An alternative wording for the 3rd paragraph of section 7.2 could be:
"
The :quoteregex modifier is useful when the assigned variable is to be
expanded in a regular expression string, i.e. the key(-list) argument of
a test command using the :regex match type. This modifier adds the
necessary quoting to ensure that the assigned text will only match its
literal occurrence when the variable is later expanded in a regular
expression. Every character with special meaning (".", "*", "?", etc.)
is prefixed with "\" in the expansion. This modifier has a precedence
value of 20 when used with other modifiers.
"
- An example of constructing a regular expression from the contents of
variables would be nice, also to provide an example of how the new set
modifier can be applied. E.g.:
require ["regex", "variables", "subaddress", "envelope", "fileinto",
"copy"];
# Fetch recipient domain
if envelope :domain :matches "to" "*" {
set :quoteregex "domain" "${1}";
}
# Infer the host name of the final receiving server from the 'received'
# headers.
if header :regex "received" ".*by (.*${domain}) .+ for <?.+@${domain}>?" {
# File a copy on a per-accepting-server basis
fileinto :copy "incoming.${1}";
}
I must say that I'm not at all happy with my example. I would like to
see an example that is actually practically useful, reliable and not
hard to grasp. :) But I am fresh out of ideas...
Regards,
Stephan.
- [sieve] Some comments on draft-ietf-sieve-regex-0… Stephan Bosch