Re: [sieve] Sieve :regex

Stephan Bosch <> Wed, 12 April 2017 00:00 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 50C7B127097 for <>; Tue, 11 Apr 2017 17:00:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id XJ61t7rcr7lG for <>; Tue, 11 Apr 2017 17:00:50 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 354F5128ACA for <>; Tue, 11 Apr 2017 17:00:49 -0700 (PDT)
Received: from ([] helo=[]) by with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <>) id 1cy5iF-0003YL-TT; Wed, 12 Apr 2017 02:00:44 +0200
To: Ken Murchison <>,
References: <>
From: Stephan Bosch <>
Message-ID: <>
Date: Wed, 12 Apr 2017 02:00:32 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000)
X-SA-Exim-Scanned: Yes (on
Archived-At: <>
Subject: Re: [sieve] Sieve :regex
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: SIEVE Working Group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 12 Apr 2017 00:00:52 -0000

Op 4/11/2017 om 10:57 PM schreef Ken Murchison:
> All,
> I've been spending a bit of time back in the Cyrus IMAP Sieve code and
> I'm thinking about resurrecting the Sieve :regex draft (just in time
> for Easter ;)  in an effort to get it standardized.  I actually don't
> recall why this draft died in the Sieve WG -- it may be that Ned and I
> just didn't have the time to work on it, or there may have been issues
> that we didn't want to deal with and/or for which the WG didn't have
> solutions.
> Does anyone have any (new) outstanding issues or answers to those
> already listed in draft-ietf-sieve-regex-01
> <> ?

Much like the draft indicates, the use of EREs in the context of Unicode
strings is quite problematic. Is there any backwards-compatible regex
flavor that properly deals with UTF-8 that we could adopt? Do we need to
define our own IETF regex flavor?

Another thing I thought of: a thing that is severely lacking in the
Sieve ecosystem is string manipulation. Having some form of regex-based
string substitution/replacement capability would be very useful I think.
Does this violate the Sieve philosophy? It shouldn't if we're careful.

> Who has implemented some form of :regex (with or without variables
> integration)?

We have. Dovecot Pigeonhole currently implements
draft-murchison-sieve-regex-08. I haven't gotten around to updating it
to the latest revision (the set modifier particularly). It supports
match variables.