Subject: Re: [sieve] Sieve :fcc option

From: Ken Murchison <[email-masked]>
Date: Mon, 1 May 2017 14:25:32 -0400

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