From owner-ietf-mta-filters  Wed Jan  3 05:31:20 2001
Received: (from majordomo@localhost)
	by ns.secondary.com (8.9.3/8.9.3) id FAA03167
	for ietf-mta-filters-bks; Wed, 3 Jan 2001 05:31:20 -0800 (PST)
Received: from c000.snv.cp.net (c000-h000.c000.snv.cp.net [209.228.32.64])
	by ns.secondary.com (8.9.3/8.9.3) with SMTP id FAA03155
	for <ietf-mta-filters@imc.org>; Wed, 3 Jan 2001 05:31:15 -0800 (PST)
Received: (cpmta 18899 invoked from network); 3 Jan 2001 05:35:11 -0800
Received: from commercial.ucs.ed.ac.uk (HELO nige) (129.215.200.115)
  by smtp.swinson.com (209.228.32.64) with SMTP; 3 Jan 2001 05:35:11 -0800
X-Sent: 3 Jan 2001 13:35:11 GMT
Message-ID: <005f01c07589$fc9b7630$73c8d781@nige>
From: "Nigel Swinson" <Nigel@Swinson.com>
To: <ietf-mta-filters@imc.org>
Subject: Regex matching complete headers.
Date: Wed, 3 Jan 2001 13:35:06 -0000
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_005C_01C07589.FBD985C0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: owner-ietf-mta-filters@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:ietf-mta-filters-request@imc.org?body=unsubscribe>

This is a multi-part message in MIME format.

------=_NextPart_000_005C_01C07589.FBD985C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

2 points and some suggestions about the Sieve Home page


-------------------------------------------------------------------------=
-------

