From owner-ietf-mta-filters Mon Dec  9 11:00:03 2002
Received: (from majordomo@localhost)
	by above.proper.com (8.11.6/8.11.3) id gB9J03822404
	for ietf-mta-filters-bks; Mon, 9 Dec 2002 11:00:03 -0800 (PST)
Received: from darius.cyrusoft.com (darius.cyrusoft.com [63.163.82.2])
	by above.proper.com (8.11.6/8.11.3) with ESMTP id gB9J00E22399
	for <ietf-mta-filters@imc.org>; Mon, 9 Dec 2002 11:00:01 -0800 (PST)
Received: from [63.163.82.24] (localhost [127.0.0.1])
	by darius.cyrusoft.com (8.9.3/8.9.3) with ESMTP id NAA22031
	for <ietf-mta-filters@imc.org>; Mon, 9 Dec 2002 13:56:51 -0500 (EST)
Date: Mon, 09 Dec 2002 14:00:10 -0500
From: Cyrus Daboo <daboo@cyrusoft.com>
To: ietf-mta-filters@imc.org
Subject: managesieve comments
Message-ID: <2147483647.1039442410@[10.0.1.16]>
X-Mailer: Mulberry/3.0.0 (Mac OS X)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
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>


Some comments on the managesieve -04 draft based on client implementation 
experience:

Comments on Manage SIEVE

- According to the current IANA registry port 2000 is already assigned to 
'callbook'. Looks like we have to pick another default port?

- STARTTLS command description still has text stating that server must send 
capability items.

- 'sieve-name' item in formal syntax is just defined as 'string'. Why not 
just use 'string' instead? If you want to impose the semantic script name 
requirement, then the 'sieve-name' item should have a comment with a 
reference to section 1.7.

- 'command-authenticate' is missing the mandatory CRLF at the end. The 
correct syntax should be:

    command-authenticate  = "AUTHENTICATE" SP auth-type [SP string]
                            *(CRLF string) CRLF


- 'extension-data' in 'resp-code-ext' is not defined in this document. It 
is in ACAP, but there is no comment about dependency on ACAP formal syntax 
for undefined items here. Either add 'extension-data' in this doc or add 
reference to ACAP in the formal syntax introduction paragraph.

- There is no support for disconnected/multi-access behaviour. In 
particular, a client has to always upload a script before making it active 
as it has no way of knowing whether the one it uploaded in a previous 
session has been changed by some other client. This will be an issue for 
large scripts. The fix for this would be to have some kind of modtime or 
uid stamp for each script - this is probably not necessary right now, but 
may become important later.

-- 
Cyrus Daboo

From owner-ietf-mta-filters Mon Dec  9 13:53:55 2002
Received: (from majordomo@localhost)
	by above.proper.com (8.11.6/8.11.3) id gB9Lrtk06174
	for ietf-mta-filters-bks; Mon, 9 Dec 2002 13:53:55 -0800 (PST)
Received: from almso2.proxy.att.com (almso2.att.com [192.128.166.71])
	by above.proper.com (8.11.6/8.11.3) with ESMTP id gB9LrqE06168
	for <ietf-mta-filters@imc.org>; Mon, 9 Dec 2002 13:53:52 -0800 (PST)
Received: from maillennium.att.com ([135.25.114.99])
	by almso2.proxy.att.com (AT&T IPNS/MSO-4.0) with ESMTP id gB9LrmLm003409
	for <ietf-mta-filters@imc.org>; Mon, 9 Dec 2002 16:53:48 -0500 (EST)
Received: from att.com (<unknown.domain>[135.210.35.150])
          by maillennium.att.com (mailgw1) with SMTP
          id <20021209215329gw1006aua9e>
          (Authid: tony);
          Mon, 9 Dec 2002 21:53:29 +0000
Message-ID: <3DF51108.2070409@att.com>
Date: Mon, 09 Dec 2002 16:54:16 -0500
From: Tony Hansen <tony@att.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021122
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Cyrus Daboo <daboo@cyrusoft.com>
CC: ietf-mta-filters@imc.org
Subject: Re: managesieve comments
References: <2147483647.1039442410@[10.0.1.16]>
In-Reply-To: <2147483647.1039442410@[10.0.1.16]>
Content-Type: text/plain; charset=us-ascii; format=flowed
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>


Cyrus Daboo wrote:
> 
> Some comments on the managesieve -04 draft based on client 
> implementation experience:
> 
> Comments on Manage SIEVE
> 
> - According to the current IANA registry port 2000 is already assigned 
> to 'callbook'. Looks like we have to pick another default port?

We don't pick ports -- IANA assigns them.

The port should be listed as TBA (to be assigned), and a note put in the 
IANA Considerations section indicating that they need to register a port 
for this purpose.

	Tony Hansen
	tony@att.com


From owner-ietf-mta-filters Mon Dec  9 14:56:02 2002
Received: (from majordomo@localhost)
	by above.proper.com (8.11.6/8.11.3) id gB9Mu2X10402
	for ietf-mta-filters-bks; Mon, 9 Dec 2002 14:56:02 -0800 (PST)
Received: from mail.uni-bielefeld.de (IDENT:72@mail2.uni-bielefeld.de [129.70.4.90])
	by above.proper.com (8.11.6/8.11.3) with ESMTP id gB9MtxE10398
	for <ietf-mta-filters@imc.org>; Mon, 9 Dec 2002 14:56:00 -0800 (PST)
Received: from dirichlet.mathematik.uni-bielefeld.de
 (ppp36-82.hrz.uni-bielefeld.de [129.70.36.82])
 by mail.uni-bielefeld.de (Sun Internet Mail Server
 sims.4.0.2000.10.12.16.25.p8)
 with ESMTP id <0H6V007N5JP0PJ@mail.uni-bielefeld.de> for
 ietf-mta-filters@imc.org; Mon,  9 Dec 2002 23:55:56 +0100 (MET)
Date: Mon, 09 Dec 2002 23:02:35 +0100
From: Marc Mutz <mutz@kde.org>
Subject: Re: managesieve comments
In-reply-to: <2147483647.1039442410@[10.0.1.16]>
To: Cyrus Daboo <daboo@cyrusoft.com>, ietf-mta-filters@imc.org
Message-id: <200212092302.36133@sendmail.mutz.com>
Organization: KDE
MIME-version: 1.0
Content-type: multipart/signed; protocol="application/pgp-signature";
 micalg=pgp-sha1; boundary="Boundary-02=_8LR99Ce7ZGZOeXx"; charset="us-ascii"
Content-transfer-encoding: 7bit
User-Agent: KMail/1.5
X-PGP-Key: 0xBDBFE838
References: <2147483647.1039442410@[10.0.1.16]>
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>



--Boundary-02=_8LR99Ce7ZGZOeXx
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Description: signed data
Content-Disposition: inline

On Monday 09 December 2002 20:00, Cyrus Daboo wrote:
> Some comments on the managesieve -04 draft
<snip>

Oh, you have a copy? Can you send it?

Marc

-- 
They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.      -- Benjamin Franklin

--Boundary-02=_8LR99Ce7ZGZOeXx
Content-Type: application/pgp-signature
Content-Description: signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQA99RL83oWD+L2/6DgRAgOSAKCSMk69OplNszK31xyF4WTlQHsFewCdFIZu
O4j0CWIJV+CoNU7eNIKewOk=
=etGC
-----END PGP SIGNATURE-----

--Boundary-02=_8LR99Ce7ZGZOeXx--


From owner-ietf-mta-filters Mon Dec  9 15:26:50 2002
Received: (from majordomo@localhost)
	by above.proper.com (8.11.6/8.11.3) id gB9NQoW11142
	for ietf-mta-filters-bks; Mon, 9 Dec 2002 15:26:50 -0800 (PST)
Received: from darius.cyrusoft.com (darius.cyrusoft.com [63.163.82.2])
	by above.proper.com (8.11.6/8.11.3) with ESMTP id gB9NQlE11135
	for <ietf-mta-filters@imc.org>; Mon, 9 Dec 2002 15:26:48 -0800 (PST)
Received: from [63.163.82.24] (localhost [127.0.0.1])
	by darius.cyrusoft.com (8.9.3/8.9.3) with ESMTP id SAA23935;
	Mon, 9 Dec 2002 18:23:26 -0500 (EST)
Date: Mon, 09 Dec 2002 18:26:32 -0500
From: Cyrus Daboo <daboo@cyrusoft.com>
To: Marc Mutz <mutz@kde.org>, ietf-mta-filters@imc.org
Subject: Re: managesieve comments
Message-ID: <2147483647.1039458392@[10.0.1.16]>
In-Reply-To: <200212092302.36133@sendmail.mutz.com>
References: <2147483647.1039442410@[10.0.1.16]>
 <200212092302.36133@sendmail.mutz.com>
X-Mailer: Mulberry/3.0.0 (Mac OS X)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="==========2147500486=========="
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>


--==========2147500486==========
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi Marc,

--On Monday, December 9, 2002 11:02 PM +0100 Marc Mutz <mutz@kde.org> =
wrote:

|> Some comments on the managesieve -04 draft
| <snip>
|
| Oh, you have a copy? Can you send it?

Try:

<ftp://ftp.ietf.org/internet-drafts/draft-martin-managesieve-04.txt>



--=20
Cyrus Daboo
--==========2147500486==========
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (Darwin)

iD8DBQE99Sa3IrgEatuYy8URAly7AKCUJYxEZgTVGZwmwoB+XNIyq4lDMgCfRjeU
PdM31Plm3+sNHZY0yYk4gPk=
=fN6g
-----END PGP SIGNATURE-----

--==========2147500486==========--


From owner-ietf-mta-filters Mon Dec  9 15:42:36 2002
Received: (from majordomo@localhost)
	by above.proper.com (8.11.6/8.11.3) id gB9Ngag11441
	for ietf-mta-filters-bks; Mon, 9 Dec 2002 15:42:36 -0800 (PST)
