Re: [sieve] Sieve :fcc option

Ken Murchison <murch@andrew.cmu.edu> Mon, 01 May 2017 18:28 UTC

Return-Path: <murch@andrew.cmu.edu>
X-Original-To: sieve@ietfa.amsl.com
Delivered-To: sieve@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A396C129464 for <sieve@ietfa.amsl.com>; Mon, 1 May 2017 11:28:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.501
X-Spam-Level:
X-Spam-Status: No, score=-1.501 tagged_above=-999 required=5 tests=[BAYES_50=0.8, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wUBbOiH5t_jI for <sieve@ietfa.amsl.com>; Mon, 1 May 2017 11:28:18 -0700 (PDT)
Received: from smtp.andrew.cmu.edu (SMTP.ANDREW.CMU.EDU [128.2.157.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E633F12025C for <sieve@ietf.org>; Mon, 1 May 2017 11:25:34 -0700 (PDT)
Received: from [192.168.1.22] (cpe-74-77-85-250.buffalo.res.rr.com [74.77.85.250]) (user=murch mech=PLAIN (0 bits)) by smtp.andrew.cmu.edu (8.15.2/8.15.2) with ESMTPSA id v41IPW0A014430 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for <sieve@ietf.org>; Mon, 1 May 2017 14:25:33 -0400
To: sieve@ietf.org
References: <7357c8a0-4256-963c-3122-039053135f3b@andrew.cmu.edu>
From: Ken Murchison <murch@andrew.cmu.edu>
Organization: Carnegie Mellon University
Message-ID: <c6760805-2b7c-04a2-6ec4-e7b89af12571@andrew.cmu.edu>
Date: Mon, 1 May 2017 14:25:32 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0
MIME-Version: 1.0
In-Reply-To: <7357c8a0-4256-963c-3122-039053135f3b@andrew.cmu.edu>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Content-Language: en-US
X-PMX-Version: 6.3.0.2556906, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2017.5.1.181816
X-SMTP-Spam-Clean: 33% ( SXL_IP_DYNAMIC 3, TO_IN_SUBJECT 0.5, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, FROM_EDU_TLD 0, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, NO_CTA_URI_FOUND 0, NO_URI_FOUND 0, NO_URI_HTTPS 0, RDNS_GENERIC_POOLED 0, RDNS_POOLED 0, RDNS_RESIDENTIAL 0, RDNS_SUSP 0, RDNS_SUSP_GENERIC 0, RDNS_SUSP_SPECIFIC 0, REFERENCES 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FORWARDED_MSG 0, __HAS_FROM 0, __HAS_MSGID 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __MOZILLA_USER_AGENT 0, __NO_HTML_TAG_RAW 0, __PHISH_SPEAR_STRUCTURE_1 0, __RDNS_POOLED_1 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __TO_IN_SUBJECT2 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __USER_AGENT 0)
X-SMTP-Spam-Score: 33%
X-Scanned-By: MIMEDefang 2.78 on 128.2.157.39
Archived-At: <https://mailarchive.ietf.org/arch/msg/sieve/801awyDIHjjkfoNA8AQW4u096_8>
Subject: Re: [sieve] Sieve :fcc option
X-BeenThere: sieve@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: SIEVE Working Group <sieve.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/sieve>, <mailto:sieve-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/sieve/>
List-Post: <mailto:sieve@ietf.org>
List-Help: <mailto:sieve-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sieve>, <mailto:sieve-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 01 May 2017 18:28:20 -0000

On 01/17/2017 10:31 AM, Ken Murchison wrote:
> All,
>
> A vendor that uses Cyrus IMAP has some customers that would like to 
> have copies of outgoing Sieve-generated messages (e.g. reject, 
> vacation) stored in their Sent mailbox.  We could obviously do this 
> with a user configurable option, but I was thinking of extending Sieve 
> to support a :fcc <mailbox> option on reject, vacation and any new 
> actions where it might apply.  The option could also leverage  
> draft-bosch-sieve-special-use to do something like :fcc "\\Sent"

I have a complete implementation of :fcc for vacation which also 
interacts with specific fileinto options (mailbox, imap4flags, 
special-use).  My question, before I start writing up a draft, is what 
the exact grammar should look like:

vacation VACATION-OPTS [ ":fcc" FILEINTO-OPTS <mailbox: string>] 
<reason: string>

OR

vacation VACATION-OPTS [ ":fcc" <mailbox: string> FILEINTO-OPTS ] 
<reason: string>

OR

vacation VACATION-OPTS [ ":fcc" <mailbox: string> ] FILEINTO-OPTS 
<reason: string>


where VACATION-OPTS is the expected:

[":days" number | ":seconds" number] [":subject" string] [":from" string]
  [":addresses" string-list] [":mime"] [":handle" string]


and FILEINTO-OPTS is:

[ ":create" ] [ ":flags" <list-of-flags: string-list> ] [ ":specialuse" 
<special-use-flag: string> ]



At this point I prefer the first choice since it looks a lot like 
fileinto itself and has the FILEINTO-OPTS booked-ended.  The last choice 
allows all of the options to appear in any order (including 
inter-mingling of VACATION-OPTS with FILEINTO-OPTS), but also removes 
the dependency of FILEINTO-OPTS on :fcc, which would allow a nonsensical 
:create or :flags to be used outside of :fcc.

Note that we do have at least one existing action command that has an 
option dependent on another:

deleteheader" [":index" <fieldno: number> [":last"]] ...


Thoughts?

-- 
Kenneth Murchison
Principal Systems Software Engineer
Carnegie Mellon University