In the regex draft we have in the example:

            # or the subject is all uppercase (no lowercase)
            header :regex :comparator "i;octet" "subject"
              "^[^:lower:]*$" ) {

What if the Subject is mutliline and one of the lines contains uppercase =
letters, while the other contains only lowercase letters?  ie.

Subject: this is the first line that contains only lowercase
  this is a contination of the Subject header but it contains UPPERCASE =
LETTERS

The regular expression "^[^:lower:]*$" is going to match the first line, =
and therefore give us a match, but this isn't what we intended.


I have a customer who quite sensibly would like to filter all messages =
that have either no from header, or an empty from header.  Our exists =
test will pass if the header exists but is empty, so we need a regex =
test too that tests to say if the header is completely empty.  Initial =
thoughts would be something along the lines of "^[[:space:]]*$ but then =
this will match the following from header:

From:
 Address1@bar.com
 Address2@foo.com

as the very first line contains nothing but spaces.

Can we currently do this with Sieve at present?  If not perhaps we need =
to be able to use :regex with :is or :contains?  I see it says in the =
Sieve draft that we can't give more than one match type, but then =
perhaps this is a suitable occasion?


-------------------------------------------------------------------------=
-------


Could we also allow:
  a.. \w in place of [:word:]
  b.. \s in place of [:space:]
  c.. \d in place of [:digit:]
  d.. \l in place of [:lower:]
  e.. \u in place of [:upper:]
I find them really quite useful.  Or are we trying to stick to POSIX =
rigidly. (Still haven't got a copy of this.  Bloomin have to bloomin pay =
for it. Grrr)


-------------------------------------------------------------------------=
-------


Finally, whoever is responsible for http://www.cyrusoft.com/sieve/ could =
they please update the broken link that points to =
http://search.ietf.org/internet-drafts/draft-melnikov-sieve-imapflags-03.=
txt instead of =
http://search.ietf.org/internet-drafts/draft-melnikov-sieve-imapflags-04.=
txt

Additionally should there not be a link to the regex work at =
http://search.ietf.org/internet-drafts/draft-murchison-sieve-regex-02.txt=
 it seems relevant in the Internet Drafts section


-------------------------------------------------------------------------=
-------


That's all for now.

Cheers

Nigel


------=_NextPart_000_005C_01C07589.FBD985C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>2 points and some suggestions about the =
Sieve Home=20
page</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>
<HR>
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>In the regex draft we have in the=20
example:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; # or=20
the subject is all uppercase (no=20
lowercase)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;=20
header :regex :comparator "i;octet"=20
"subject"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;=20
"^[^:lower:]*$" ) {<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>What if the Subject is mutliline and =
one of the=20
lines contains uppercase letters, while the other contains only =
lowercase=20
letters?&nbsp; ie.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Subject: this is the first line that =
contains only=20
lowercase</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; this is a contination of the =
Subject header=20
but it contains UPPERCASE LETTERS</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The regular expression "^[^:lower:]*$" =
is going to=20
match the first line, and therefore give us a match, but this isn't what =
we=20
intended.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have a customer who quite sensibly =
would like to=20
filter all messages that have either no from header, or an empty from=20
header.&nbsp; Our exists test will pass if the header exists but is =
empty, so we=20
need a regex test too that tests to say if the header is completely =
empty.&nbsp;=20
Initial thoughts would be something along the lines of "^[[:space:]]*$ =
but then=20
this will match the following from header:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>From:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;<A=20
href=3D"mailto:Address1@bar.com">Address1@bar.com</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;<A=20
href=3D"mailto:Address2@foo.com">Address2@foo.com</A><BR><BR></FONT><FONT=
=20
face=3DArial size=3D2>as the very first line contains nothing but=20
spaces.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Can we currently do this with Sieve at=20
present?&nbsp; If not perhaps we need to be able to use :regex with :is =
or=20
:contains?&nbsp; I see it says in the Sieve draft that we can't give =
more than=20
one match type, but then perhaps this is a suitable =
occasion?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>
<HR>
</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Could we also allow:</FONT></DIV><FONT =
face=3DArial=20
size=3D2>
<UL>
  <LI>\w in place of [:word:]</LI>
  <LI>\s in place of [:space:]</LI>
  <LI>\d in place of [:digit:]</LI>
  <LI>\l in place of [:lower:]</LI>
  <LI>\u in place of [:upper:]</LI></UL>
<DIV>I find them really quite useful.&nbsp; Or are we trying to stick to =
POSIX=20
rigidly. (Still haven't got a copy of this.&nbsp; Bloomin have to =
bloomin pay=20
for it. Grrr)</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<HR>
</DIV>
<DIV>&nbsp;</DIV>
<DIV>Finally, whoever is responsible for <A=20
href=3D"http://www.cyrusoft.com/sieve/">http://www.cyrusoft.com/sieve/</A=
>&nbsp;could=20
they please update the broken link that points to <A=20
href=3D"http://search.ietf.org/internet-drafts/draft-melnikov-sieve-imapf=
lags-03.txt">http://search.ietf.org/internet-drafts/draft-melnikov-sieve-=
imapflags-03.txt</A>&nbsp;instead=20
of <A=20
href=3D"http://search.ietf.org/internet-drafts/draft-melnikov-sieve-imapf=
lags-04.txt">http://search.ietf.org/internet-drafts/draft-melnikov-sieve-=
imapflags-04.txt</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>Additionally should there not be a link to the regex work at <A=20
href=3D"http://search.ietf.org/internet-drafts/draft-murchison-sieve-rege=
x-02.txt">http://search.ietf.org/internet-drafts/draft-murchison-sieve-re=
gex-02.txt</A>=20
it seems relevant in the Internet Drafts section</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<HR>
</DIV>
<DIV>&nbsp;</DIV>
<DIV>That's all for now.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Cheers</DIV>
<DIV>&nbsp;</DIV>
<DIV>Nigel</DIV>
<DIV></FONT><FONT face=3DArial =
size=3D2>&nbsp;</DIV></FONT></BODY></HTML>

------=_NextPart_000_005C_01C07589.FBD985C0--


From owner-ietf-mta-filters  Wed Jan  3 07:24:25 2001
Received: by ns.secondary.com (8.9.3/8.9.3) id HAA11187
	for ietf-mta-filters-bks; Wed, 3 Jan 2001 07:24:25 -0800 (PST)
Received: from eagle.oceana.com (eagle.oceana.com [208.17.123.12])
	by ns.secondary.com (8.9.3/8.9.3) with ESMTP id HAA11174
	for <ietf-mta-filters@imc.org>; Wed, 3 Jan 2001 07:24:23 -0800 (PST)
Received: from ken.oceana.com by eagle.oceana.com (Switch-2.0.5/Switch-2.0.5) with ESMTP id f03FSD600618;
	Wed, 3 Jan 2001 10:28:13 -0500
Message-ID: <3A5344D3.B290AB4C@oceana.com>
Date: Wed, 03 Jan 2001 10:27:15 -0500
From: Ken Murchison <ken@oceana.com>
Organization: Oceana Matrix Ltd.
X-Mailer: Mozilla 4.73 [en] (Win95; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Nigel Swinson <Nigel@Swinson.com>
CC: ietf-mta-filters@imc.org
Subject: Re: Regex matching complete headers.
References: <005f01c07589$fc9b7630$73c8d781@nige>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-ietf-mta-filters@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:ietf-mta-filters-request@imc.org?body=unsubscribe>



> Nigel Swinson wrote:
> 
> 2 points and some suggestions about the Sieve Home page
> 
> ----------------------------------------------------------------------
> In the regex draft we have in the example:
> 
>             # or the subject is all uppercase (no lowercase)
>             header :regex :comparator "i;octet" "subject"
>               "^[^:lower:]*$" ) {
> What if the Subject is mutliline and one of the lines contains
> uppercase letters, while the other contains only lowercase letters?
> ie.
> 
> Subject: this is the first line that contains only lowercase
>   this is a contination of the Subject header but it contains
> UPPERCASE LETTERS
> 
> The regular expression "^[^:lower:]*$" is going to match the first
> line, and therefore give us a match, but this isn't what we intended.

Actually, you've misread the regex.  It is looking for subjects that DO
NOT contain any lowercase chars.  This being the case, :regex should
work for multiline headers, just like the other comparators.  In fact, I
tested it with my regex implementation in cmu-sieve and it works fine. 
Using this script:

require "regex";

if header :regex :comparator "i;octet" "subject" "^[^:lower:]*$" {
	discard;
}


A subject of:

Subject: FIRST LINE
	SECOND LINE

will be discarded

and a subject of:

Subject: FIRST LINE
	Second LINE

will be kept


It is my understanding that all of the comparators work on the the
ENTIRE header contents, regardless of the number of lines, ie the script

if header :contains "subject" "second" {
	discard;
}

will discard either of the examples above.


> I have a customer who quite sensibly would like to filter all messages
> that have either no from header, or an empty from header.  Our exists
> test will pass if the header exists but is empty, so we need a regex
> test too that tests to say if the header is completely empty.

Try:

if anyof (not exists "from", header :regex "from" "^$")


Any good header parser should gobble up leading whitespace, so even if
the from: header exists an contains nothing but whitespace, the test
above should work.

> ----------------------------------------------------------------------
> 
> Could we also allow:
> 
>    * \w in place of [:word:]
>    * \s in place of [:space:]
>    * \d in place of [:digit:]
>    * \l in place of [:lower:]
>    * \u in place of [:upper:]
> 
> I find them really quite useful.  Or are we trying to stick to POSIX
> rigidly.

I went with POSIX simply because it is a defined spec and I didn't want
to describe exactly what a regex should be (with all the ifs/ands/buts,
etc).  If there is consensus that shortcuts like these are desired, I'm
not opposed to adding them to the draft.

Regards,
Ken
-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp

From owner-ietf-mta-filters  Wed Jan  3 07:41:06 2001
Received: (from majordomo@localhost)
	by ns.secondary.com (8.9.3/8.9.3) id HAA14078
	for ietf-mta-filters-bks; Wed, 3 Jan 2001 07:41:06 -0800 (PST)
Received: from mauve.mrochek.com (mauve.mrochek.com [209.55.107.55])
	by ns.secondary.com (8.9.3/8.9.3) with ESMTP id HAA14070
	for <ietf-mta-filters@imc.org>; Wed, 3 Jan 2001 07:41:04 -0800 (PST)
From: ned.freed@innosoft.com
Received: from mauve.mrochek.com by mauve.mrochek.com (PMDF V6.1-1 #35243)
 id <01JYGNLJXFBK000723@mauve.mrochek.com> for ietf-mta-filters@imc.org; Wed,
 03 Jan 2001 07:45:13 -0700 (PDT)
Date: Wed, 03 Jan 2001 07:30:39 -0700 (PDT)
Subject: Re: Regex matching complete headers.
In-reply-to: "Your message dated Wed, 03 Jan 2001 13:35:06 +0000"
 <005f01c07589$fc9b7630$73c8d781@nige>
To: Nigel Swinson <Nigel@Swinson.com>
Cc: ietf-mta-filters@imc.org
Message-id: <01JYGODX9IGK000723@mauve.mrochek.com>
MIME-version: 1.0
Content-type: TEXT/PLAIN; charset=iso-8859-1
Content-transfer-encoding: 7BIT
Sender: owner-ietf-mta-filters@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:ietf-mta-filters-request@imc.org?body=unsubscribe>

> 2 points and some suggestions about the Sieve Home page


> --------------------------------------------------------------------------------

> In the regex draft we have in the example:

>             # or the subject is all uppercase (no lowercase)
>             header :regex :comparator "i;octet" "subject"
>               "^[^:lower:]*$" ) {

> What if the Subject is mutliline and one of the lines contains uppercase
> letters, while the other contains only lowercase letters?  ie.

> Subject: this is the first line that contains only lowercase
>   this is a contination of the Subject header but it contains UPPERCASE LETTERS

This is not an example of multiple subject lines, it is an example of a single
folded subject line. Folding is removed prior to comparison; it is arbitrary
and can change during message transit. Unfortunately, the sieve specification
doesn't make this clear, and it should. (The reason it doesn't is probably that
the handling of folding is considered to be such a fundamental characteristic
of email headers that nobody thought to point it out.)

> The regular expression "^[^:lower:]*$" is going to match the first line, and
> therefore give us a match, but this isn't what we intended.

No, it will apply to the entire unfolded line, so it won't match.

> I have a customer who quite sensibly would like to filter all messages that
> have either no from header, or an empty from header.  Our exists test will pass
> if the header exists but is empty, so we need a regex test too that tests to
> say if the header is completely empty.  Initial thoughts would be something
> along the lines of "^[[:space:]]*$ but then this will match the following from
> header:

> From:
>  Address1@bar.com
>  Address2@foo.com

> as the very first line contains nothing but spaces.

Again, this is incorrect. There is no empty From: field here.

> Can we currently do this with Sieve at present?

Yes you can.

> If not perhaps we need to be
> able to use :regex with :is or :contains?  I see it says in the Sieve draft
> that we can't give more than one match type, but then perhaps this is a
> suitable occasion?

Nope.

> Could we also allow:
>   a.. \w in place of [:word:]
>   b.. \s in place of [:space:]
>   c.. \d in place of [:digit:]
>   d.. \l in place of [:lower:]
>   e.. \u in place of [:upper:]

> I find them really quite useful.  Or are we trying to stick to POSIX rigidly.
> (Still haven't got a copy of this.  Bloomin have to bloomin pay for it. Grrr)

Personally, I think there are real advantages to sticking to the POSIX
specification and not introducing shortcuts. For example, it enables use of an
OOTB POSIX regex facility.

> Finally, whoever is responsible for http://www.cyrusoft.com/sieve/ could they
> please update the broken link that points to
> http://search.ietf.org/internet-drafts/draft-melnikov-sieve-imapflags-03.txt
> instead of
> http://search.ietf.org/internet-drafts/draft-melnikov-sieve-imapflags-04.txt

> Additionally should there not be a link to the regex work at
> http://search.ietf.org/internet-drafts/draft-murchison-sieve-regex-02.txt it
> seems relevant in the Internet Drafts section

I suggest you send mail to the site maintainer, and if that's not obvious
to the postmaster. This isn't appropriate for this mailing list.

				Ned

From owner-ietf-mta-filters  Wed Jan  3 13:18:33 2001
Received: by ns.secondary.com (8.9.3/8.9.3) id NAA06306
	for ietf-mta-filters-bks; Wed, 3 Jan 2001 13:18:33 -0800 (PST)
Received: from mail.mirapoint.com (IDENT:mirapoint@mail.mirapoint.com [208.48.74.2])
	by ns.secondary.com (8.9.3/8.9.3) with ESMTP id NAA06302
	for <ietf-mta-filters@imc.org>; Wed, 3 Jan 2001 13:18:32 -0800 (PST)
Received: from tim-bsd.mirapoint.com (tim-bsd.mirapoint.com [192.168.0.117])
	by mail.mirapoint.com (Mirapoint)
	with SMTP id ABC00414;
	Wed, 3 Jan 2001 13:22:55 -0800 (PST)
X-Spook: smuggle NSA strategic supercomputer White Water David John Oates
	Marxist
To: ned.freed@innosoft.com
Cc: Nigel Swinson <Nigel@Swinson.com>, ietf-mta-filters@imc.org
Subject: Re: Regex matching complete headers.
References: <01JYGODX9IGK000723@mauve.mrochek.com>
From: Tim Showalter <tjs@mirapoint.com>
Date: 03 Jan 2001 13:24:33 -0800
In-Reply-To: ned.freed@innosoft.com's message of "Wed, 03 Jan 2001 07:30:39 -0700 (PDT)"
Message-ID: <7dwvccz5v2.fsf@tim-bsd.mirapoint.com>
Lines: 17
User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Canyonlands)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: owner-ietf-mta-filters@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:ietf-mta-filters-request@imc.org?body=unsubscribe>

ned.freed@innosoft.com writes:

> This is not an example of multiple subject lines, it is an example of
> a single folded subject line. Folding is removed prior to comparison;
> it is arbitrary and can change during message transit. Unfortunately,
> the sieve specification doesn't make this clear, and it should. (The
> reason it doesn't is probably that the handling of folding is
> considered to be such a fundamental characteristic of email headers
> that nobody thought to point it out.)

Right.  Actually I think there are clearer folding rules in the
forthcoming 822bis document anyway, and I was thinking about those when
I forgot about this.

I'll try and add a sentence saying this if/when I can.

Tim


From owner-ietf-mta-filters  Wed Jan  3 13:21:39 2001
Received: by ns.secondary.com (8.9.3/8.9.3) id NAA06382
	for ietf-mta-filters-bks; Wed, 3 Jan 2001 13:21:39 -0800 (PST)
Received: from mauve.mrochek.com (mauve.mrochek.com [209.55.107.55])
	by ns.secondary.com (8.9.3/8.9.3) with ESMTP id NAA06378
	for <ietf-mta-filters@imc.org>; Wed, 3 Jan 2001 13:21:38 -0800 (PST)
From: ned.freed@innosoft.com
Received: from mauve.mrochek.com by mauve.mrochek.com (PMDF V6.1-1 #35243)
 id <01JYGYM5ITLC0009C4@mauve.mrochek.com> for ietf-mta-filters@imc.org; Wed,
 03 Jan 2001 13:25:57 -0700 (PDT)
Date: Wed, 03 Jan 2001 13:25:47 -0700 (PDT)
Subject: Re: Regex matching complete headers.
In-reply-to: "Your message dated Wed, 03 Jan 2001 13:24:33 -0800"
 <7dwvccz5v2.fsf@tim-bsd.mirapoint.com>
To: Tim Showalter <tjs@mirapoint.com>
Cc: ned.freed@innosoft.com, Nigel Swinson <Nigel@Swinson.com>,
        ietf-mta-filters@imc.org
Message-id: <01JYH0ADJYWW0009C4@mauve.mrochek.com>
MIME-version: 1.0
Content-type: TEXT/PLAIN; CHARSET=us-ascii
Content-transfer-encoding: 7BIT
References: <01JYGODX9IGK000723@mauve.mrochek.com> <ned.freed@innosoft.com's>
Sender: owner-ietf-mta-filters@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:ietf-mta-filters-request@imc.org?body=unsubscribe>

> ned.freed@innosoft.com writes:

> > This is not an example of multiple subject lines, it is an example of
> > a single folded subject line. Folding is removed prior to comparison;
> > it is arbitrary and can change during message transit. Unfortunately,
> > the sieve specification doesn't make this clear, and it should. (The
> > reason it doesn't is probably that the handling of folding is
> > considered to be such a fundamental characteristic of email headers
> > that nobody thought to point it out.)

> Right.  Actually I think there are clearer folding rules in the
> forthcoming 822bis document anyway, and I was thinking about those when
> I forgot about this.

> I'll try and add a sentence saying this if/when I can.

Good.

				Ned

From owner-ietf-mta-filters  Tue Jan 16 18:57:49 2001
Received: by ns.secondary.com (8.9.3/8.9.3) id SAA10143
	for ietf-mta-filters-bks; Tue, 16 Jan 2001 18:57:49 -0800 (PST)
Received: from webserver.onlineevents.com.au ([203.111.80.201])
	by ns.secondary.com (8.9.3/8.9.3) with ESMTP id SAA10064;
	Tue, 16 Jan 2001 18:57:25 -0800 (PST)
From: bk12bk27@yahoo.com
Received: from max1-34.losangeles.corecomm.net by webserver.onlineevents.com.au with SMTP (Microsoft Exchange Internet Mail Service Version 5.0.1459.44)
	id C0CGL6NT; Wed, 17 Jan 2001 14:54:31 +1100
DATE: 16 Jan 01 6:44:42 PM
Message-ID: <pm6dJtEi10HeOy01>
SUBJECT: RE; THANK YOU 
Sender: owner-ietf-mta-filters@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:ietf-mta-filters-request@imc.org?body=unsubscribe>

Dear Friend and Partner, 

Think of all the things you could do if you had more free time and money wasn't an 
object

             What kind of car would you be driving? 

                     Where would you live? 

                           Where would you go on vacation? 
  

Now, for a limited time, 300+ money making and saving secrets can be yours for less 
than $10.00. 

Click here http://www.300moneysecrets.com/    and ORDER NOW!!!!!!!!!!!!!! 
  

Get information now, that could make you millions!!!! 
  


 ** REMOVE ** REMOVE ** REMOVE ** REMOVE ** REMOVE ** 

To be removed from our mailing list, please email sandywho1212@yahoo.com All REMOVE requests AUTOMATICALLY honored upon receipt. PLEASE understand that any effort to disrupt, close or block this REMOVE account can only result in difficulties for others wanting to be removed     from our mailing list as it will be impossible to take anyone off the list if the remove instruction can not be received.



Received: by ns.secondary.com (8.9.3/8.9.3) id SAA10143 for ietf-mta-filters-bks; Tue, 16 Jan 2001 18:57:49 -0800 (PST)
Received: from webserver.onlineevents.com.au ([203.111.80.201]) by ns.secondary.com (8.9.3/8.9.3) with ESMTP id SAA10064; Tue, 16 Jan 2001 18:57:25 -0800 (PST)
From: bk12bk27@yahoo.com
Received: from max1-34.losangeles.corecomm.net by webserver.onlineevents.com.au with SMTP (Microsoft Exchange Internet Mail Service Version 5.0.1459.44) id C0CGL6NT; Wed, 17 Jan 2001 14:54:31 +1100
DATE: 16 Jan 01 6:44:42 PM
Message-ID: <pm6dJtEi10HeOy01>
SUBJECT: RE; THANK YOU 
Sender: owner-ietf-mta-filters@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:ietf-mta-filters-request@imc.org?body=unsubscribe>

Dear Friend and Partner, 

Think of all the things you could do if you had more free time and money wasn't an 
object

             What kind of car would you be driving? 

                     Where would you live? 

                           Where would you go on vacation? 
  

Now, for a limited time, 300+ money making and saving secrets can be yours for less 
than $10.00. 

Click here http://www.300moneysecrets.com/    and ORDER NOW!!!!!!!!!!!!!! 
  

Get information now, that could make you millions!!!! 
  


 ** REMOVE ** REMOVE ** REMOVE ** REMOVE ** REMOVE ** 

To be removed from our mailing list, please email sandywho1212@yahoo.com All REMOVE requests AUTOMATICALLY honored upon receipt. PLEASE understand that any effort to disrupt, close or block this REMOVE account can only result in difficulties for others wanting to be removed     from our mailing list as it will be impossible to take anyone off the list if the remove instruction can not be received.



Received: by ns.secondary.com (8.9.3/8.9.3) id NAA06382 for ietf-mta-filters-bks; Wed, 3 Jan 2001 13:21:39 -0800 (PST)
Received: from mauve.mrochek.com (mauve.mrochek.com [209.55.107.55]) by ns.secondary.com (8.9.3/8.9.3) with ESMTP id NAA06378 for <ietf-mta-filters@imc.org>; Wed, 3 Jan 2001 13:21:38 -0800 (PST)
From: ned.freed@innosoft.com
Received: from mauve.mrochek.com by mauve.mrochek.com (PMDF V6.1-1 #35243) id <01JYGYM5ITLC0009C4@mauve.mrochek.com> for ietf-mta-filters@imc.org; Wed, 03 Jan 2001 13:25:57 -0700 (PDT)
Date: Wed, 03 Jan 2001 13:25:47 -0700 (PDT)
Subject: Re: Regex matching complete headers.
In-reply-to: "Your message dated Wed, 03 Jan 2001 13:24:33 -0800" <7dwvccz5v2.fsf@tim-bsd.mirapoint.com>
To: Tim Showalter <tjs@mirapoint.com>
Cc: ned.freed@innosoft.com, Nigel Swinson <Nigel@Swinson.com>, ietf-mta-filters@imc.org
Message-id: <01JYH0ADJYWW0009C4@mauve.mrochek.com>
MIME-version: 1.0
Content-type: TEXT/PLAIN; CHARSET=us-ascii
Content-transfer-encoding: 7BIT
References: <01JYGODX9IGK000723@mauve.mrochek.com> <ned.freed@innosoft.com's>
Sender: owner-ietf-mta-filters@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:ietf-mta-filters-request@imc.org?body=unsubscribe>

> ned.freed@innosoft.com writes:

> > This is not an example of multiple subject lines, it is an example of
> > a single folded subject line. Folding is removed prior to comparison;
> > it is arbitrary and can change during message transit. Unfortunately,
> > the sieve specification doesn't make this clear, and it should. (The
> > reason it doesn't is probably that the handling of folding is
> > considered to be such a fundamental characteristic of email headers
> > that nobody thought to point it out.)

> Right.  Actually I think there are clearer folding rules in the
> forthcoming 822bis document anyway, and I was thinking about those when
> I forgot about this.

> I'll try and add a sentence saying this if/when I can.

Good.

				Ned


Received: by ns.secondary.com (8.9.3/8.9.3) id NAA06306 for ietf-mta-filters-bks; Wed, 3 Jan 2001 13:18:33 -0800 (PST)
Received: from mail.mirapoint.com (IDENT:mirapoint@mail.mirapoint.com [208.48.74.2]) by ns.secondary.com (8.9.3/8.9.3) with ESMTP id NAA06302 for <ietf-mta-filters@imc.org>; Wed, 3 Jan 2001 13:18:32 -0800 (PST)
Received: from tim-bsd.mirapoint.com (tim-bsd.mirapoint.com [192.168.0.117]) by mail.mirapoint.com (Mirapoint) with SMTP id ABC00414; Wed, 3 Jan 2001 13:22:55 -0800 (PST)
X-Spook: smuggle NSA strategic supercomputer White Water David John Oates Marxist
To: ned.freed@innosoft.com
Cc: Nigel Swinson <Nigel@Swinson.com>, ietf-mta-filters@imc.org
Subject: Re: Regex matching complete headers.
References: <01JYGODX9IGK000723@mauve.mrochek.com>
From: Tim Showalter <tjs@mirapoint.com>
Date: 03 Jan 2001 13:24:33 -0800
In-Reply-To: ned.freed@innosoft.com's message of "Wed, 03 Jan 2001 07:30:39 -0700 (PDT)"
Message-ID: <7dwvccz5v2.fsf@tim-bsd.mirapoint.com>
Lines: 17
User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Canyonlands)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: owner-ietf-mta-filters@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:ietf-mta-filters-request@imc.org?body=unsubscribe>