Received: from orthanc.ab.ca (orthanc.ab.ca [216.123.203.186])
	by above.proper.com (8.11.6/8.11.3) with ESMTP id gB9NgYE11436
	for <ietf-mta-filters@imc.org>; Mon, 9 Dec 2002 15:42:34 -0800 (PST)
Received: from orthanc.ab.ca (localhost.orthanc.ab.ca [127.0.0.1])
	by orthanc.ab.ca (8.12.6/8.12.6) with ESMTP id gB9NgXG1069546;
	Mon, 9 Dec 2002 16:42:33 -0700 (MST)
	(envelope-from lyndon@orthanc.ab.ca)
Message-Id: <200212092342.gB9NgXG1069546@orthanc.ab.ca>
To: Cyrus Daboo <daboo@cyrusoft.com>
cc: ietf-mta-filters@imc.org
Subject: Re: managesieve comments 
In-Reply-To: Message from Cyrus Daboo <daboo@cyrusoft.com> 
   of "Mon, 09 Dec 2002 14:00:10 EST." <2147483647.1039442410@[10.0.1.16]> 
X-Mailer: mh-e 6.1+cvs; nmh 1.0.4; Emacs 21.2
Date: Mon, 09 Dec 2002 16:42:33 -0700
From: Lyndon Nerenberg <lyndon@orthanc.ab.ca>
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>


>- There is no support for disconnected/multi-access behaviour. In 
>particular, a client has to always upload a script before making it active 
>as it has no way of knowing whether the one it uploaded in a previous 
>session has been changed by some other client. This will be an issue for 
>large scripts. The fix for this would be to have some kind of modtime or 
>uid stamp for each script - this is probably not necessary right now, but 
>may become important later.

Can we just let the server return the MD5 digest of the script?

--lyndon

From owner-ietf-mta-filters Mon Dec  9 16:08:10 2002
Received: (from majordomo@localhost)
	by above.proper.com (8.11.6/8.11.3) id gBA08An11852
	for ietf-mta-filters-bks; Mon, 9 Dec 2002 16:08:10 -0800 (PST)
Received: from darius.cyrusoft.com (darius.cyrusoft.com [63.163.82.2])
	by above.proper.com (8.11.6/8.11.3) with ESMTP id gBA088E11848
	for <ietf-mta-filters@imc.org>; Mon, 9 Dec 2002 16:08:08 -0800 (PST)
Received: from [63.163.82.24] (localhost [127.0.0.1])
	by darius.cyrusoft.com (8.9.3/8.9.3) with ESMTP id TAA24209;
	Mon, 9 Dec 2002 19:04:56 -0500 (EST)
Date: Mon, 09 Dec 2002 19:08:16 -0500
From: Cyrus Daboo <daboo@cyrusoft.com>
To: Lyndon Nerenberg <lyndon@orthanc.ab.ca>
cc: ietf-mta-filters@imc.org
Subject: Re: managesieve comments 
Message-ID: <2147483647.1039460896@[10.0.1.16]>
In-Reply-To: <200212092342.gB9NgXG1069546@orthanc.ab.ca>
References:  <200212092342.gB9NgXG1069546@orthanc.ab.ca>
X-Mailer: Mulberry/3.0.0 (Mac OS X)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
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>


Hi Lyndon,

--On Monday, December 9, 2002 4:42 PM -0700 Lyndon Nerenberg 
<lyndon@orthanc.ab.ca> wrote:

|> - There is no support for disconnected/multi-access behaviour. In
|> particular, a client has to always upload a script before making it
|> active  as it has no way of knowing whether the one it uploaded in a
|> previous  session has been changed by some other client. This will be an
|> issue for  large scripts. The fix for this would be to have some kind of
|> modtime or  uid stamp for each script - this is probably not necessary
|> right now, but  may become important later.
|
| Can we just let the server return the MD5 digest of the script?

That would work. Are you suggesting a new command to return the MD5 of a 
named script?

I was thinking in IMAP terms of introducing a UID command and have that 
modify existing command behaviour:

UID LISTSCRIPTS - this would return the list of scripts with the UID for 
each script listed in the responses.

UID PUTSCRIPT - this would return the new UID as a response code in the OK 
response if it succeeded.

UID SETACTIVE - the client would provide a UID value in the command, and if 
that did not match the UID for the stored named script, the command would 
fail.

One could consider UID command for DELETESCRIPT and GETSCRIPT but I'm not 
sure of the value of those.

-- 
Cyrus Daboo

From owner-ietf-mta-filters Mon Dec 16 09:36:50 2002
Received: (from majordomo@localhost)
	by above.proper.com (8.11.6/8.11.3) id gBGHaom12927
	for ietf-mta-filters-bks; Mon, 16 Dec 2002 09:36:50 -0800 (PST)
Received: from host-155.surveysight.com (host-152.surveysight.com [216.191.52.152] (may be forged))
	by above.proper.com (8.11.6/8.11.3) with ESMTP id gBGHano12923
	for <ietf-mta-filters@imc.org>; Mon, 16 Dec 2002 09:36:49 -0800 (PST)
Received: from andrew ([216.191.52.137]) by host-155.surveysight.com with Microsoft SMTPSVC(5.0.2195.5329);
	 Mon, 16 Dec 2002 12:38:59 -0500
From: "Andrew Hammond" <andrew.hammond@surveysite.com>
To: <ietf-mta-filters@imc.org>
Subject: dynamic naming & creation of mailboxes
Date: Mon, 16 Dec 2002 12:36:50 -0500
Message-ID: <DCEAKFMJNJAAGOACKPMJOELGCAAA.andrew.hammond@surveysite.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Importance: Normal
X-OriginalArrivalTime: 16 Dec 2002 17:38:59.0156 (UTC) FILETIME=[03D90940:01C2A52A]
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>


Hi folks.

I'm looking to create a new sub-folder / day setup for an mailbox that gets
a couple of hundred messages every day.  Then automatically deliver messages
to today's folder.

I've checked the mailing list archives, googled, and read the Sieve RFC.  It
looks to me like there's now way to do this easily with Sieve.

My current solution is a perl script run by a cron job that makes the
sub-folder and writes a new .sieve.

Is there a better way to do this?


From owner-ietf-mta-filters Mon Dec 16 10:07:47 2002
Received: (from majordomo@localhost)
	by above.proper.com (8.11.6/8.11.3) id gBGI7lQ14151
	for ietf-mta-filters-bks; Mon, 16 Dec 2002 10:07:47 -0800 (PST)
Received: from darius.cyrusoft.com (darius.cyrusoft.com [63.163.82.2])
	by above.proper.com (8.11.6/8.11.3) with ESMTP id gBGI7ko14147
	for <ietf-mta-filters@imc.org>; Mon, 16 Dec 2002 10:07:46 -0800 (PST)
Received: from [63.163.82.24] (localhost [127.0.0.1])
	by darius.cyrusoft.com (8.9.3/8.9.3) with ESMTP id NAA10674;
	Mon, 16 Dec 2002 13:04:32 -0500 (EST)
Date: Mon, 16 Dec 2002 13:07:52 -0500
From: Cyrus Daboo <daboo@cyrusoft.com>
To: Andrew Hammond <andrew.hammond@surveysite.com>, ietf-mta-filters@imc.org
Subject: Re: dynamic naming & creation of mailboxes
Message-ID: <2147483647.1040044072@[63.163.82.24]>
In-Reply-To: <DCEAKFMJNJAAGOACKPMJOELGCAAA.andrew.hammond@surveysite.com>
References:  <DCEAKFMJNJAAGOACKPMJOELGCAAA.andrew.hammond@surveysite.com>
X-Mailer: Mulberry/3.0.0 (Mac OS/PPC)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
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>


Hi Andrew,

--On Monday, December 16, 2002 12:36 PM -0500 Andrew Hammond 
<andrew.hammond@surveysite.com> wrote:

| I'm looking to create a new sub-folder / day setup for an mailbox that
| gets a couple of hundred messages every day.  Then automatically deliver
| messages to today's folder.
|
| I've checked the mailing list archives, googled, and read the Sieve RFC.
| It looks to me like there's now way to do this easily with Sieve.
|
| My current solution is a perl script run by a cron job that makes the
| sub-folder and writes a new .sieve.
|
| Is there a better way to do this?

Why not leave the sieve script set to deliver into a mailbox called 
'sent-active' all the time, then simply have the perl script rename that to 
yesterday's date and recreate the active mailbox again. You then do not 
need to edit the sieve script each day. The only problem with this is a 
possible race condition in which a message delivery to the mailbox is 
attempted between the rename and re-create actions. An alternative might be 
to create yesterday's mailbox and then copy all messages from the active 
one into that and expunge those. That way the active mailbox is around all 
the time avoiding the race. However, that requires a lot more work on the 
IMAP side as you have to select (open) the mailbox to do the copying.

-- 
Cyrus Daboo

From owner-ietf-mta-filters Mon Dec 16 10:22:47 2002
Received: (from majordomo@localhost)
	by above.proper.com (8.11.6/8.11.3) id gBGIMlK14644
	for ietf-mta-filters-bks; Mon, 16 Dec 2002 10:22:47 -0800 (PST)
Received: from eagle.oceana.com (eagle.oceana.com [208.17.123.12])
	by above.proper.com (8.11.6/8.11.3) with ESMTP id gBGIMjo14640
	for <ietf-mta-filters@imc.org>; Mon, 16 Dec 2002 10:22:45 -0800 (PST)
Received: from oceana.com (KEN.oceana.com [192.168.10.26])
	by eagle.oceana.com (8.12.6/8.12.6) with ESMTP id gBGIM7dU016111;
	Mon, 16 Dec 2002 13:22:07 -0500
Message-ID: <3DFE1A10.235B0D89@oceana.com>
Date: Mon, 16 Dec 2002 13:23:12 -0500
From: Ken Murchison <ken@oceana.com>
Organization: Oceana Matrix Ltd.
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: Andrew Hammond <andrew.hammond@surveysite.com>
CC: Cyrus Daboo <daboo@cyrusoft.com>, ietf-mta-filters@imc.org
Subject: Re: dynamic naming & creation of mailboxes
References: <DCEAKFMJNJAAGOACKPMJOELGCAAA.andrew.hammond@surveysite.com> <2147483647.1040044072@[63.163.82.24]>
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>