ned.freed@innosoft.com writes:

> This is not an example of multiple subject lines, it is an example of
> a single folded subject line. Folding is removed prior to comparison;
> it is arbitrary and can change during message transit. Unfortunately,
> the sieve specification doesn't make this clear, and it should. (The
> reason it doesn't is probably that the handling of folding is
> considered to be such a fundamental characteristic of email headers
> that nobody thought to point it out.)

Right.  Actually I think there are clearer folding rules in the
forthcoming 822bis document anyway, and I was thinking about those when
I forgot about this.

I'll try and add a sentence saying this if/when I can.

Tim



Received: (from majordomo@localhost) by ns.secondary.com (8.9.3/8.9.3) id HAA14078 for ietf-mta-filters-bks; Wed, 3 Jan 2001 07:41:06 -0800 (PST)
Received: from mauve.mrochek.com (mauve.mrochek.com [209.55.107.55]) by ns.secondary.com (8.9.3/8.9.3) with ESMTP id HAA14070 for <ietf-mta-filters@imc.org>; Wed, 3 Jan 2001 07:41:04 -0800 (PST)
From: ned.freed@innosoft.com
Received: from mauve.mrochek.com by mauve.mrochek.com (PMDF V6.1-1 #35243) id <01JYGNLJXFBK000723@mauve.mrochek.com> for ietf-mta-filters@imc.org; Wed, 03 Jan 2001 07:45:13 -0700 (PDT)
Date: Wed, 03 Jan 2001 07:30:39 -0700 (PDT)
Subject: Re: Regex matching complete headers.
In-reply-to: "Your message dated Wed, 03 Jan 2001 13:35:06 +0000" <005f01c07589$fc9b7630$73c8d781@nige>
To: Nigel Swinson <Nigel@Swinson.com>
Cc: ietf-mta-filters@imc.org
Message-id: <01JYGODX9IGK000723@mauve.mrochek.com>
MIME-version: 1.0
Content-type: TEXT/PLAIN; charset=iso-8859-1
Content-transfer-encoding: 7BIT
Sender: owner-ietf-mta-filters@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:ietf-mta-filters-request@imc.org?body=unsubscribe>

> 2 points and some suggestions about the Sieve Home page


> --------------------------------------------------------------------------------

> In the regex draft we have in the example:

>             # or the subject is all uppercase (no lowercase)
>             header :regex :comparator "i;octet" "subject"
>               "^[^:lower:]*$" ) {

> What if the Subject is mutliline and one of the lines contains uppercase
> letters, while the other contains only lowercase letters?  ie.

> Subject: this is the first line that contains only lowercase
>   this is a contination of the Subject header but it contains UPPERCASE LETTERS

This is not an example of multiple subject lines, it is an example of a single
folded subject line. Folding is removed prior to comparison; it is arbitrary
and can change during message transit. Unfortunately, the sieve specification
doesn't make this clear, and it should. (The reason it doesn't is probably that
the handling of folding is considered to be such a fundamental characteristic
of email headers that nobody thought to point it out.)

> The regular expression "^[^:lower:]*$" is going to match the first line, and
> therefore give us a match, but this isn't what we intended.

No, it will apply to the entire unfolded line, so it won't match.

> I have a customer who quite sensibly would like to filter all messages that
> have either no from header, or an empty from header.  Our exists test will pass
> if the header exists but is empty, so we need a regex test too that tests to
> say if the header is completely empty.  Initial thoughts would be something
> along the lines of "^[[:space:]]*$ but then this will match the following from
> header:

> From:
>  Address1@bar.com
>  Address2@foo.com

> as the very first line contains nothing but spaces.

Again, this is incorrect. There is no empty From: field here.

> Can we currently do this with Sieve at present?

Yes you can.

> If not perhaps we need to be
> able to use :regex with :is or :contains?  I see it says in the Sieve draft
> that we can't give more than one match type, but then perhaps this is a
> suitable occasion?

Nope.

> Could we also allow:
>   a.. \w in place of [:word:]
>   b.. \s in place of [:space:]
>   c.. \d in place of [:digit:]
>   d.. \l in place of [:lower:]
>   e.. \u in place of [:upper:]

> I find them really quite useful.  Or are we trying to stick to POSIX rigidly.
> (Still haven't got a copy of this.  Bloomin have to bloomin pay for it. Grrr)

Personally, I think there are real advantages to sticking to the POSIX
specification and not introducing shortcuts. For example, it enables use of an
OOTB POSIX regex facility.

> Finally, whoever is responsible for http://www.cyrusoft.com/sieve/ could they
> please update the broken link that points to
> http://search.ietf.org/internet-drafts/draft-melnikov-sieve-imapflags-03.txt
> instead of
> http://search.ietf.org/internet-drafts/draft-melnikov-sieve-imapflags-04.txt

> Additionally should there not be a link to the regex work at
> http://search.ietf.org/internet-drafts/draft-murchison-sieve-regex-02.txt it
> seems relevant in the Internet Drafts section

I suggest you send mail to the site maintainer, and if that's not obvious
to the postmaster. This isn't appropriate for this mailing list.

				Ned


Received: by ns.secondary.com (8.9.3/8.9.3) id HAA11187 for ietf-mta-filters-bks; Wed, 3 Jan 2001 07:24:25 -0800 (PST)
Received: from eagle.oceana.com (eagle.oceana.com [208.17.123.12]) by ns.secondary.com (8.9.3/8.9.3) with ESMTP id HAA11174 for <ietf-mta-filters@imc.org>; Wed, 3 Jan 2001 07:24:23 -0800 (PST)
Received: from ken.oceana.com by eagle.oceana.com (Switch-2.0.5/Switch-2.0.5) with ESMTP id f03FSD600618; Wed, 3 Jan 2001 10:28:13 -0500
Message-ID: <3A5344D3.B290AB4C@oceana.com>
Date: Wed, 03 Jan 2001 10:27:15 -0500
From: Ken Murchison <ken@oceana.com>
Organization: Oceana Matrix Ltd.
X-Mailer: Mozilla 4.73 [en] (Win95; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Nigel Swinson <Nigel@Swinson.com>
CC: ietf-mta-filters@imc.org
Subject: Re: Regex matching complete headers.
References: <005f01c07589$fc9b7630$73c8d781@nige>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-ietf-mta-filters@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:ietf-mta-filters-request@imc.org?body=unsubscribe>

> Nigel Swinson wrote:
> 
> 2 points and some suggestions about the Sieve Home page
> 
> ----------------------------------------------------------------------
> In the regex draft we have in the example:
> 
>             # or the subject is all uppercase (no lowercase)
>             header :regex :comparator "i;octet" "subject"
>               "^[^:lower:]*$" ) {
> What if the Subject is mutliline and one of the lines contains
> uppercase letters, while the other contains only lowercase letters?
> ie.
> 
> Subject: this is the first line that contains only lowercase
>   this is a contination of the Subject header but it contains
> UPPERCASE LETTERS
> 
> The regular expression "^[^:lower:]*$" is going to match the first
> line, and therefore give us a match, but this isn't what we intended.

Actually, you've misread the regex.  It is looking for subjects that DO
NOT contain any lowercase chars.  This being the case, :regex should
work for multiline headers, just like the other comparators.  In fact, I
tested it with my regex implementation in cmu-sieve and it works fine. 
Using this script:

require "regex";

if header :regex :comparator "i;octet" "subject" "^[^:lower:]*$" {
	discard;
}


A subject of:

Subject: FIRST LINE
	SECOND LINE

will be discarded

and a subject of:

Subject: FIRST LINE
	Second LINE

will be kept


It is my understanding that all of the comparators work on the the
ENTIRE header contents, regardless of the number of lines, ie the script

if header :contains "subject" "second" {
	discard;
}

will discard either of the examples above.


> I have a customer who quite sensibly would like to filter all messages
> that have either no from header, or an empty from header.  Our exists
> test will pass if the header exists but is empty, so we need a regex
> test too that tests to say if the header is completely empty.

Try:

if anyof (not exists "from", header :regex "from" "^$")


Any good header parser should gobble up leading whitespace, so even if
the from: header exists an contains nothing but whitespace, the test
above should work.

> ----------------------------------------------------------------------
> 
> Could we also allow:
> 
>    * \w in place of [:word:]
>    * \s in place of [:space:]
>    * \d in place of [:digit:]
>    * \l in place of [:lower:]
>    * \u in place of [:upper:]
> 
> I find them really quite useful.  Or are we trying to stick to POSIX
> rigidly.

I went with POSIX simply because it is a defined spec and I didn't want
to describe exactly what a regex should be (with all the ifs/ands/buts,
etc).  If there is consensus that shortcuts like these are desired, I'm
not opposed to adding them to the draft.

Regards,
Ken
-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp


Received: (from majordomo@localhost) by ns.secondary.com (8.9.3/8.9.3) id FAA03167 for ietf-mta-filters-bks; Wed, 3 Jan 2001 05:31:20 -0800 (PST)
Received: from c000.snv.cp.net (c000-h000.c000.snv.cp.net [209.228.32.64]) by ns.secondary.com (8.9.3/8.9.3) with SMTP id FAA03155 for <ietf-mta-filters@imc.org>; Wed, 3 Jan 2001 05:31:15 -0800 (PST)
Received: (cpmta 18899 invoked from network); 3 Jan 2001 05:35:11 -0800
Received: from commercial.ucs.ed.ac.uk (HELO nige) (129.215.200.115) by smtp.swinson.com (209.228.32.64) with SMTP; 3 Jan 2001 05:35:11 -0800
X-Sent: 3 Jan 2001 13:35:11 GMT
Message-ID: <005f01c07589$fc9b7630$73c8d781@nige>
From: "Nigel Swinson" <Nigel@Swinson.com>
To: <ietf-mta-filters@imc.org>
Subject: Regex matching complete headers.
Date: Wed, 3 Jan 2001 13:35:06 -0000
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_005C_01C07589.FBD985C0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Sender: owner-ietf-mta-filters@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:ietf-mta-filters-request@imc.org?body=unsubscribe>

This is a multi-part message in MIME format.

------=_NextPart_000_005C_01C07589.FBD985C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

2 points and some suggestions about the Sieve Home page


-------------------------------------------------------------------------=
-------

In the regex draft we have in the example:

            # or the subject is all uppercase (no lowercase)
            header :regex :comparator "i;octet" "subject"
              "^[^:lower:]*$" ) {

What if the Subject is mutliline and one of the lines contains uppercase =
letters, while the other contains only lowercase letters?  ie.

Subject: this is the first line that contains only lowercase
  this is a contination of the Subject header but it contains UPPERCASE =
LETTERS

The regular expression "^[^:lower:]*$" is going to match the first line, =
and therefore give us a match, but this isn't what we intended.


I have a customer who quite sensibly would like to filter all messages =
that have either no from header, or an empty from header.  Our exists =
test will pass if the header exists but is empty, so we need a regex =
test too that tests to say if the header is completely empty.  Initial =
thoughts would be something along the lines of "^[[:space:]]*$ but then =
this will match the following from header:

From:
 Address1@bar.com
 Address2@foo.com

as the very first line contains nothing but spaces.

Can we currently do this with Sieve at present?  If not perhaps we need =
to be able to use :regex with :is or :contains?  I see it says in the =
Sieve draft that we can't give more than one match type, but then =
perhaps this is a suitable occasion?


-------------------------------------------------------------------------=
-------


Could we also allow:
  a.. \w in place of [:word:]
  b.. \s in place of [:space:]
  c.. \d in place of [:digit:]
  d.. \l in place of [:lower:]
  e.. \u in place of [:upper:]
I find them really quite useful.  Or are we trying to stick to POSIX =
rigidly. (Still haven't got a copy of this.  Bloomin have to bloomin pay =
for it. Grrr)


-------------------------------------------------------------------------=
-------


Finally, whoever is responsible for http://www.cyrusoft.com/sieve/ could =
they please update the broken link that points to =
http://search.ietf.org/internet-drafts/draft-melnikov-sieve-imapflags-03.=
txt instead of =
http://search.ietf.org/internet-drafts/draft-melnikov-sieve-imapflags-04.=
txt

Additionally should there not be a link to the regex work at =
http://search.ietf.org/internet-drafts/draft-murchison-sieve-regex-02.txt=
 it seems relevant in the Internet Drafts section


-------------------------------------------------------------------------=
-------


That's all for now.

Cheers

Nigel


------=_NextPart_000_005C_01C07589.FBD985C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>2 points and some suggestions about the =
Sieve Home=20
page</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>
<HR>
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>In the regex draft we have in the=20
example:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; # or=20
the subject is all uppercase (no=20
lowercase)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;=20
header :regex :comparator "i;octet"=20
"subject"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;=20
"^[^:lower:]*$" ) {<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>What if the Subject is mutliline and =
one of the=20
lines contains uppercase letters, while the other contains only =
lowercase=20
letters?&nbsp; ie.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Subject: this is the first line that =
contains only=20
lowercase</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; this is a contination of the =
Subject header=20
but it contains UPPERCASE LETTERS</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The regular expression "^[^:lower:]*$" =
is going to=20
match the first line, and therefore give us a match, but this isn't what =
we=20
intended.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have a customer who quite sensibly =
would like to=20
filter all messages that have either no from header, or an empty from=20
header.&nbsp; Our exists test will pass if the header exists but is =
empty, so we=20
need a regex test too that tests to say if the header is completely =
empty.&nbsp;=20
Initial thoughts would be something along the lines of "^[[:space:]]*$ =
but then=20
this will match the following from header:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>From:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;<A=20
href=3D"mailto:Address1@bar.com">Address1@bar.com</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;<A=20
href=3D"mailto:Address2@foo.com">Address2@foo.com</A><BR><BR></FONT><FONT=
=20
face=3DArial size=3D2>as the very first line contains nothing but=20
spaces.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Can we currently do this with Sieve at=20
present?&nbsp; If not perhaps we need to be able to use :regex with :is =
or=20
:contains?&nbsp; I see it says in the Sieve draft that we can't give =
more than=20
one match type, but then perhaps this is a suitable =
occasion?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>
<HR>
</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Could we also allow:</FONT></DIV><FONT =
face=3DArial=20
size=3D2>
<UL>
  <LI>\w in place of [:word:]</LI>
  <LI>\s in place of [:space:]</LI>
  <LI>\d in place of [:digit:]</LI>
  <LI>\l in place of [:lower:]</LI>
  <LI>\u in place of [:upper:]</LI></UL>
<DIV>I find them really quite useful.&nbsp; Or are we trying to stick to =
POSIX=20
rigidly. (Still haven't got a copy of this.&nbsp; Bloomin have to =
bloomin pay=20
for it. Grrr)</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<HR>
</DIV>
<DIV>&nbsp;</DIV>
<DIV>Finally, whoever is responsible for <A=20
href=3D"http://www.cyrusoft.com/sieve/">http://www.cyrusoft.com/sieve/</A=
>&nbsp;could=20
they please update the broken link that points to <A=20
href=3D"http://search.ietf.org/internet-drafts/draft-melnikov-sieve-imapf=
lags-03.txt">http://search.ietf.org/internet-drafts/draft-melnikov-sieve-=
imapflags-03.txt</A>&nbsp;instead=20
of <A=20
href=3D"http://search.ietf.org/internet-drafts/draft-melnikov-sieve-imapf=
lags-04.txt">http://search.ietf.org/internet-drafts/draft-melnikov-sieve-=
imapflags-04.txt</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>Additionally should there not be a link to the regex work at <A=20
href=3D"http://search.ietf.org/internet-drafts/draft-murchison-sieve-rege=
x-02.txt">http://search.ietf.org/internet-drafts/draft-murchison-sieve-re=
gex-02.txt</A>=20
it seems relevant in the Internet Drafts section</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<HR>
</DIV>
<DIV>&nbsp;</DIV>
<DIV>That's all for now.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Cheers</DIV>
<DIV>&nbsp;</DIV>
<DIV>Nigel</DIV>
<DIV></FONT><FONT face=3DArial =
size=3D2>&nbsp;</DIV></FONT></BODY></HTML>

------=_NextPart_000_005C_01C07589.FBD985C0--