Cyrus Daboo wrote:
> 
> Hi Andrew,
> 
> --On Monday, December 16, 2002 12:36 PM -0500 Andrew Hammond
> <andrew.hammond@surveysite.com> wrote:
> 
> | I'm looking to create a new sub-folder / day setup for an mailbox that
> | gets a couple of hundred messages every day.  Then automatically deliver
> | messages to today's folder.
> |
> | I've checked the mailing list archives, googled, and read the Sieve RFC.
> | It looks to me like there's now way to do this easily with Sieve.
> |
> | My current solution is a perl script run by a cron job that makes the
> | sub-folder and writes a new .sieve.
> |
> | Is there a better way to do this?
> 
> Why not leave the sieve script set to deliver into a mailbox called
> 'sent-active' all the time, then simply have the perl script rename that to
> yesterday's date and recreate the active mailbox again. You then do not
> need to edit the sieve script each day. The only problem with this is a
> possible race condition in which a message delivery to the mailbox is
> attempted between the rename and re-create actions. An alternative might be
> to create yesterday's mailbox and then copy all messages from the active
> one into that and expunge those. That way the active mailbox is around all
> the time avoiding the race. However, that requires a lot more work on the
> IMAP side as you have to select (open) the mailbox to do the copying.


Or you could have the messages delivered to a dummy user's INBOX and
then rename the INBOX.  Renaming an INBOX in IMAP has special semantics
in which the messages are copied to the destination mailbox without
deleting the INBOX.  This is the same as Cyrus' idea, but makes the
server do the bulk of the work for you.

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 Mon Dec 16 15:19:31 2002
Received: (from majordomo@localhost)
	by above.proper.com (8.11.6/8.11.3) id gBGNJVF22005
	for ietf-mta-filters-bks; Mon, 16 Dec 2002 15:19:31 -0800 (PST)
Received: from vingodur.ifi.uio.no (vingodur.ifi.uio.no [129.240.68.200])
	by above.proper.com (8.11.6/8.11.3) with ESMTP id gBGNJTo22000
	for <ietf-mta-filters@imc.org>; Mon, 16 Dec 2002 15:19:29 -0800 (PST)
Received: (from kjetilho@localhost)
	by vingodur.ifi.uio.no (8.11.6/8.11.6) id gBGNJJK18179;
	Tue, 17 Dec 2002 00:19:19 +0100
X-Authentication-Warning: vingodur.ifi.uio.no: kjetilho set sender to kjetilho@ifi.uio.no using -f
To: "Andrew Hammond" <andrew.hammond@surveysite.com>
Cc: <ietf-mta-filters@imc.org>
Subject: Re: dynamic naming & creation of mailboxes
References: <DCEAKFMJNJAAGOACKPMJOELGCAAA.andrew.hammond@surveysite.com>
From: Kjetil Torgrim Homme <kjetilho@ifi.uio.no>
Date: 17 Dec 2002 00:19:19 +0100
In-Reply-To: <DCEAKFMJNJAAGOACKPMJOELGCAAA.andrew.hammond@surveysite.com>
Message-ID: <1rznr5k0w8.fsf@vingodur.ifi.uio.no>
Lines: 50
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
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>


[Andrew Hammond]:
>
>   I'm looking to create a new sub-folder / day setup for an mailbox
>   that gets a couple of hundred messages every day.  Then
>   automatically deliver messages to today's folder.
>   
>   I've checked the mailing list archives, googled, and read the
>   Sieve RFC.  It looks to me like there's now way to do this easily
>   with Sieve.

I'm currently writing a draft for an extension allowing expansion
inside strings.  the main motivation for it is to allow access to back
references in regular expressions.  with that in place (I hope to hack
an implementation during Christmas :-), you could do

  require ["fileinto", "regex", "stringexpand"];

  if header :regex ["date"] ", ([0-3]?[0-9]) ([A-Z][a-z]{2}) ([0-9]{4})" {
        let "year"  "${3}";
        let "month" "${2}";
        let "day"   "${1}";
        fileinto "INBOX.${year}-${month}-${day}";
  }

this is a bit awkward, though, and you are not guaranteed that the
Date header will comply with RFC 2822 grammar.  (most of the bogus
Date headers would probably be found in spam messages, though.)

perhaps the extension should include built-in variable names for time
of day.  hmm.

BTW, my extension really is three things in one:

  string expansion  (changes the semantics of doublequoted strings)
  variable setting  ("let" keyword)
  new test "string" (e.g., if string :regex "${year}" "2..." { ...})

should this be split into two or three different extensions?  what do
you guys think?

>   My current solution is a perl script run by a cron job that makes
>   the sub-folder and writes a new .sieve.
>   
>   Is there a better way to do this?

hopefully, there will be.

-- 
Kjetil T.			|  read and make up your own mind
				|  http://www.cactus48.com/truth.html

From owner-ietf-mta-filters Fri Dec 20 11:11:27 2002
Received: (from majordomo@localhost)
	by above.proper.com (8.11.6/8.11.3) id gBKJBRO27905
	for ietf-mta-filters-bks; Fri, 20 Dec 2002 11:11:27 -0800 (PST)
Received: from gatekeeper.microcell.ca (gatekeeper.microcell.ca [205.151.8.2])
	by above.proper.com (8.11.6/8.11.3) with ESMTP id gBKJBQo27901
	for <ietf-mta-filters@imc.org>; Fri, 20 Dec 2002 11:11:26 -0800 (PST)
Received: from mailserv.microcell.ca (mailserv.microcell.ca [10.2.0.87])
	by gatekeeper.microcell.ca (Postfix) with ESMTP id 29AFD16C5F
	for <ietf-mta-filters@imc.org>; Fri, 20 Dec 2002 14:11:23 -0500 (EST)
Received: from 127.0.0.1 (localhost [127.0.0.1])
	by mailserv.microcell.ca (Postfix) with SMTP id DEA5516BC7
	for <ietf-mta-filters@imc.org>; Fri, 20 Dec 2002 14:11:22 -0500 (EST)
Received: from smtlpexc05.microcell.ca (SMTLPEXC05.microcell.ca [10.2.7.205])
	by mailserv.microcell.ca (Postfix) with ESMTP id C997016BC9
	for <ietf-mta-filters@imc.org>; Fri, 20 Dec 2002 14:11:20 -0500 (EST)
Received: by SMTLPEXC05.microcell.ca with Internet Mail Service (5.5.2653.19)
	id <X8S7CAJ2>; Fri, 20 Dec 2002 14:11:18 -0500
Message-ID: <03B027EAD994D5119B4F009027F35639026B7A0D@SMTLPEXC04.microcell.ca>
From: "Smith, Richard" <Richard.Smith@microcell.ca>
To: "'ietf-mta-filters@imc.org'" <ietf-mta-filters@imc.org>
Subject: Is seive support international characters?
Date: Fri, 20 Dec 2002 14:11:07 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
	charset="iso-8859-1"
X-Sanitizer: This message has been sanitized!
X-Sanitizer-Rev: $Id: Sanitizer.pm,v 1.25 2001/09/04 15:49:11 bre Exp $
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by above.proper.com id gBKJBQo27902
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>


Hi,

I would like to now if this implementation of the RFC 3028 is supporting
french characters?
For example, if I would like to filter every subject that contains the
following string "A french character é", is this filter should work with
sieve?

Thanks

Richard Smith
Microcell IT Télécom
mailto:Richard.Smith@microcell.ca
Fido: 514.999.6279

MICROCELL Télécom
Intégration et Opération - Portail
800, de la Gauchetiere Ouest,Niveau C
Montreal, QC
H5A 1K3



From owner-ietf-mta-filters Fri Dec 20 11:58:04 2002
Received: (from majordomo@localhost)
	by above.proper.com (8.11.6/8.11.3) id gBKJw4D01548
	for ietf-mta-filters-bks; Fri, 20 Dec 2002 11:58:04 -0800 (PST)
Received: from vingodur.ifi.uio.no (vingodur.ifi.uio.no [129.240.68.200])
	by above.proper.com (8.11.6/8.11.3) with ESMTP id gBKJw2o01544
	for <ietf-mta-filters@imc.org>; Fri, 20 Dec 2002 11:58:02 -0800 (PST)
Received: (from kjetilho@localhost)
	by vingodur.ifi.uio.no (8.11.6/8.11.6) id gBKJvof00841;
	Fri, 20 Dec 2002 20:57:50 +0100
X-Authentication-Warning: vingodur.ifi.uio.no: kjetilho set sender to kjetilho@ifi.uio.no using -f
To: "Smith, Richard" <Richard.Smith@microcell.ca>
Cc: "'ietf-mta-filters@imc.org'" <ietf-mta-filters@imc.org>
Subject: Re: Is seive support international characters?
References: <03B027EAD994D5119B4F009027F35639026B7A0D@SMTLPEXC04.microcell.ca>
From: Kjetil Torgrim Homme <kjetilho@ifi.uio.no>
Date: 20 Dec 2002 20:57:50 +0100
In-Reply-To: <03B027EAD994D5119B4F009027F35639026B7A0D@SMTLPEXC04.microcell.ca>
Message-ID: <1rhed8cvk1.fsf@vingodur.ifi.uio.no>
Lines: 17
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by above.proper.com id gBKJw3o01545
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>


[Smith, Richard]:
>
>   I would like to now if this implementation

_this_ implementation?  which one is that?

>   of the RFC 3028 is supporting french characters?  For example, if
>   I would like to filter every subject that contains the following
>   string "A french character é", is this filter should work with
>   sieve?

yes, all strings in Sieve are using the Unicode character set, in
UTF-8 encoding.

-- 
Kjetil T.			|  read and make up your own mind
				|  http://www.cactus48.com/truth.html

From owner-ietf-mta-filters Sat Dec 21 06:38:01 2002
Received: (from majordomo@localhost)
	by above.proper.com (8.11.6/8.11.3) id gBLEc1r22238
	for ietf-mta-filters-bks; Sat, 21 Dec 2002 06:38:01 -0800 (PST)
Received: from pat.uio.no (IDENT:7411@pat.uio.no [129.240.130.16])
	by above.proper.com (8.11.6/8.11.3) with ESMTP id gBLEbso22233
	for <ietf-mta-filters@imc.org>; Sat, 21 Dec 2002 06:37:54 -0800 (PST)
Received: from tolf.ifi.uio.no ([129.240.65.212])
	by pat.uio.no with esmtp (Exim 2.12 #7)
	id 18PklD-0005Iu-00
	for ietf-mta-filters@imc.org; Sat, 21 Dec 2002 15:37:51 +0100
Received: (from kjetilho@localhost) by tolf.ifi.uio.no ; Sat, 21 Dec 2002 15:37:51 +0100 (MET)
To: <ietf-mta-filters@imc.org>
Subject: Re: dynamic naming & creation of mailboxes
References: <DCEAKFMJNJAAGOACKPMJOELGCAAA.andrew.hammond@surveysite.com>
	<1rznr5k0w8.fsf@vingodur.ifi.uio.no>
From: Kjetil Torgrim Homme <kjetilho@ifi.uio.no>
Date: 21 Dec 2002 15:37:51 +0100
In-Reply-To: <1rznr5k0w8.fsf@vingodur.ifi.uio.no>
Message-ID: <1radizcu9s.fsf@tolf.ifi.uio.no>
Lines: 15
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
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>


--=-=-=

[Kjetil Torgrim Homme]:
>
>   I'm currently writing a draft for an extension allowing expansion
>   inside strings.  the main motivation for it is to allow access to
>   back references in regular expressions.

here it is.  any comments welcome!  (I have not submitted this to the
IETF, I don't quite understand how the procedure works.)


--=-=-=
Content-Disposition: attachment;
  filename=draft-homme-sieve-variables-00.txt
Content-Description: Sieve variables extension







Network Working Group                                        K. T. Homme
Document: draft-homme-sieve-variables-00.txt          University of Oslo
Expires June 21, 2003                                        21 Dec 2002

                      Sieve -- Variables Extension

Status of this Memo

   This document is an Internet-Draft and is subject to all provisions
   of Section 10 of RFC2026.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   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."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt

   To view the list Internet-Draft Shadow Directories, see
   http://www.ietf.org/shadow.html.

   Distribution of this memo is unlimited.


Abstract

   In advanced filtering rule sets, it is useful to keep state or
   configuration details across rules.  This extension adds an action to
   store data in variables, changes the interpolation of double quoted
   strings, and supplies a new test so that the value of a string can be
   examined.

0     Meta-information on this draft

   This information is intended to facilitate discussion.  It will be
   removed when this document leaves the Internet-Draft stage.


0.1   Discussion

   This draft is intended to be an extension to the Sieve mail filtering
   language, available from the RFC repository as



Homme                                                           [Page 1]





Internet Draft        Sieve -- Variables Extension           21 Dec 2002


   <ftp://ftp.ietf.org/rfc/rfc3028.txt>.

   This draft and the Sieve language itself are being discussed on the
   MTA Filters mailing list at <ietf-mta-filters@imc.org>.  Subscription
   requests can be sent to <ietf-mta-filters-request@imc.org> (send an
   email message with the word "subscribe" in the body).  More
   information on the mailing list along with a WWW archive of back
   messages is available at <http://www.imc.org/ietf-mta-filters/>.

0.2   Noted Changes

0.3   Open Issues

   a) Does it make sense to reserve all upper case variable names for
   the future?  Sieve extension are perhaps static and unchanging by
   nature.

   b) Should we include more predefined variables to access the time?
   (hour, minutes, timezone, weekday, week number (US, EU og ISO?), name
   of month, name of weekday, ...)  Could use ${Time_X} => %X as per
   strftime(3c).

   c) This extension is particularily useful if fileinto is extended to
   create new folders on demand.

   Example:
            fileinto :makefolder "archive.${Year}-${Month}";

   It is not clear if this feature should be included here or left for a
   separate extension.

1.  Introduction

   This is an extension to the Sieve language defined by [SIEVE].  It
   adds support for storing and referencing data in string variables.

   Conventions for notations are as in [SIEVE] section 1.1, including
   use of [KEYWORDS].

2.  Capability Identifier

   The capability string associated with the extension defined in this
   document is "variables".

3.  Interpretation of strings

   This extension changes the syntax of quoted-string, multi-line-
   literal and multi-line-dotstuff found in [SIEVE] to enable the



Homme                                                           [Page 2]





Internet Draft        Sieve -- Variables Extension           21 Dec 2002


   inclusion of the value of variables.  The syntax follows [ABNF].

             quoted-string  =  DQUOTE *(CHAR / variable-ref) DQUOTE
        multi-line-literal  =  [ (variable-ref / CHAR-NOT-DOT)
                                *(variable-ref / CHAR-NOT-CRLF) ] CRLF
       multi-line-dotstuff  =  "." 1*(variable-ref / CHAR-NOT-CRLF) CRLF

              variable-ref  =  "${" variable-name "}"
             variable-name  =  reserved-variable / user-variable
         reserved-variable  =  num-variable / uc-variable
              num-variable  =  1*DIGIT
               uc-variable  =  UPPER *(ALPHA / DIGIT / "_")
             user-variable  =  LOWER *(ALPHA / DIGIT / "_")
                     LOWER  =  %x61-7A          ; a-z
                     UPPER  =  %x41-5A          ; A-Z

   When the string is evaluated, variable-ref shall be replaced by the
   value of variable-name.  Unknown variables are replaced by the empty
   string.  As per the grammar, illegal variable names leaves the
   would-be variable-ref verbatim, since it is interpreted as a 1*CHAR
   instead.

   Examples:
           "&%${}!"    => unchanged, as the empty string is an illegal
                          identifier.
           "${doh!}"   => unchanged, as "!" is illegal in identifiers.
           "${Argggh}" => the empty string, since "Argggh" is an unknown
                          reserved variable.

   Strings SHOULD be evaluated every time control reaches the statement
   it is a part of, to make sure the expanded variable values are up-
   to-date.

3.1 Interaction with quoting

   The semantics of quoting using backslash are not changed.

   Examples:
           "${fo\o}"  => ${foo}  => the expansion of variable foo.
           "${fo\\o}" => ${fo\o} => illegal identifier => left verbatim.
           "\${foo}"  => ${foo}  => the expansion of variable foo.
           "\\${foo}" => \${foo} => a backslash character followed by the
                                    expansion of variable foo.

3.2 Reserved variables

3.2.1 Numeric variables




Homme                                                           [Page 3]





Internet Draft        Sieve -- Variables Extension           21 Dec 2002


   Unless the extension "regex" is in use, all numeric variable name
   MUST evaluate to the empty string.

   The decimal value of the numeric variable name will index the list of
   matching strings from the each of the group operators in the latest
   regular expression match.  The first pair of grouping parentheses has
   index 1.  If the index is out of range, the empty string will be
   substituted.  Index 0 returns the number of matching groups.

   Example:
           require [ "fileinto", "regex", "variables", "vacation" ];

           if header :regex "List-ID" "<(.*)@" {
                fileinto "lists.${1}"; stop;
           }

           if header :regex "From" "^
                set greeting "Dear ${1},";
           }
           if header :regex "Subject" "(.*)" {
                set subject " on ${1}";
           }

           vacation text:
           ${greeting}

           Thank you for your mail${subject}.
           I'm away from office for a few days, but I will get back to
           you as soon as possible.
           .
           ;

3.2.2 Dollar

   The value of ${Dollar} is always "$".  This means the literal value
   of "$" can be escaped by entering it as "${Dollar}".

   Example:
           "make ${Dollar}${Dollar}${Dollar} fast" => "make $$$ fast"

   Note: it is not required to escape "$$$".

3.2.3 Miscellaneous

   A few variables give access to the time:

          ${Year}  => the current year, "0000" .. "9999"
          ${Month} => the current month, "01" .. "12"



Homme                                                           [Page 4]





Internet Draft        Sieve -- Variables Extension           21 Dec 2002


          ${Day}   => the current day, "01" .. "31"

   These variables SHOULD reference the time when execution of the Sieve
   script started to ensure consistent results even when run at
   midnight.  The local timezone SHOULD be used.

   Other variable names starting with an uppercase letter or underscore
   are reserved for future extensions.


4.  Action set

   Syntax:   set <name: user-variable> <value: string>

   The "set" action stores the specified value in the variable.
   Assignment to a reserved variable name or an illegal identifier MUST
   cause a syntax error.  All variables have global scope.

   Example:
           set honorific  "Mr";
           set first_name "Wile";
           set last_name  "Coyote";
           set vacation text:
           I'm out, please leave a message after the meep.
           .
           ;

   "set" does not affect the implicit keep.


5.  Test string

       Syntax:  string [MATCH-TYPE] [COMPARATOR]
                <source: string-list> <key-list: string-list>

   The "string" test evaluates to true if any of the strings matches any
   key.  The type of match defaults to ":is".


6.  Security Considerations

   When combined with the regex extension, strings can contain arbitrary
   values controlled by the sender of the e-mail if the author of the
   script isn't careful.

   The introduction of variables makes advanced decision making easier
   to write, but since no looping construct is provided, all Sieve
   scripts will terminate orderly.



Homme                                                           [Page 5]





Internet Draft        Sieve -- Variables Extension           21 Dec 2002


7.  Acknowledgments

   Thanks to Peder Stray for inspiration.


8.  Author's Address

   Kjetil T. Homme
   Frydens g 5B
   0564 Oslo, Norway

   Phone: +47 9366 0091
   E-mail: kjetilho@ifi.uio.no

Appendix A.  References

   [ABNF] D. Crocker, Ed., "Augmented BNF for Syntax Specifications:
       ABNF", Internet Mail Consortium, RFC 2234, November 1997

   [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
       Requirement Levels", Harvard University, RFC 2119, March 1997.

   [SIEVE] Showalter, T., "Sieve: A Mail Filtering Language", Mirapoint,
       RFC 3028, January 2001.

Appendix B.  Full Copyright Statement

   Copyright (C) The Internet Society 2002. All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of develop-
   ing Internet standards in which case the procedures for copyrights
   defined in the Internet Standards process must be followed, or as
   required to translate it into languages other than English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING



Homme                                                           [Page 6]





Internet Draft        Sieve -- Variables Extension           21 Dec 2002


   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
















































Homme                                                           [Page 7]



--=-=-=


-- 
Kjetil T.			|  read and make up your own mind
				|  http://www.cactus48.com/truth.html

--=-=-=--


Received: (from majordomo@localhost) by above.proper.com (8.11.6/8.11.3) id gBLEc1r22238 for ietf-mta-filters-bks; Sat, 21 Dec 2002 06:38:01 -0800 (PST)
Received: from pat.uio.no (IDENT:7411@pat.uio.no [129.240.130.16]) by above.proper.com (8.11.6/8.11.3) with ESMTP id gBLEbso22233 for <ietf-mta-filters@imc.org>; Sat, 21 Dec 2002 06:37:54 -0800 (PST)
Received: from tolf.ifi.uio.no ([129.240.65.212]) by pat.uio.no with esmtp (Exim 2.12 #7) id 18PklD-0005Iu-00 for ietf-mta-filters@imc.org; Sat, 21 Dec 2002 15:37:51 +0100
Received: (from kjetilho@localhost) by tolf.ifi.uio.no ; Sat, 21 Dec 2002 15:37:51 +0100 (MET)
To: <ietf-mta-filters@imc.org>
Subject: Re: dynamic naming & creation of mailboxes
References: <DCEAKFMJNJAAGOACKPMJOELGCAAA.andrew.hammond@surveysite.com> <1rznr5k0w8.fsf@vingodur.ifi.uio.no>
From: Kjetil Torgrim Homme <kjetilho@ifi.uio.no>
Date: 21 Dec 2002 15:37:51 +0100
In-Reply-To: <1rznr5k0w8.fsf@vingodur.ifi.uio.no>
Message-ID: <1radizcu9s.fsf@tolf.ifi.uio.no>
Lines: 15
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
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>

--=-=-=

[Kjetil Torgrim Homme]:
>
>   I'm currently writing a draft for an extension allowing expansion
>   inside strings.  the main motivation for it is to allow access to
>   back references in regular expressions.

here it is.  any comments welcome!  (I have not submitted this to the
IETF, I don't quite understand how the procedure works.)


--=-=-=
Content-Disposition: attachment;
  filename=draft-homme-sieve-variables-00.txt
Content-Description: Sieve variables extension







Network Working Group                                        K. T. Homme
Document: draft-homme-sieve-variables-00.txt          University of Oslo
Expires June 21, 2003                                        21 Dec 2002

                      Sieve -- Variables Extension

Status of this Memo

   This document is an Internet-Draft and is subject to all provisions
   of Section 10 of RFC2026.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   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."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt

   To view the list Internet-Draft Shadow Directories, see
   http://www.ietf.org/shadow.html.

   Distribution of this memo is unlimited.


Abstract

   In advanced filtering rule sets, it is useful to keep state or
   configuration details across rules.  This extension adds an action to
   store data in variables, changes the interpolation of double quoted
   strings, and supplies a new test so that the value of a string can be
   examined.

0     Meta-information on this draft

   This information is intended to facilitate discussion.  It will be
   removed when this document leaves the Internet-Draft stage.


0.1   Discussion

   This draft is intended to be an extension to the Sieve mail filtering
   language, available from the RFC repository as



Homme                                                           [Page 1]





Internet Draft        Sieve -- Variables Extension           21 Dec 2002


   <ftp://ftp.ietf.org/rfc/rfc3028.txt>.

   This draft and the Sieve language itself are being discussed on the
   MTA Filters mailing list at <ietf-mta-filters@imc.org>.  Subscription
   requests can be sent to <ietf-mta-filters-request@imc.org> (send an
   email message with the word "subscribe" in the body).  More
   information on the mailing list along with a WWW archive of back
   messages is available at <http://www.imc.org/ietf-mta-filters/>.

0.2   Noted Changes

0.3   Open Issues

   a) Does it make sense to reserve all upper case variable names for
   the future?  Sieve extension are perhaps static and unchanging by
   nature.

   b) Should we include more predefined variables to access the time?
   (hour, minutes, timezone, weekday, week number (US, EU og ISO?), name
   of month, name of weekday, ...)  Could use ${Time_X} => %X as per
   strftime(3c).

   c) This extension is particularily useful if fileinto is extended to
   create new folders on demand.

   Example:
            fileinto :makefolder "archive.${Year}-${Month}";

   It is not clear if this feature should be included here or left for a
   separate extension.

1.  Introduction

   This is an extension to the Sieve language defined by [SIEVE].  It
   adds support for storing and referencing data in string variables.

   Conventions for notations are as in [SIEVE] section 1.1, including
   use of [KEYWORDS].

2.  Capability Identifier

   The capability string associated with the extension defined in this
   document is "variables".

3.  Interpretation of strings

   This extension changes the syntax of quoted-string, multi-line-
   literal and multi-line-dotstuff found in [SIEVE] to enable the



Homme                                                           [Page 2]





Internet Draft        Sieve -- Variables Extension           21 Dec 2002


   inclusion of the value of variables.  The syntax follows [ABNF].

             quoted-string  =  DQUOTE *(CHAR / variable-ref) DQUOTE
        multi-line-literal  =  [ (variable-ref / CHAR-NOT-DOT)
                                *(variable-ref / CHAR-NOT-CRLF) ] CRLF
       multi-line-dotstuff  =  "." 1*(variable-ref / CHAR-NOT-CRLF) CRLF

              variable-ref  =  "${" variable-name "}"
             variable-name  =  reserved-variable / user-variable
         reserved-variable  =  num-variable / uc-variable
              num-variable  =  1*DIGIT
               uc-variable  =  UPPER *(ALPHA / DIGIT / "_")
             user-variable  =  LOWER *(ALPHA / DIGIT / "_")
                     LOWER  =  %x61-7A          ; a-z
                     UPPER  =  %x41-5A          ; A-Z

   When the string is evaluated, variable-ref shall be replaced by the
   value of variable-name.  Unknown variables are replaced by the empty
   string.  As per the grammar, illegal variable names leaves the
   would-be variable-ref verbatim, since it is interpreted as a 1*CHAR
   instead.

   Examples:
           "&%${}!"    => unchanged, as the empty string is an illegal
                          identifier.
           "${doh!}"   => unchanged, as "!" is illegal in identifiers.
           "${Argggh}" => the empty string, since "Argggh" is an unknown
                          reserved variable.

   Strings SHOULD be evaluated every time control reaches the statement
   it is a part of, to make sure the expanded variable values are up-
   to-date.

3.1 Interaction with quoting

   The semantics of quoting using backslash are not changed.

   Examples:
           "${fo\o}"  => ${foo}  => the expansion of variable foo.
           "${fo\\o}" => ${fo\o} => illegal identifier => left verbatim.
           "\${foo}"  => ${foo}  => the expansion of variable foo.
           "\\${foo}" => \${foo} => a backslash character followed by the
                                    expansion of variable foo.

3.2 Reserved variables

3.2.1 Numeric variables




Homme                                                           [Page 3]





Internet Draft        Sieve -- Variables Extension           21 Dec 2002


   Unless the extension "regex" is in use, all numeric variable name
   MUST evaluate to the empty string.

   The decimal value of the numeric variable name will index the list of
   matching strings from the each of the group operators in the latest
   regular expression match.  The first pair of grouping parentheses has
   index 1.  If the index is out of range, the empty string will be
   substituted.  Index 0 returns the number of matching groups.

   Example:
           require [ "fileinto", "regex", "variables", "vacation" ];

           if header :regex "List-ID" "<(.*)@" {
                fileinto "lists.${1}"; stop;
           }

           if header :regex "From" "^
                set greeting "Dear ${1},";
           }
           if header :regex "Subject" "(.*)" {
                set subject " on ${1}";
           }

           vacation text:
           ${greeting}

           Thank you for your mail${subject}.
           I'm away from office for a few days, but I will get back to
           you as soon as possible.
           .
           ;

3.2.2 Dollar

   The value of ${Dollar} is always "$".  This means the literal value
   of "$" can be escaped by entering it as "${Dollar}".

   Example:
           "make ${Dollar}${Dollar}${Dollar} fast" => "make $$$ fast"

   Note: it is not required to escape "$$$".

3.2.3 Miscellaneous

   A few variables give access to the time:

          ${Year}  => the current year, "0000" .. "9999"
          ${Month} => the current month, "01" .. "12"



Homme                                                           [Page 4]





Internet Draft        Sieve -- Variables Extension           21 Dec 2002


          ${Day}   => the current day, "01" .. "31"

   These variables SHOULD reference the time when execution of the Sieve
   script started to ensure consistent results even when run at
   midnight.  The local timezone SHOULD be used.

   Other variable names starting with an uppercase letter or underscore
   are reserved for future extensions.


4.  Action set

   Syntax:   set <name: user-variable> <value: string>

   The "set" action stores the specified value in the variable.
   Assignment to a reserved variable name or an illegal identifier MUST
   cause a syntax error.  All variables have global scope.

   Example:
           set honorific  "Mr";
           set first_name "Wile";
           set last_name  "Coyote";
           set vacation text:
           I'm out, please leave a message after the meep.
           .
           ;

   "set" does not affect the implicit keep.


5.  Test string

       Syntax:  string [MATCH-TYPE] [COMPARATOR]
                <source: string-list> <key-list: string-list>

   The "string" test evaluates to true if any of the strings matches any
   key.  The type of match defaults to ":is".


6.  Security Considerations

   When combined with the regex extension, strings can contain arbitrary
   values controlled by the sender of the e-mail if the author of the
   script isn't careful.

   The introduction of variables makes advanced decision making easier
   to write, but since no looping construct is provided, all Sieve
   scripts will terminate orderly.



Homme                                                           [Page 5]





Internet Draft        Sieve -- Variables Extension           21 Dec 2002


7.  Acknowledgments

   Thanks to Peder Stray for inspiration.


8.  Author's Address

   Kjetil T. Homme
   Frydens g 5B
   0564 Oslo, Norway

   Phone: +47 9366 0091
   E-mail: kjetilho@ifi.uio.no

Appendix A.  References

   [ABNF] D. Crocker, Ed., "Augmented BNF for Syntax Specifications:
       ABNF", Internet Mail Consortium, RFC 2234, November 1997

   [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
       Requirement Levels", Harvard University, RFC 2119, March 1997.

   [SIEVE] Showalter, T., "Sieve: A Mail Filtering Language", Mirapoint,
       RFC 3028, January 2001.

Appendix B.  Full Copyright Statement

   Copyright (C) The Internet Society 2002. All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of develop-
   ing Internet standards in which case the procedures for copyrights
   defined in the Internet Standards process must be followed, or as
   required to translate it into languages other than English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING



Homme                                                           [Page 6]





Internet Draft        Sieve -- Variables Extension           21 Dec 2002


   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
















































Homme                                                           [Page 7]



--=-=-=


-- 
Kjetil T.			|  read and make up your own mind
				|  http://www.cactus48.com/truth.html

--=-=-=--


Received: (from majordomo@localhost) by above.proper.com (8.11.6/8.11.3) id gBKJw4D01548 for ietf-mta-filters-bks; Fri, 20 Dec 2002 11:58:04 -0800 (PST)
Received: from vingodur.ifi.uio.no (vingodur.ifi.uio.no [129.240.68.200]) by above.proper.com (8.11.6/8.11.3) with ESMTP id gBKJw2o01544 for <ietf-mta-filters@imc.org>; Fri, 20 Dec 2002 11:58:02 -0800 (PST)
Received: (from kjetilho@localhost) by vingodur.ifi.uio.no (8.11.6/8.11.6) id gBKJvof00841; Fri, 20 Dec 2002 20:57:50 +0100
X-Authentication-Warning: vingodur.ifi.uio.no: kjetilho set sender to kjetilho@ifi.uio.no using -f
To: "Smith, Richard" <Richard.Smith@microcell.ca>
Cc: "'ietf-mta-filters@imc.org'" <ietf-mta-filters@imc.org>
Subject: Re: Is seive support international characters?
References: <03B027EAD994D5119B4F009027F35639026B7A0D@SMTLPEXC04.microcell.ca>
From: Kjetil Torgrim Homme <kjetilho@ifi.uio.no>
Date: 20 Dec 2002 20:57:50 +0100
In-Reply-To: <03B027EAD994D5119B4F009027F35639026B7A0D@SMTLPEXC04.microcell.ca>
Message-ID: <1rhed8cvk1.fsf@vingodur.ifi.uio.no>
Lines: 17
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by above.proper.com id gBKJw3o01545
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>

[Smith, Richard]:
>
>   I would like to now if this implementation

_this_ implementation?  which one is that?

>   of the RFC 3028 is supporting french characters?  For example, if
>   I would like to filter every subject that contains the following
>   string "A french character é", is this filter should work with
>   sieve?

yes, all strings in Sieve are using the Unicode character set, in
UTF-8 encoding.

-- 
Kjetil T.			|  read and make up your own mind
				|  http://www.cactus48.com/truth.html


Received: (from majordomo@localhost) by above.proper.com (8.11.6/8.11.3) id gBKJBRO27905 for ietf-mta-filters-bks; Fri, 20 Dec 2002 11:11:27 -0800 (PST)
Received: from gatekeeper.microcell.ca (gatekeeper.microcell.ca [205.151.8.2]) by above.proper.com (8.11.6/8.11.3) with ESMTP id gBKJBQo27901 for <ietf-mta-filters@imc.org>; Fri, 20 Dec 2002 11:11:26 -0800 (PST)
Received: from mailserv.microcell.ca (mailserv.microcell.ca [10.2.0.87]) by gatekeeper.microcell.ca (Postfix) with ESMTP id 29AFD16C5F for <ietf-mta-filters@imc.org>; Fri, 20 Dec 2002 14:11:23 -0500 (EST)
Received: from 127.0.0.1 (localhost [127.0.0.1]) by mailserv.microcell.ca (Postfix) with SMTP id DEA5516BC7 for <ietf-mta-filters@imc.org>; Fri, 20 Dec 2002 14:11:22 -0500 (EST)
Received: from smtlpexc05.microcell.ca (SMTLPEXC05.microcell.ca [10.2.7.205]) by mailserv.microcell.ca (Postfix) with ESMTP id C997016BC9 for <ietf-mta-filters@imc.org>; Fri, 20 Dec 2002 14:11:20 -0500 (EST)
Received: by SMTLPEXC05.microcell.ca with Internet Mail Service (5.5.2653.19) id <X8S7CAJ2>; Fri, 20 Dec 2002 14:11:18 -0500
Message-ID: <03B027EAD994D5119B4F009027F35639026B7A0D@SMTLPEXC04.microcell.ca>
From: "Smith, Richard" <Richard.Smith@microcell.ca>
To: "'ietf-mta-filters@imc.org'" <ietf-mta-filters@imc.org>
Subject: Is seive support international characters?
Date: Fri, 20 Dec 2002 14:11:07 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain; charset="iso-8859-1"
X-Sanitizer: This message has been sanitized!
X-Sanitizer-Rev: $Id: Sanitizer.pm,v 1.25 2001/09/04 15:49:11 bre Exp $
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by above.proper.com id gBKJBQo27902
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>

Hi,

I would like to now if this implementation of the RFC 3028 is supporting
french characters?
For example, if I would like to filter every subject that contains the
following string "A french character é", is this filter should work with
sieve?

Thanks

Richard Smith
Microcell IT Télécom
mailto:Richard.Smith@microcell.ca
Fido: 514.999.6279

MICROCELL Télécom
Intégration et Opération - Portail
800, de la Gauchetiere Ouest,Niveau C
Montreal, QC
H5A 1K3




Received: (from majordomo@localhost) by above.proper.com (8.11.6/8.11.3) id gBGNJVF22005 for ietf-mta-filters-bks; Mon, 16 Dec 2002 15:19:31 -0800 (PST)
Received: from vingodur.ifi.uio.no (vingodur.ifi.uio.no [129.240.68.200]) by above.proper.com (8.11.6/8.11.3) with ESMTP id gBGNJTo22000 for <ietf-mta-filters@imc.org>; Mon, 16 Dec 2002 15:19:29 -0800 (PST)
Received: (from kjetilho@localhost) by vingodur.ifi.uio.no (8.11.6/8.11.6) id gBGNJJK18179; Tue, 17 Dec 2002 00:19:19 +0100
X-Authentication-Warning: vingodur.ifi.uio.no: kjetilho set sender to kjetilho@ifi.uio.no using -f
To: "Andrew Hammond" <andrew.hammond@surveysite.com>
Cc: <ietf-mta-filters@imc.org>
Subject: Re: dynamic naming & creation of mailboxes
References: <DCEAKFMJNJAAGOACKPMJOELGCAAA.andrew.hammond@surveysite.com>
From: Kjetil Torgrim Homme <kjetilho@ifi.uio.no>
Date: 17 Dec 2002 00:19:19 +0100
In-Reply-To: <DCEAKFMJNJAAGOACKPMJOELGCAAA.andrew.hammond@surveysite.com>
Message-ID: <1rznr5k0w8.fsf@vingodur.ifi.uio.no>
Lines: 50
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
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>

[Andrew Hammond]:
>
>   I'm looking to create a new sub-folder / day setup for an mailbox
>   that gets a couple of hundred messages every day.  Then
>   automatically deliver messages to today's folder.
>   
>   I've checked the mailing list archives, googled, and read the
>   Sieve RFC.  It looks to me like there's now way to do this easily
>   with Sieve.

I'm currently writing a draft for an extension allowing expansion
inside strings.  the main motivation for it is to allow access to back
references in regular expressions.  with that in place (I hope to hack
an implementation during Christmas :-), you could do

  require ["fileinto", "regex", "stringexpand"];

  if header :regex ["date"] ", ([0-3]?[0-9]) ([A-Z][a-z]{2}) ([0-9]{4})" {
        let "year"  "${3}";
        let "month" "${2}";
        let "day"   "${1}";
        fileinto "INBOX.${year}-${month}-${day}";
  }

this is a bit awkward, though, and you are not guaranteed that the
Date header will comply with RFC 2822 grammar.  (most of the bogus
Date headers would probably be found in spam messages, though.)

perhaps the extension should include built-in variable names for time
of day.  hmm.

BTW, my extension really is three things in one:

  string expansion  (changes the semantics of doublequoted strings)
  variable setting  ("let" keyword)
  new test "string" (e.g., if string :regex "${year}" "2..." { ...})

should this be split into two or three different extensions?  what do
you guys think?

>   My current solution is a perl script run by a cron job that makes
>   the sub-folder and writes a new .sieve.
>   
>   Is there a better way to do this?

hopefully, there will be.

-- 
Kjetil T.			|  read and make up your own mind
				|  http://www.cactus48.com/truth.html


Received: (from majordomo@localhost) by above.proper.com (8.11.6/8.11.3) id gBGIMlK14644 for ietf-mta-filters-bks; Mon, 16 Dec 2002 10:22:47 -0800 (PST)
Received: from eagle.oceana.com (eagle.oceana.com [208.17.123.12]) by above.proper.com (8.11.6/8.11.3) with ESMTP id gBGIMjo14640 for <ietf-mta-filters@imc.org>; Mon, 16 Dec 2002 10:22:45 -0800 (PST)
Received: from oceana.com (KEN.oceana.com [192.168.10.26]) by eagle.oceana.com (8.12.6/8.12.6) with ESMTP id gBGIM7dU016111; Mon, 16 Dec 2002 13:22:07 -0500
Message-ID: <3DFE1A10.235B0D89@oceana.com>
Date: Mon, 16 Dec 2002 13:23:12 -0500
From: Ken Murchison <ken@oceana.com>
Organization: Oceana Matrix Ltd.
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: Andrew Hammond <andrew.hammond@surveysite.com>
CC: Cyrus Daboo <daboo@cyrusoft.com>, ietf-mta-filters@imc.org
Subject: Re: dynamic naming & creation of mailboxes
References: <DCEAKFMJNJAAGOACKPMJOELGCAAA.andrew.hammond@surveysite.com> <2147483647.1040044072@[63.163.82.24]>
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>

Cyrus Daboo wrote:
> 
> Hi Andrew,
> 
> --On Monday, December 16, 2002 12:36 PM -0500 Andrew Hammond
> <andrew.hammond@surveysite.com> wrote:
> 
> | I'm looking to create a new sub-folder / day setup for an mailbox that
> | gets a couple of hundred messages every day.  Then automatically deliver
> | messages to today's folder.
> |
> | I've checked the mailing list archives, googled, and read the Sieve RFC.
> | It looks to me like there's now way to do this easily with Sieve.
> |
> | My current solution is a perl script run by a cron job that makes the
> | sub-folder and writes a new .sieve.
> |
> | Is there a better way to do this?
> 
> Why not leave the sieve script set to deliver into a mailbox called
> 'sent-active' all the time, then simply have the perl script rename that to
> yesterday's date and recreate the active mailbox again. You then do not
> need to edit the sieve script each day. The only problem with this is a
> possible race condition in which a message delivery to the mailbox is
> attempted between the rename and re-create actions. An alternative might be
> to create yesterday's mailbox and then copy all messages from the active
> one into that and expunge those. That way the active mailbox is around all
> the time avoiding the race. However, that requires a lot more work on the
> IMAP side as you have to select (open) the mailbox to do the copying.


Or you could have the messages delivered to a dummy user's INBOX and
then rename the INBOX.  Renaming an INBOX in IMAP has special semantics
in which the messages are copied to the destination mailbox without
deleting the INBOX.  This is the same as Cyrus' idea, but makes the
server do the bulk of the work for you.

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 above.proper.com (8.11.6/8.11.3) id gBGI7lQ14151 for ietf-mta-filters-bks; Mon, 16 Dec 2002 10:07:47 -0800 (PST)
Received: from darius.cyrusoft.com (darius.cyrusoft.com [63.163.82.2]) by above.proper.com (8.11.6/8.11.3) with ESMTP id gBGI7ko14147 for <ietf-mta-filters@imc.org>; Mon, 16 Dec 2002 10:07:46 -0800 (PST)
Received: from [63.163.82.24] (localhost [127.0.0.1]) by darius.cyrusoft.com (8.9.3/8.9.3) with ESMTP id NAA10674; Mon, 16 Dec 2002 13:04:32 -0500 (EST)
Date: Mon, 16 Dec 2002 13:07:52 -0500
From: Cyrus Daboo <daboo@cyrusoft.com>
To: Andrew Hammond <andrew.hammond@surveysite.com>, ietf-mta-filters@imc.org
Subject: Re: dynamic naming & creation of mailboxes
Message-ID: <2147483647.1040044072@[63.163.82.24]>
In-Reply-To: <DCEAKFMJNJAAGOACKPMJOELGCAAA.andrew.hammond@surveysite.com>
References:  <DCEAKFMJNJAAGOACKPMJOELGCAAA.andrew.hammond@surveysite.com>
X-Mailer: Mulberry/3.0.0 (Mac OS/PPC)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
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>

Hi Andrew,

--On Monday, December 16, 2002 12:36 PM -0500 Andrew Hammond 
<andrew.hammond@surveysite.com> wrote:

| I'm looking to create a new sub-folder / day setup for an mailbox that
| gets a couple of hundred messages every day.  Then automatically deliver
| messages to today's folder.
|
| I've checked the mailing list archives, googled, and read the Sieve RFC.
| It looks to me like there's now way to do this easily with Sieve.
|
| My current solution is a perl script run by a cron job that makes the
| sub-folder and writes a new .sieve.
|
| Is there a better way to do this?

Why not leave the sieve script set to deliver into a mailbox called 
'sent-active' all the time, then simply have the perl script rename that to 
yesterday's date and recreate the active mailbox again. You then do not 
need to edit the sieve script each day. The only problem with this is a 
possible race condition in which a message delivery to the mailbox is 
attempted between the rename and re-create actions. An alternative might be 
to create yesterday's mailbox and then copy all messages from the active 
one into that and expunge those. That way the active mailbox is around all 
the time avoiding the race. However, that requires a lot more work on the 
IMAP side as you have to select (open) the mailbox to do the copying.

-- 
Cyrus Daboo


Received: (from majordomo@localhost) by above.proper.com (8.11.6/8.11.3) id gBGHaom12927 for ietf-mta-filters-bks; Mon, 16 Dec 2002 09:36:50 -0800 (PST)
Received: from host-155.surveysight.com (host-152.surveysight.com [216.191.52.152] (may be forged)) by above.proper.com (8.11.6/8.11.3) with ESMTP id gBGHano12923 for <ietf-mta-filters@imc.org>; Mon, 16 Dec 2002 09:36:49 -0800 (PST)
Received: from andrew ([216.191.52.137]) by host-155.surveysight.com with Microsoft SMTPSVC(5.0.2195.5329); Mon, 16 Dec 2002 12:38:59 -0500
From: "Andrew Hammond" <andrew.hammond@surveysite.com>
To: <ietf-mta-filters@imc.org>
Subject: dynamic naming & creation of mailboxes
Date: Mon, 16 Dec 2002 12:36:50 -0500
Message-ID: <DCEAKFMJNJAAGOACKPMJOELGCAAA.andrew.hammond@surveysite.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Importance: Normal
X-OriginalArrivalTime: 16 Dec 2002 17:38:59.0156 (UTC) FILETIME=[03D90940:01C2A52A]
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>

Hi folks.

I'm looking to create a new sub-folder / day setup for an mailbox that gets
a couple of hundred messages every day.  Then automatically deliver messages
to today's folder.

I've checked the mailing list archives, googled, and read the Sieve RFC.  It
looks to me like there's now way to do this easily with Sieve.

My current solution is a perl script run by a cron job that makes the
sub-folder and writes a new .sieve.

Is there a better way to do this?



Received: (from majordomo@localhost) by above.proper.com (8.11.6/8.11.3) id gBA08An11852 for ietf-mta-filters-bks; Mon, 9 Dec 2002 16:08:10 -0800 (PST)
Received: from darius.cyrusoft.com (darius.cyrusoft.com [63.163.82.2]) by above.proper.com (8.11.6/8.11.3) with ESMTP id gBA088E11848 for <ietf-mta-filters@imc.org>; Mon, 9 Dec 2002 16:08:08 -0800 (PST)
Received: from [63.163.82.24] (localhost [127.0.0.1]) by darius.cyrusoft.com (8.9.3/8.9.3) with ESMTP id TAA24209; Mon, 9 Dec 2002 19:04:56 -0500 (EST)
Date: Mon, 09 Dec 2002 19:08:16 -0500
From: Cyrus Daboo <daboo@cyrusoft.com>
To: Lyndon Nerenberg <lyndon@orthanc.ab.ca>
cc: ietf-mta-filters@imc.org
Subject: Re: managesieve comments 
Message-ID: <2147483647.1039460896@[10.0.1.16]>
In-Reply-To: <200212092342.gB9NgXG1069546@orthanc.ab.ca>
References:  <200212092342.gB9NgXG1069546@orthanc.ab.ca>
X-Mailer: Mulberry/3.0.0 (Mac OS X)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
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>

Hi Lyndon,

--On Monday, December 9, 2002 4:42 PM -0700 Lyndon Nerenberg 
<lyndon@orthanc.ab.ca> wrote:

|> - There is no support for disconnected/multi-access behaviour. In
|> particular, a client has to always upload a script before making it
|> active  as it has no way of knowing whether the one it uploaded in a
|> previous  session has been changed by some other client. This will be an
|> issue for  large scripts. The fix for this would be to have some kind of
|> modtime or  uid stamp for each script - this is probably not necessary
|> right now, but  may become important later.
|
| Can we just let the server return the MD5 digest of the script?

That would work. Are you suggesting a new command to return the MD5 of a 
named script?

I was thinking in IMAP terms of introducing a UID command and have that 
modify existing command behaviour:

UID LISTSCRIPTS - this would return the list of scripts with the UID for 
each script listed in the responses.

UID PUTSCRIPT - this would return the new UID as a response code in the OK 
response if it succeeded.

UID SETACTIVE - the client would provide a UID value in the command, and if 
that did not match the UID for the stored named script, the command would 
fail.

One could consider UID command for DELETESCRIPT and GETSCRIPT but I'm not 
sure of the value of those.

-- 
Cyrus Daboo


Received: (from majordomo@localhost) by above.proper.com (8.11.6/8.11.3) id gB9Ngag11441 for ietf-mta-filters-bks; Mon, 9 Dec 2002 15:42:36 -0800 (PST)
Received: from orthanc.ab.ca (orthanc.ab.ca [216.123.203.186]) by above.proper.com (8.11.6/8.11.3) with ESMTP id gB9NgYE11436 for <ietf-mta-filters@imc.org>; Mon, 9 Dec 2002 15:42:34 -0800 (PST)
Received: from orthanc.ab.ca (localhost.orthanc.ab.ca [127.0.0.1]) by orthanc.ab.ca (8.12.6/8.12.6) with ESMTP id gB9NgXG1069546; Mon, 9 Dec 2002 16:42:33 -0700 (MST) (envelope-from lyndon@orthanc.ab.ca)
Message-Id: <200212092342.gB9NgXG1069546@orthanc.ab.ca>
To: Cyrus Daboo <daboo@cyrusoft.com>
cc: ietf-mta-filters@imc.org
Subject: Re: managesieve comments 
In-Reply-To: Message from Cyrus Daboo <daboo@cyrusoft.com>  of "Mon, 09 Dec 2002 14:00:10 EST." <2147483647.1039442410@[10.0.1.16]> 
X-Mailer: mh-e 6.1+cvs; nmh 1.0.4; Emacs 21.2
Date: Mon, 09 Dec 2002 16:42:33 -0700
From: Lyndon Nerenberg <lyndon@orthanc.ab.ca>
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>

>- There is no support for disconnected/multi-access behaviour. In 
>particular, a client has to always upload a script before making it active 
>as it has no way of knowing whether the one it uploaded in a previous 
>session has been changed by some other client. This will be an issue for 
>large scripts. The fix for this would be to have some kind of modtime or 
>uid stamp for each script - this is probably not necessary right now, but 
>may become important later.

Can we just let the server return the MD5 digest of the script?

--lyndon


Received: (from majordomo@localhost) by above.proper.com (8.11.6/8.11.3) id gB9NQoW11142 for ietf-mta-filters-bks; Mon, 9 Dec 2002 15:26:50 -0800 (PST)
Received: from darius.cyrusoft.com (darius.cyrusoft.com [63.163.82.2]) by above.proper.com (8.11.6/8.11.3) with ESMTP id gB9NQlE11135 for <ietf-mta-filters@imc.org>; Mon, 9 Dec 2002 15:26:48 -0800 (PST)
Received: from [63.163.82.24] (localhost [127.0.0.1]) by darius.cyrusoft.com (8.9.3/8.9.3) with ESMTP id SAA23935; Mon, 9 Dec 2002 18:23:26 -0500 (EST)
Date: Mon, 09 Dec 2002 18:26:32 -0500
From: Cyrus Daboo <daboo@cyrusoft.com>
To: Marc Mutz <mutz@kde.org>, ietf-mta-filters@imc.org
Subject: Re: managesieve comments
Message-ID: <2147483647.1039458392@[10.0.1.16]>
In-Reply-To: <200212092302.36133@sendmail.mutz.com>
References: <2147483647.1039442410@[10.0.1.16]> <200212092302.36133@sendmail.mutz.com>
X-Mailer: Mulberry/3.0.0 (Mac OS X)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="==========2147500486=========="
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>

--==========2147500486==========
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi Marc,

--On Monday, December 9, 2002 11:02 PM +0100 Marc Mutz <mutz@kde.org> =
wrote:

|> Some comments on the managesieve -04 draft
| <snip>
|
| Oh, you have a copy? Can you send it?

Try:

<ftp://ftp.ietf.org/internet-drafts/draft-martin-managesieve-04.txt>



--=20
Cyrus Daboo
--==========2147500486==========
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (Darwin)

iD8DBQE99Sa3IrgEatuYy8URAly7AKCUJYxEZgTVGZwmwoB+XNIyq4lDMgCfRjeU
PdM31Plm3+sNHZY0yYk4gPk=
=fN6g
-----END PGP SIGNATURE-----

--==========2147500486==========--



Received: (from majordomo@localhost) by above.proper.com (8.11.6/8.11.3) id gB9Mu2X10402 for ietf-mta-filters-bks; Mon, 9 Dec 2002 14:56:02 -0800 (PST)
Received: from mail.uni-bielefeld.de (IDENT:72@mail2.uni-bielefeld.de [129.70.4.90]) by above.proper.com (8.11.6/8.11.3) with ESMTP id gB9MtxE10398 for <ietf-mta-filters@imc.org>; Mon, 9 Dec 2002 14:56:00 -0800 (PST)
Received: from dirichlet.mathematik.uni-bielefeld.de (ppp36-82.hrz.uni-bielefeld.de [129.70.36.82]) by mail.uni-bielefeld.de (Sun Internet Mail Server sims.4.0.2000.10.12.16.25.p8) with ESMTP id <0H6V007N5JP0PJ@mail.uni-bielefeld.de> for ietf-mta-filters@imc.org; Mon,  9 Dec 2002 23:55:56 +0100 (MET)
Date: Mon, 09 Dec 2002 23:02:35 +0100
From: Marc Mutz <mutz@kde.org>
Subject: Re: managesieve comments
In-reply-to: <2147483647.1039442410@[10.0.1.16]>
To: Cyrus Daboo <daboo@cyrusoft.com>, ietf-mta-filters@imc.org
Message-id: <200212092302.36133@sendmail.mutz.com>
Organization: KDE
MIME-version: 1.0
Content-type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Boundary-02=_8LR99Ce7ZGZOeXx"; charset="us-ascii"
Content-transfer-encoding: 7bit
User-Agent: KMail/1.5
X-PGP-Key: 0xBDBFE838
References: <2147483647.1039442410@[10.0.1.16]>
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>

--Boundary-02=_8LR99Ce7ZGZOeXx
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Description: signed data
Content-Disposition: inline

On Monday 09 December 2002 20:00, Cyrus Daboo wrote:
> Some comments on the managesieve -04 draft
<snip>

Oh, you have a copy? Can you send it?

Marc

-- 
They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.      -- Benjamin Franklin

--Boundary-02=_8LR99Ce7ZGZOeXx
Content-Type: application/pgp-signature
Content-Description: signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQA99RL83oWD+L2/6DgRAgOSAKCSMk69OplNszK31xyF4WTlQHsFewCdFIZu
O4j0CWIJV+CoNU7eNIKewOk=
=etGC
-----END PGP SIGNATURE-----

--Boundary-02=_8LR99Ce7ZGZOeXx--



Received: (from majordomo@localhost) by above.proper.com (8.11.6/8.11.3) id gB9Lrtk06174 for ietf-mta-filters-bks; Mon, 9 Dec 2002 13:53:55 -0800 (PST)
Received: from almso2.proxy.att.com (almso2.att.com [192.128.166.71]) by above.proper.com (8.11.6/8.11.3) with ESMTP id gB9LrqE06168 for <ietf-mta-filters@imc.org>; Mon, 9 Dec 2002 13:53:52 -0800 (PST)
Received: from maillennium.att.com ([135.25.114.99]) by almso2.proxy.att.com (AT&T IPNS/MSO-4.0) with ESMTP id gB9LrmLm003409 for <ietf-mta-filters@imc.org>; Mon, 9 Dec 2002 16:53:48 -0500 (EST)
Received: from att.com (<unknown.domain>[135.210.35.150]) by maillennium.att.com (mailgw1) with SMTP id <20021209215329gw1006aua9e> (Authid: tony); Mon, 9 Dec 2002 21:53:29 +0000
Message-ID: <3DF51108.2070409@att.com>
Date: Mon, 09 Dec 2002 16:54:16 -0500
From: Tony Hansen <tony@att.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021122
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Cyrus Daboo <daboo@cyrusoft.com>
CC: ietf-mta-filters@imc.org
Subject: Re: managesieve comments
References: <2147483647.1039442410@[10.0.1.16]>
In-Reply-To: <2147483647.1039442410@[10.0.1.16]>
Content-Type: text/plain; charset=us-ascii; format=flowed
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>

Cyrus Daboo wrote:
> 
> Some comments on the managesieve -04 draft based on client 
> implementation experience:
> 
> Comments on Manage SIEVE
> 
> - According to the current IANA registry port 2000 is already assigned 
> to 'callbook'. Looks like we have to pick another default port?

We don't pick ports -- IANA assigns them.

The port should be listed as TBA (to be assigned), and a note put in the 
IANA Considerations section indicating that they need to register a port 
for this purpose.

	Tony Hansen
	tony@att.com



Received: (from majordomo@localhost) by above.proper.com (8.11.6/8.11.3) id gB9J03822404 for ietf-mta-filters-bks; Mon, 9 Dec 2002 11:00:03 -0800 (PST)
Received: from darius.cyrusoft.com (darius.cyrusoft.com [63.163.82.2]) by above.proper.com (8.11.6/8.11.3) with ESMTP id gB9J00E22399 for <ietf-mta-filters@imc.org>; Mon, 9 Dec 2002 11:00:01 -0800 (PST)
Received: from [63.163.82.24] (localhost [127.0.0.1]) by darius.cyrusoft.com (8.9.3/8.9.3) with ESMTP id NAA22031 for <ietf-mta-filters@imc.org>; Mon, 9 Dec 2002 13:56:51 -0500 (EST)
Date: Mon, 09 Dec 2002 14:00:10 -0500
From: Cyrus Daboo <daboo@cyrusoft.com>
To: ietf-mta-filters@imc.org
Subject: managesieve comments
Message-ID: <2147483647.1039442410@[10.0.1.16]>
X-Mailer: Mulberry/3.0.0 (Mac OS X)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
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>

Some comments on the managesieve -04 draft based on client implementation 
experience:

Comments on Manage SIEVE

- According to the current IANA registry port 2000 is already assigned to 
'callbook'. Looks like we have to pick another default port?

- STARTTLS command description still has text stating that server must send 
capability items.

- 'sieve-name' item in formal syntax is just defined as 'string'. Why not 
just use 'string' instead? If you want to impose the semantic script name 
requirement, then the 'sieve-name' item should have a comment with a 
reference to section 1.7.

- 'command-authenticate' is missing the mandatory CRLF at the end. The 
correct syntax should be:

    command-authenticate  = "AUTHENTICATE" SP auth-type [SP string]
                            *(CRLF string) CRLF


- 'extension-data' in 'resp-code-ext' is not defined in this document. It 
is in ACAP, but there is no comment about dependency on ACAP formal syntax 
for undefined items here. Either add 'extension-data' in this doc or add 
reference to ACAP in the formal syntax introduction paragraph.

- There is no support for disconnected/multi-access behaviour. In 
particular, a client has to always upload a script before making it active 
as it has no way of knowing whether the one it uploaded in a previous 
session has been changed by some other client. This will be an issue for 
large scripts. The fix for this would be to have some kind of modtime or 
uid stamp for each script - this is probably not necessary right now, but 
may become important later.

-- 
Cyrus Daboo

